diff --git a/b2g/chrome/content/shell.js b/b2g/chrome/content/shell.js index 16698ce2bc7..cea5b7ae7c9 100644 --- a/b2g/chrome/content/shell.js +++ b/b2g/chrome/content/shell.js @@ -158,7 +158,7 @@ var shell = { let manifestURL = this.manifestURL; // let browserFrame = @@ -166,7 +166,7 @@ var shell = { browserFrame.setAttribute('id', 'homescreen'); browserFrame.setAttribute('mozbrowser', 'true'); browserFrame.setAttribute('mozapp', manifestURL); - browserFrame.setAttribute('mozallowfullscreen', 'true'); + browserFrame.setAttribute('allowfullscreen', 'true'); browserFrame.setAttribute('style', "overflow: hidden; -moz-box-flex: 1; border: none;"); browserFrame.setAttribute('src', "data:text/html;charset=utf-8,%3C!DOCTYPE html>%3Cbody style='background:black;"); document.getElementById('shell').appendChild(browserFrame); diff --git a/browser/base/content/test/test_contextmenu.html b/browser/base/content/test/test_contextmenu.html index 25449c4c9b1..cece6183499 100644 --- a/browser/base/content/test/test_contextmenu.html +++ b/browser/base/content/test/test_contextmenu.html @@ -880,7 +880,7 @@ function startTest() { return; } - subwindow.mozAllowFullScreen = true; + subwindow.allowfullscreen = true; lastElement = null; text = subwindow.document.getElementById("test-text"); diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index f3058d49d0e..c709ad0ddfd 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -9058,7 +9058,7 @@ nsDocument::IsFullScreenEnabled(bool aCallerIsChrome, bool aLogFailure) return false; } - // Ensure that all ancestor + Mozilla Bug 697636

diff --git a/content/html/content/test/file_fullscreen-navigation.html b/content/html/content/test/file_fullscreen-navigation.html index e38a7b3850c..dc72239c359 100644 --- a/content/html/content/test/file_fullscreen-navigation.html +++ b/content/html/content/test/file_fullscreen-navigation.html @@ -10,7 +10,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=685402 - + Mozilla Bug 685402

diff --git a/content/html/content/test/file_fullscreen-rollback.html b/content/html/content/test/file_fullscreen-rollback.html index 670fc9b690c..6365d49e4f4 100644 --- a/content/html/content/test/file_fullscreen-rollback.html +++ b/content/html/content/test/file_fullscreen-rollback.html @@ -26,7 +26,7 @@ Tests:
- +
diff --git a/content/html/content/test/test_fullscreen-api.html b/content/html/content/test/test_fullscreen-api.html index 3b82387b9ef..32ea5c0e98a 100644 --- a/content/html/content/test/test_fullscreen-api.html +++ b/content/html/content/test/test_fullscreen-api.html @@ -31,7 +31,7 @@ SpecialPowers.setBoolPref("full-screen-api.enabled", true); SpecialPowers.setBoolPref("full-screen-api.allow-trusted-requests-only", false); // Run the tests which go full-screen in new windows, as mochitests normally -// run in an iframe, which by default will not have the mozallowfullscreen +// run in an iframe, which by default will not have the allowfullscreen // attribute set, so full-screen won't work. var gTestWindows = [ "file_fullscreen-rollback.html", diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index dfdbb39c91f..ec86372b4c6 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -2150,8 +2150,8 @@ nsDocShell::GetFullscreenAllowed(bool* aFullscreenAllowed) *aFullscreenAllowed = false; // For non-content boundaries, check that the enclosing iframe element - // has the mozallowfullscreen attribute set to true. If any ancestor - // iframe does not have mozallowfullscreen=true, then fullscreen is + // has the allowfullscreen attribute set to true. If any ancestor + // iframe does not have allowfullscreen=true, then fullscreen is // prohibited. nsCOMPtr win = do_GetInterface(GetAsSupports(this)); if (!win) { @@ -2160,12 +2160,13 @@ nsDocShell::GetFullscreenAllowed(bool* aFullscreenAllowed) nsCOMPtr frameElement = do_QueryInterface(win->GetFrameElementInternal()); if (frameElement && frameElement->IsHTML(nsGkAtoms::iframe) && + !frameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) && !frameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen)) { return NS_OK; } // If we have no parent then we're the root docshell; no ancestor of the - // original docshell doesn't have a mozallowfullscreen attribute, so + // original docshell doesn't have a allowfullscreen attribute, so // report fullscreen as allowed. nsCOMPtr dsti = do_GetInterface(GetAsSupports(this)); NS_ENSURE_TRUE(dsti, NS_OK); diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index 6e40493b934..d70d1ce146a 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -772,14 +772,14 @@ protected: // mFullscreenAllowed stores how we determine whether fullscreen is allowed // when GetFullscreenAllowed() is called. Fullscreen is allowed in a - // docshell when all containing iframes have the mozallowfullscreen + // docshell when all containing iframes have the allowfullscreen // attribute set to true. When mFullscreenAllowed is CHECK_ATTRIBUTES - // we check this docshell's containing frame for the mozallowfullscreen + // we check this docshell's containing frame for the allowfullscreen // attribute, and recurse onto the parent docshell to ensure all containing - // frames also have the mozallowfullscreen attribute. If we find an ancestor + // frames also have the allowfullscreen attribute. If we find an ancestor // docshell with mFullscreenAllowed not equal to CHECK_ATTRIBUTES, we've // reached a content boundary, and mFullscreenAllowed denotes whether the - // parent across the content boundary has mozallowfullscreen=true in all its + // parent across the content boundary has allowfullscreen=true in all its // containing iframes. mFullscreenAllowed defaults to CHECK_ATTRIBUTES and // is set otherwise when docshells which are content boundaries are created. enum FullscreenAllowedState { diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl index d7188ffc1d4..7d73aea5005 100644 --- a/docshell/base/nsIDocShell.idl +++ b/docshell/base/nsIDocShell.idl @@ -690,10 +690,10 @@ interface nsIDocShell : nsISupports /** * Attribute that determines whether fullscreen is allowed to be entered for * this subtree of the docshell tree. This is true when all iframes containing - * this docshell have their "mozallowfullscreen" attribute set to "true". + * this docshell have their "allowfullscreen" attribute set to "true". * fullscreenAllowed is only writable at content boundaries, where it is used * to propagate the value of the cross process parent's iframe's - * "mozallowfullscreen" attribute to the child process. Setting + * "allowfullscreen" attribute to the child process. Setting * fullscreenAllowed on docshells which aren't content boundaries throws an * exception. */ diff --git a/dom/browser-element/BrowserElementParent.js b/dom/browser-element/BrowserElementParent.js index 3b9e0726acf..020707c93bb 100644 --- a/dom/browser-element/BrowserElementParent.js +++ b/dom/browser-element/BrowserElementParent.js @@ -371,9 +371,10 @@ BrowserElementParent.prototype = { _recvGetName: function(data) { return this._frameElement.getAttribute('name'); }, - + _recvGetFullscreenAllowed: function(data) { - return this._frameElement.hasAttribute('mozallowfullscreen'); + return this._frameElement.hasAttribute('allowfullscreen') || + this._frameElement.hasAttribute('mozallowfullscreen'); }, _fireCtxMenuEvent: function(data) { diff --git a/dom/interfaces/core/nsIDOMDocument.idl b/dom/interfaces/core/nsIDOMDocument.idl index d8c4c60bb9e..ff7d91c41cd 100644 --- a/dom/interfaces/core/nsIDOMDocument.idl +++ b/dom/interfaces/core/nsIDOMDocument.idl @@ -353,7 +353,7 @@ interface nsIDOMDocument : nsIDOMNode /** * Denotes whether the full-screen-api.enabled is true, no windowed * plugins are present, and all ancestor documents have the - * mozallowfullscreen attribute set. + * allowfullscreen attribute set. * * @see */ diff --git a/dom/interfaces/html/nsIDOMHTMLIFrameElement.idl b/dom/interfaces/html/nsIDOMHTMLIFrameElement.idl index 4fc45abbd51..719da91062b 100644 --- a/dom/interfaces/html/nsIDOMHTMLIFrameElement.idl +++ b/dom/interfaces/html/nsIDOMHTMLIFrameElement.idl @@ -16,7 +16,7 @@ * http://www.whatwg.org/specs/web-apps/current-work/ */ -[scriptable, uuid(52f6244b-b1f5-4f4c-8ff3-7e146316f411)] +[scriptable, uuid(a7bd1e34-3969-47ae-8c1d-2970132ba925)] interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement { attribute DOMString align; @@ -35,8 +35,8 @@ interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement attribute DOMString sandbox; // Mozilla extensions - // iframe elements require the mozAllowFullScreen attribute to be present + // iframe elements require the allowfullscreen attribute to be present // if they're to allow content in the sub document to go into DOM full-screen // mode. See https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI - attribute boolean mozAllowFullScreen; + attribute boolean allowfullscreen; }; diff --git a/dom/locales/en-US/chrome/dom/dom.properties b/dom/locales/en-US/chrome/dom/dom.properties index 4cccdd04d91..1d556c6194e 100644 --- a/dom/locales/en-US/chrome/dom/dom.properties +++ b/dom/locales/en-US/chrome/dom/dom.properties @@ -72,7 +72,7 @@ FullScreenDeniedBlocked=Request for full-screen was denied because this domain h 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. -FullScreenDeniedIframeDisallowed=Request for full-screen was denied because at least one of the document's containing iframes does not have a "mozallowfullscreen" attribute. +FullScreenDeniedIframeDisallowed=Request for full-screen was denied because at least one of the document's containing iframes 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. diff --git a/dom/tests/mochitest/pointerlock/file_allowPointerLockSandboxFlag.html b/dom/tests/mochitest/pointerlock/file_allowPointerLockSandboxFlag.html index db1f4aaaf33..5cef661c48c 100644 --- a/dom/tests/mochitest/pointerlock/file_allowPointerLockSandboxFlag.html +++ b/dom/tests/mochitest/pointerlock/file_allowPointerLockSandboxFlag.html @@ -18,7 +18,7 @@ Mozilla Bug 784402

- diff --git a/dom/tests/mochitest/pointerlock/test_pointerlock-api.html b/dom/tests/mochitest/pointerlock/test_pointerlock-api.html index 3ed53a30ec4..7c63ac8abe4 100644 --- a/dom/tests/mochitest/pointerlock/test_pointerlock-api.html +++ b/dom/tests/mochitest/pointerlock/test_pointerlock-api.html @@ -20,7 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=633602 /** * Pointer Lock tests for bug 633602. These depend on the fullscreen api * which doesn't work when run in the mochitests' iframe, since the - * mochitests' iframe doesn't have a mozallowfullscreen attribute. To get + * mochitests' iframe doesn't have an allowfullscreen attribute. To get * around this, all tests are run in a child window, which can go fullscreen. * This method is borrowed from content/html/content/test/test_fullscreen-api.html. **/ @@ -36,10 +36,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=633602 // Grant "fullscreen" permission on the test domain. This means fullscreen will be // automatically approved, so pointer lock in the tests will be too. SpecialPowers.setFullscreenAllowed(document); - + // Run the tests which go full-screen in new window, as Mochitests // normally run in an iframe, which by default will not have the - // mozallowfullscreen attribute set, so full-screen won't work. + // allowfullscreen attribute set, so full-screen won't work. var gTestFiles = [ "file_approval.html", "file_screenClientXYConst.html", @@ -72,11 +72,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=633602 function finish() { SpecialPowers.clearUserPref("full-screen-api.enabled"); - SpecialPowers.clearUserPref("full-screen-api.allow-trusted-requests-only"); + SpecialPowers.clearUserPref("full-screen-api.allow-trusted-requests-only"); SpecialPowers.removeFullscreenAllowed(document) SimpleTest.finish(); } - + function nextTest() { if (isWinXP) { todo(false, "Can't reliably run full-screen tests on Windows XP due to bug 704010");