Bug 743198 part 11 - Update locales string to the new spelling as well as unprefixed API.
The main motivation of this patch is to fix the prefixed function name
used in one string. But updated string should have different a different
identifier, otherwise it might be ignored. Since we should eventually
prefer using word "fullscreen" over "full-screen", it is easier to just
change all of them together.
MozReview-Commit-ID: IqXaOIKpUDM
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1739,17 +1739,17 @@ Element::UnbindFromTree(bool aDeep, bool
}
if (aNullParent) {
if (IsFullScreenAncestor()) {
// The element being removed is an ancestor of the full-screen element,
// exit full-screen state.
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
NS_LITERAL_CSTRING("DOM"), OwnerDoc(),
nsContentUtils::eDOM_PROPERTIES,
- "RemovedFullScreenElement");
+ "RemovedFullscreenElement");
// Fully exit full-screen.
nsIDocument::ExitFullscreenInDocTree(OwnerDoc());
}
if (GetParent() && GetParent()->IsInUncomposedDoc()) {
// Update the editable descendant count in the ancestors before we
// lose the reference to the parent.
int32_t editableDescendantChange = -1 * EditableInclusiveDescendantCount(this);
@@ -3236,17 +3236,17 @@ GetFullScreenError(nsIDocument* aDoc)
// Request is in a web app and in the same origin as the web app.
// Don't enforce as strict security checks for web apps, the user
// is supposed to have trust in them. However documents cross-origin
// to the web app must still confirm to the normal security checks.
return nullptr;
}
if (!nsContentUtils::IsRequestFullScreenAllowed()) {
- return "FullScreenDeniedNotInputDriven";
+ return "FullscreenDeniedNotInputDriven";
}
return nullptr;
}
void
Element::RequestFullscreen(JSContext* aCx, JS::Handle<JS::Value> aOptions,
ErrorResult& aError)
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -11573,83 +11573,83 @@ GetFullscreenError(nsIDocument* aDoc, bo
// Chrome code can always use the full-screen API, provided it's not
// explicitly disabled. Note IsCallerChrome() returns true when running
// in an nsRunnable, so don't use GetMozFullScreenEnabled() from an
// nsRunnable!
return nullptr;
}
if (!nsContentUtils::IsFullScreenApiEnabled()) {
- return "FullScreenDeniedDisabled";
+ return "FullscreenDeniedDisabled";
}
if (!aDoc->IsVisible()) {
- return "FullScreenDeniedHidden";
+ return "FullscreenDeniedHidden";
}
if (HasFullScreenSubDocument(aDoc)) {
- return "FullScreenDeniedSubDocFullScreen";
+ return "FullscreenDeniedSubDocFullScreen";
}
// Ensure that all containing elements are <iframe> and have
// allowfullscreen attribute set.
nsCOMPtr<nsIDocShell> docShell(aDoc->GetDocShell());
if (!docShell || !docShell->GetFullscreenAllowed()) {
- return "FullScreenDeniedContainerNotAllowed";
+ return "FullscreenDeniedContainerNotAllowed";
}
return nullptr;
}
bool
nsDocument::FullscreenElementReadyCheck(Element* aElement,
bool aWasCallerChrome)
{
NS_ASSERTION(aElement,
"Must pass non-null element to nsDocument::RequestFullScreen");
if (!aElement || aElement == GetFullscreenElement()) {
return false;
}
if (!aElement->IsInDoc()) {
- DispatchFullscreenError("FullScreenDeniedNotInDocument");
+ DispatchFullscreenError("FullscreenDeniedNotInDocument");
return false;
}
if (aElement->OwnerDoc() != this) {
- DispatchFullscreenError("FullScreenDeniedMovedDocument");
+ DispatchFullscreenError("FullscreenDeniedMovedDocument");
return false;
}
if (!GetWindow()) {
- DispatchFullscreenError("FullScreenDeniedLostWindow");
+ DispatchFullscreenError("FullscreenDeniedLostWindow");
return false;
}
if (const char* msg = GetFullscreenError(this, aWasCallerChrome)) {
DispatchFullscreenError(msg);
return false;
}
if (GetFullscreenElement() &&
!nsContentUtils::ContentIsDescendantOf(aElement, GetFullscreenElement())) {
// If this document is full-screen, only grant full-screen requests from
// a descendant of the current full-screen element.
- DispatchFullscreenError("FullScreenDeniedNotDescendant");
+ DispatchFullscreenError("FullscreenDeniedNotDescendant");
return false;
}
if (!nsContentUtils::IsChromeDoc(this) && !IsInActiveTab(this)) {
- DispatchFullscreenError("FullScreenDeniedNotFocusedTab");
+ DispatchFullscreenError("FullscreenDeniedNotFocusedTab");
return false;
}
// Deny requests when a windowed plugin is focused.
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
if (!fm) {
NS_WARNING("Failed to retrieve focus manager in full-screen request.");
return false;
}
nsCOMPtr<nsIDOMElement> focusedElement;
fm->GetFocusedElement(getter_AddRefs(focusedElement));
if (focusedElement) {
nsCOMPtr<nsIContent> content = do_QueryInterface(focusedElement);
if (nsContentUtils::HasPluginWithUncontrolledEventDispatch(content)) {
- DispatchFullscreenError("FullScreenDeniedFocusedPlugin");
+ DispatchFullscreenError("FullscreenDeniedFocusedPlugin");
return false;
}
}
return true;
}
FullscreenRequest::FullscreenRequest(Element* aElement)
: mElement(aElement)
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -1231,17 +1231,17 @@ nsFocusManager::SetFocusInner(nsIContent
#ifndef XP_MACOSX
if (contentToFocus &&
nsContentUtils::GetRootDocument(contentToFocus->OwnerDoc())->IsFullScreenDoc() &&
nsContentUtils::HasPluginWithUncontrolledEventDispatch(contentToFocus)) {
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
NS_LITERAL_CSTRING("DOM"),
contentToFocus->OwnerDoc(),
nsContentUtils::eDOM_PROPERTIES,
- "FocusedWindowedPluginWhileFullScreen");
+ "FocusedWindowedPluginWhileFullscreen");
nsIDocument::AsyncExitFullscreen(contentToFocus->OwnerDoc());
}
#endif
// if the FLAG_NOSWITCHFRAME flag is used, only allow the focus to be
// shifted away from the current element if the new shell to focus is
// the same or an ancestor shell of the currently focused shell.
bool allowFrameSwitch = !(aFlags & FLAG_NOSWITCHFRAME) ||
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -59,29 +59,29 @@ CreateAttributeWarning=Use of document.c
CreateAttributeNSWarning=Use of document.createAttributeNS() is deprecated. Use element.setAttributeNS() instead.
OwnerElementWarning=Use of attributes' ownerElement attribute is deprecated.
NodeValueWarning=Use of attributes' nodeValue attribute is deprecated. Use value instead.
TextContentWarning=Use of attributes' textContent attribute is deprecated. Use value instead.
EnablePrivilegeWarning=Use of enablePrivilege is deprecated. Please use code that runs with the system principal (e.g. an extension) instead.
nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated. Please use JSON.parse instead.
nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.stringify instead.
nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
-FullScreenDeniedDisabled=Request for full-screen was denied because full-screen API is disabled by user preference.
-FullScreenDeniedFocusedPlugin=Request for full-screen was denied because a windowed plugin is focused.
-FullScreenDeniedHidden=Request for full-screen was denied because the document is no longer visible.
-FullScreenDeniedContainerNotAllowed=Request for full-screen was denied because at least one of the document's containing elements is not an iframe or does not have an "allowfullscreen" attribute.
-FullScreenDeniedNotInputDriven=Request for full-screen was denied because Element.mozRequestFullScreen() was not called from inside a short running user-generated event handler.
-FullScreenDeniedNotInDocument=Request for full-screen was denied because requesting element is no longer in its document.
-FullScreenDeniedMovedDocument=Request for full-screen was denied because requesting element has moved document.
-FullScreenDeniedLostWindow=Request for full-screen was denied because we no longer have a window.
-FullScreenDeniedSubDocFullScreen=Request for full-screen was denied because a subdocument of the document requesting full-screen is already full-screen.
-FullScreenDeniedNotDescendant=Request for full-screen was denied because requesting element is not a descendant of the current full-screen element.
-FullScreenDeniedNotFocusedTab=Request for full-screen was denied because requesting element is not in the currently focused tab.
-RemovedFullScreenElement=Exited full-screen because full-screen element was removed from document.
-FocusedWindowedPluginWhileFullScreen=Exited full-screen because windowed plugin was focused.
+FullscreenDeniedDisabled=Request for fullscreen was denied because Fullscreen API is disabled by user preference.
+FullscreenDeniedFocusedPlugin=Request for fullscreen was denied because a windowed plugin is focused.
+FullscreenDeniedHidden=Request for fullscreen was denied because the document is no longer visible.
+FullscreenDeniedContainerNotAllowed=Request for fullscreen was denied because at least one of the document's containing elements is not an iframe or does not have an "allowfullscreen" attribute.
+FullscreenDeniedNotInputDriven=Request for fullscreen was denied because Element.requestFullscreen() was not called from inside a short running user-generated event handler.
+FullscreenDeniedNotInDocument=Request for fullscreen was denied because requesting element is no longer in its document.
+FullscreenDeniedMovedDocument=Request for fullscreen was denied because requesting element has moved document.
+FullscreenDeniedLostWindow=Request for fullscreen was denied because we no longer have a window.
+FullscreenDeniedSubDocFullscreen=Request for fullscreen was denied because a subdocument of the document requesting fullscreen is already fullscreen.
+FullscreenDeniedNotDescendant=Request for fullscreen was denied because requesting element is not a descendant of the current fullscreen element.
+FullscreenDeniedNotFocusedTab=Request for fullscreen was denied because requesting element is not in the currently focused tab.
+RemovedFullscreenElement=Exited fullscreen because fullscreen element was removed from document.
+FocusedWindowedPluginWhileFullscreen=Exited fullscreen because windowed plugin was focused.
HTMLSyncXHRWarning=HTML parsing in XMLHttpRequest is not supported in the synchronous mode.
InvalidRedirectChannelWarning=Unable to redirect to %S because the channel doesn't implement nsIWritablePropertyBag2.
ResponseTypeSyncXHRWarning=Use of XMLHttpRequest's responseType attribute is no longer supported in the synchronous mode in window context.
WithCredentialsSyncXHRWarning=Use of XMLHttpRequest's withCredentials attribute is no longer supported in the synchronous mode in window context.
TimeoutSyncXHRWarning=Use of XMLHttpRequest's timeout attribute is not supported in the synchronous mode in window context.
JSONCharsetWarning=An attempt was made to declare a non-UTF-8 encoding for JSON retrieved using XMLHttpRequest. Only UTF-8 is supported for decoding JSON.
# LOCALIZATION NOTE: Do not translate AudioBufferSourceNode
MediaBufferSourceNodeResampleOutOfMemory=Insufficient memory to resample the AudioBufferSourceNode for playback.
--- a/webapprt/locales/en-US/webapprt/overrides/dom.properties
+++ b/webapprt/locales/en-US/webapprt/overrides/dom.properties
@@ -59,29 +59,29 @@ CreateAttributeWarning=Use of document.c
CreateAttributeNSWarning=Use of document.createAttributeNS() is deprecated. Use element.setAttributeNS() instead.
OwnerElementWarning=Use of attributes' ownerElement attribute is deprecated.
NodeValueWarning=Use of attributes' nodeValue attribute is deprecated. Use value instead.
TextContentWarning=Use of attributes' textContent attribute is deprecated. Use value instead.
EnablePrivilegeWarning=Use of enablePrivilege is deprecated. Please use code that runs with the system principal (e.g. an extension) instead.
nsIJSONDecodeDeprecatedWarning=nsIJSON.decode is deprecated. Please use JSON.parse instead.
nsIJSONEncodeDeprecatedWarning=nsIJSON.encode is deprecated. Please use JSON.stringify instead.
nsIDOMWindowInternalWarning=Use of nsIDOMWindowInternal is deprecated. Use nsIDOMWindow instead.
-FullScreenDeniedDisabled=Request for full-screen was denied because full-screen API is disabled by user preference.
-FullScreenDeniedFocusedPlugin=Request for full-screen was denied because a windowed plugin is focused.
-FullScreenDeniedHidden=Request for full-screen was denied because the document is no longer visible.
-FullScreenDeniedContainerNotAllowed=Request for full-screen was denied because at least one of the document's containing elements is not an iframe or does not have an "allowfullscreen" attribute.
-FullScreenDeniedNotInputDriven=Request for full-screen was denied because Element.mozRequestFullScreen() was not called from inside a short running user-generated event handler.
-FullScreenDeniedNotInDocument=Request for full-screen was denied because requesting element is no longer in its document.
-FullScreenDeniedMovedDocument=Request for full-screen was denied because requesting element has moved document.
-FullScreenDeniedLostWindow=Request for full-screen was denied because we no longer have a window.
-FullScreenDeniedSubDocFullScreen=Request for full-screen was denied because a subdocument of the document requesting full-screen is already full-screen.
-FullScreenDeniedNotDescendant=Request for full-screen was denied because requesting element is not a descendant of the current full-screen element.
-FullScreenDeniedNotFocusedTab=Request for full-screen was denied because requesting element is not in the currently focused tab.
-RemovedFullScreenElement=Exited full-screen because full-screen element was removed from document.
-FocusedWindowedPluginWhileFullScreen=Exited full-screen because windowed plugin was focused.
+FullscreenDeniedDisabled=Request for fullscreen was denied because Fullscreen API is disabled by user preference.
+FullscreenDeniedFocusedPlugin=Request for fullscreen was denied because a windowed plugin is focused.
+FullscreenDeniedHidden=Request for fullscreen was denied because the document is no longer visible.
+FullscreenDeniedContainerNotAllowed=Request for fullscreen was denied because at least one of the document's containing elements is not an iframe or does not have an "allowfullscreen" attribute.
+FullscreenDeniedNotInputDriven=Request for fullscreen was denied because Element.requestFullscreen() was not called from inside a short running user-generated event handler.
+FullscreenDeniedNotInDocument=Request for fullscreen was denied because requesting element is no longer in its document.
+FullscreenDeniedMovedDocument=Request for fullscreen was denied because requesting element has moved document.
+FullscreenDeniedLostWindow=Request for fullscreen was denied because we no longer have a window.
+FullscreenDeniedSubDocFullscreen=Request for fullscreen was denied because a subdocument of the document requesting fullscreen is already fullscreen.
+FullscreenDeniedNotDescendant=Request for fullscreen was denied because requesting element is not a descendant of the current fullscreen element.
+FullscreenDeniedNotFocusedTab=Request for fullscreen was denied because requesting element is not in the currently focused tab.
+RemovedFullscreenElement=Exited fullscreen because fullscreen element was removed from document.
+FocusedWindowedPluginWhileFullscreen=Exited fullscreen because windowed plugin was focused.
HTMLSyncXHRWarning=HTML parsing in XMLHttpRequest is not supported in the synchronous mode.
InvalidRedirectChannelWarning=Unable to redirect to %S because the channel doesn't implement nsIWritablePropertyBag2.
ResponseTypeSyncXHRWarning=Use of XMLHttpRequest's responseType attribute is no longer supported in the synchronous mode in window context.
WithCredentialsSyncXHRWarning=Use of XMLHttpRequest's withCredentials attribute is no longer supported in the synchronous mode in window context.
TimeoutSyncXHRWarning=Use of XMLHttpRequest's timeout attribute is not supported in the synchronous mode in window context.
JSONCharsetWarning=An attempt was made to declare a non-UTF-8 encoding for JSON retrieved using XMLHttpRequest. Only UTF-8 is supported for decoding JSON.
# LOCALIZATION NOTE: Do not translate AudioBufferSourceNode
MediaBufferSourceNodeResampleOutOfMemory=Insufficient memory to resample the AudioBufferSourceNode for playback.