Diff
Modified: trunk/LayoutTests/ChangeLog (209729 => 209730)
--- trunk/LayoutTests/ChangeLog 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/LayoutTests/ChangeLog 2016-12-12 23:12:12 UTC (rev 209730)
@@ -1,3 +1,18 @@
+2016-12-12 Jer Noble <[email protected]>
+
+ Remove implementation of legacy Mozilla-based Fullscreen API.
+ https://bugs.webkit.org/show_bug.cgi?id=165689
+
+ Reviewed by Eric Carlson.
+
+ * fullscreen/full-screen-css-expected.txt:
+ * fullscreen/full-screen-css.html:
+ * fullscreen/full-screen-keyboard-disabled-expected.txt: Removed.
+ * fullscreen/full-screen-keyboard-disabled.html: Removed.
+ * fullscreen/full-screen-twice-expected.txt:
+ * fullscreen/full-screen-twice.html:
+ * js/dom/dom-static-property-for-in-iteration-expected.txt:
+
2016-12-12 Manuel Rego Casasnovas <[email protected]>
[css-grid] Add some test cases that were removed in r209562
Modified: trunk/LayoutTests/fullscreen/full-screen-css-expected.txt (209729 => 209730)
--- trunk/LayoutTests/fullscreen/full-screen-css-expected.txt 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/LayoutTests/fullscreen/full-screen-css-expected.txt 2016-12-12 23:12:12 UTC (rev 209730)
@@ -2,14 +2,14 @@
EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color') == 'rgba(0, 0, 0, 0)') OK
EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color') == 'rgb(0, 0, 0)') OK
EVENT(webkitfullscreenchange)
+EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLHtmlElement]') OK
+EXPECTED (document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color') == 'rgba(0, 0, 0, 0)') OK
+EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color') == 'rgb(0, 255, 0)') OK
+EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color') == 'rgb(0, 0, 255)') OK
+EVENT(webkitfullscreenchange)
EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLSpanElement]') OK
EXPECTED (document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color') == 'rgb(0, 255, 0)') OK
EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color') == 'rgb(255, 0, 0)') OK
EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color') == 'rgb(0, 0, 255)') OK
-EVENT(webkitfullscreenchange)
-EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLHtmlElement]') OK
-EXPECTED (document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color') == 'rgba(0, 0, 0, 0)') OK
-EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color') == 'rgb(0, 255, 0)') OK
-EXPECTED (document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color') == 'rgb(0, 0, 255)') OK
END OF TEST
Modified: trunk/LayoutTests/fullscreen/full-screen-css.html (209729 => 209730)
--- trunk/LayoutTests/fullscreen/full-screen-css.html 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/LayoutTests/fullscreen/full-screen-css.html 2016-12-12 23:12:12 UTC (rev 209730)
@@ -32,8 +32,7 @@
testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(255, 0, 0)");
testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 255)");
- callback = documentEnteredFullScreen;
- runWithKeyDown(function(){document.documentElement.webkitRequestFullScreen()});
+ endTest();
};
var documentEnteredFullScreen = function(event) {
@@ -41,10 +40,12 @@
testExpected("document.defaultView.getComputedStyle(span, null).getPropertyValue('background-color')", "rgba(0, 0, 0, 0)");
testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('background-color')", "rgb(0, 255, 0)");
testExpected("document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue('color')", "rgb(0, 0, 255)");
- endTest();
+
+ callback = spanEnteredFullScreen;
+ runWithKeyDown(function(){span.webkitRequestFullScreen()});
};
- callback = spanEnteredFullScreen;
- runWithKeyDown(function(){span.webkitRequestFullScreen()});
+ callback = documentEnteredFullScreen;
+ runWithKeyDown(function(){document.documentElement.webkitRequestFullScreen()});
}
</script>
Deleted: trunk/LayoutTests/fullscreen/full-screen-keyboard-disabled-expected.txt (209729 => 209730)
--- trunk/LayoutTests/fullscreen/full-screen-keyboard-disabled-expected.txt 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/LayoutTests/fullscreen/full-screen-keyboard-disabled-expected.txt 2016-12-12 23:12:12 UTC (rev 209730)
@@ -1,6 +0,0 @@
-EVENT(webkitfullscreenchange)
-EXPECTED (document.webkitIsFullScreen == 'true') OK
-EVENT(keypress)
-EXPECTED (event.keyCode == '32') OK
-END OF TEST
-This tests that full screen mode does not allow alphanumeric key events. Press space to continue, then press an alphanumeric key, followed by space.
Deleted: trunk/LayoutTests/fullscreen/full-screen-keyboard-disabled.html (209729 => 209730)
--- trunk/LayoutTests/fullscreen/full-screen-keyboard-disabled.html 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/LayoutTests/fullscreen/full-screen-keyboard-disabled.html 2016-12-12 23:12:12 UTC (rev 209730)
@@ -1,40 +0,0 @@
-<body>
-<script src=""
-<p>This tests that full screen mode does not allow alphanumeric key events. Press space to continue, then press an alphanumeric key, followed by space.
-<span></span>
-<script>
- // Bail out early if the full screen API is not enabled or is missing:
- if (Element.prototype.webkitRequestFullScreen == undefined) {
- logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
- endTest();
- } else {
- var callback;
- var fullscreenChanged = function(event)
- {
- if (callback)
- callback(event)
- };
- waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
-
- var spanEnteredFullScreen = function() {
- callback = null;
- testExpected("document.webkitIsFullScreen", true);
- if (window.testRunner && eventSender.keyDown) {
- waitForEvent(document, 'keypress', keyPressed);
- eventSender.keyDown('a', []);
- eventSender.keyDown(' ', []);
- }
- };
-
- var keyPressed = function(event) {
- testExpected('event.keyCode', 32); // Space
- endTest();
- document.webkitCancelFullScreen();
- }
- waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
-
- var span = document.getElementsByTagName('span')[0];
- callback = spanEnteredFullScreen;
- runWithKeyDown(function(){span.webkitRequestFullScreen()});
- }
-</script>
Modified: trunk/LayoutTests/fullscreen/full-screen-twice-expected.txt (209729 => 209730)
--- trunk/LayoutTests/fullscreen/full-screen-twice-expected.txt 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/LayoutTests/fullscreen/full-screen-twice-expected.txt 2016-12-12 23:12:12 UTC (rev 209730)
@@ -1,6 +1,6 @@
EVENT(webkitfullscreenchange)
+EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLHtmlElement]') OK
+EVENT(webkitfullscreenchange)
EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLSpanElement]') OK
-EVENT(webkitfullscreenchange)
-EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLHtmlElement]') OK
END OF TEST
Modified: trunk/LayoutTests/fullscreen/full-screen-twice.html (209729 => 209730)
--- trunk/LayoutTests/fullscreen/full-screen-twice.html 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/LayoutTests/fullscreen/full-screen-twice.html 2016-12-12 23:12:12 UTC (rev 209730)
@@ -20,16 +20,16 @@
var spanEnteredFullScreen = function() {
testExpected("document.webkitCurrentFullScreenElement", span);
callback = documentEnteredFullScreen;
- runWithKeyDown(function(){document.documentElement.webkitRequestFullScreen()});
+ endTest();
};
var documentEnteredFullScreen = function() {
testExpected("document.webkitCurrentFullScreenElement", document.documentElement);
- callback = null;
- endTest();
+ callback = spanEnteredFullScreen;
+ runWithKeyDown(function(){span.webkitRequestFullScreen()});
};
- callback = spanEnteredFullScreen;
- runWithKeyDown(function(){span.webkitRequestFullScreen()});
+ callback = documentEnteredFullScreen;
+ runWithKeyDown(function(){document.documentElement.webkitRequestFullScreen()});
}
</script>
Modified: trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt (209729 => 209730)
--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2016-12-12 23:12:12 UTC (rev 209730)
@@ -137,7 +137,6 @@
PASS a["lastElementChild"] is null
PASS a["childElementCount"] is 0
PASS a["assignedSlot"] is null
-PASS a["ALLOW_KEYBOARD_INPUT"] is 1
PASS a["nodeName"] is A
PASS a["nodeValue"] is null
PASS a["nodeType"] is 1
Modified: trunk/Source/WebCore/ChangeLog (209729 => 209730)
--- trunk/Source/WebCore/ChangeLog 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebCore/ChangeLog 2016-12-12 23:12:12 UTC (rev 209730)
@@ -1,3 +1,26 @@
+2016-12-12 Jer Noble <[email protected]>
+
+ Remove implementation of legacy Mozilla-based Fullscreen API.
+ https://bugs.webkit.org/show_bug.cgi?id=165689
+
+ Reviewed by Eric Carlson.
+
+ Alias the legacy webkitRequestFull_S_creen() function on Element to webkitRequestFull_s_creen().
+ Remove the custom behavior in Document::requestFullScreenForElement() to handle the legacy path.
+
+ * dom/Document.cpp:
+ (WebCore::Document::requestFullScreenForElement):
+ * dom/Document.h:
+ * dom/Element.cpp:
+ (WebCore::Element::webkitRequestFullscreen):
+ (WebCore::Element::webkitRequestFullScreen): Deleted.
+ * dom/Element.h:
+ * dom/Element.idl:
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::enterFullscreen):
+ * html/shadow/MediaControlElements.cpp:
+ (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
+
2016-12-12 Dave Hyatt <[email protected]>
[CSS Parser] MediaQueryParser should use Ref and not RefPtr
Modified: trunk/Source/WebCore/dom/Document.cpp (209729 => 209730)
--- trunk/Source/WebCore/dom/Document.cpp 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebCore/dom/Document.cpp 2016-12-12 23:12:12 UTC (rev 209730)
@@ -5572,12 +5572,8 @@
return isAttributeOnAllOwners(allowfullscreenAttr, webkitallowfullscreenAttr, element->document().ownerElement());
}
-void Document::requestFullScreenForElement(Element* element, unsigned short flags, FullScreenCheckType checkType)
+void Document::requestFullScreenForElement(Element* element, FullScreenCheckType checkType)
{
- // The Mozilla Full Screen API <https://wiki.mozilla.org/Gecko:FullScreenAPI> has different requirements
- // for full screen mode, and do not have the concept of a full screen element stack.
- bool inLegacyMozillaMode = (flags & Element::LEGACY_MOZILLA_REQUEST);
-
do {
if (!element)
element = documentElement();
@@ -5596,9 +5592,8 @@
break;
// The context object's node document fullscreen element stack is not empty and its top element
- // is not an ancestor of the context object. (NOTE: Ignore this requirement if the request was
- // made via the legacy Mozilla-style API.)
- if (!m_fullScreenElementStack.isEmpty() && !m_fullScreenElementStack.last()->contains(element) && !inLegacyMozillaMode)
+ // is not an ancestor of the context object.
+ if (!m_fullScreenElementStack.isEmpty() && !m_fullScreenElementStack.last()->contains(element))
break;
// A descendant browsing context's document has a non-empty fullscreen element stack.
@@ -5609,7 +5604,7 @@
break;
}
}
- if (descendentHasNonEmptyStack && !inLegacyMozillaMode)
+ if (descendentHasNonEmptyStack)
break;
// This algorithm is not allowed to show a pop-up:
@@ -5623,14 +5618,13 @@
if (!page() || !page()->settings().fullScreenEnabled())
break;
- if (!page()->chrome().client().supportsFullScreenForElement(element, flags & Element::ALLOW_KEYBOARD_INPUT)) {
+ bool hasKeyboardAccess = true;
+ if (!page()->chrome().client().supportsFullScreenForElement(element, hasKeyboardAccess)) {
// The new full screen API does not accept a "flags" parameter, so fall back to disallowing
// keyboard input if the chrome client refuses to allow keyboard input.
- if (!inLegacyMozillaMode && flags & Element::ALLOW_KEYBOARD_INPUT) {
- flags &= ~Element::ALLOW_KEYBOARD_INPUT;
- if (!page()->chrome().client().supportsFullScreenForElement(element, false))
- break;
- } else
+ hasKeyboardAccess = false;
+
+ if (!page()->chrome().client().supportsFullScreenForElement(element, hasKeyboardAccess))
break;
}
@@ -5682,7 +5676,7 @@
// 5. Return, and run the remaining steps asynchronously.
// 6. Optionally, perform some animation.
- m_areKeysEnabledInFullScreen = flags & Element::ALLOW_KEYBOARD_INPUT;
+ m_areKeysEnabledInFullScreen = hasKeyboardAccess;
page()->chrome().client().enterFullScreenForElement(element);
// 7. Optionally, display a message indicating how the user can exit displaying the context object fullscreen.
Modified: trunk/Source/WebCore/dom/Document.h (209729 => 209730)
--- trunk/Source/WebCore/dom/Document.h 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebCore/dom/Document.h 2016-12-12 23:12:12 UTC (rev 209730)
@@ -1095,7 +1095,7 @@
ExemptIFrameAllowFullScreenRequirement,
};
- void requestFullScreenForElement(Element*, unsigned short flags, FullScreenCheckType);
+ void requestFullScreenForElement(Element*, FullScreenCheckType);
WEBCORE_EXPORT void webkitCancelFullScreen();
WEBCORE_EXPORT void webkitWillEnterFullScreenForElement(Element*);
Modified: trunk/Source/WebCore/dom/Element.cpp (209729 => 209730)
--- trunk/Source/WebCore/dom/Element.cpp 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebCore/dom/Element.cpp 2016-12-12 23:12:12 UTC (rev 209730)
@@ -3051,14 +3051,9 @@
#if ENABLE(FULLSCREEN_API)
void Element::webkitRequestFullscreen()
{
- document().requestFullScreenForElement(this, ALLOW_KEYBOARD_INPUT, Document::EnforceIFrameAllowFullScreenRequirement);
+ document().requestFullScreenForElement(this, Document::EnforceIFrameAllowFullScreenRequirement);
}
-void Element::webkitRequestFullScreen(unsigned short flags)
-{
- document().requestFullScreenForElement(this, (flags | LEGACY_MOZILLA_REQUEST), Document::EnforceIFrameAllowFullScreenRequirement);
-}
-
bool Element::containsFullScreenElement() const
{
return hasRareData() && elementRareData()->containsFullScreenElement();
Modified: trunk/Source/WebCore/dom/Element.h (209729 => 209730)
--- trunk/Source/WebCore/dom/Element.h 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebCore/dom/Element.h 2016-12-12 23:12:12 UTC (rev 209730)
@@ -460,17 +460,9 @@
virtual void buildPendingResource() { };
#if ENABLE(FULLSCREEN_API)
- enum {
- ALLOW_KEYBOARD_INPUT = 1 << 0,
- LEGACY_MOZILLA_REQUEST = 1 << 1,
- };
-
- WEBCORE_EXPORT void webkitRequestFullScreen(unsigned short flags);
WEBCORE_EXPORT bool containsFullScreenElement() const;
void setContainsFullScreenElement(bool);
void setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(bool);
-
- // W3C API
WEBCORE_EXPORT void webkitRequestFullscreen();
#endif
Modified: trunk/Source/WebCore/dom/Element.idl (209729 => 209730)
--- trunk/Source/WebCore/dom/Element.idl 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebCore/dom/Element.idl 2016-12-12 23:12:12 UTC (rev 209730)
@@ -113,8 +113,7 @@
#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
// Mozilla version
- const unsigned short ALLOW_KEYBOARD_INPUT = 1;
- void webkitRequestFullScreen(optional unsigned short flags = 0);
+ [ImplementedAs=webkitRequestFullscreen] void webkitRequestFullScreen();
// W3C version
void webkitRequestFullscreen();
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (209729 => 209730)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-12-12 23:12:12 UTC (rev 209730)
@@ -5405,7 +5405,7 @@
#if ENABLE(FULLSCREEN_API)
if (document().settings()->fullScreenEnabled()) {
if (mode == VideoFullscreenModeStandard) {
- document().requestFullScreenForElement(this, 0, Document::ExemptIFrameAllowFullScreenRequirement);
+ document().requestFullScreenForElement(this, Document::ExemptIFrameAllowFullScreenRequirement);
return;
}
Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (209729 => 209730)
--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2016-12-12 23:12:12 UTC (rev 209730)
@@ -957,7 +957,7 @@
if (document().webkitIsFullScreen() && document().webkitCurrentFullScreenElement() == parentMediaElement(this))
document().webkitCancelFullScreen();
else
- document().requestFullScreenForElement(parentMediaElement(this), 0, Document::ExemptIFrameAllowFullScreenRequirement);
+ document().requestFullScreenForElement(parentMediaElement(this), Document::ExemptIFrameAllowFullScreenRequirement);
} else
#endif
mediaController()->enterFullscreen();
Modified: trunk/Source/WebKit/mac/ChangeLog (209729 => 209730)
--- trunk/Source/WebKit/mac/ChangeLog 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebKit/mac/ChangeLog 2016-12-12 23:12:12 UTC (rev 209730)
@@ -1,3 +1,14 @@
+2016-12-12 Jer Noble <[email protected]>
+
+ Remove implementation of legacy Mozilla-based Fullscreen API.
+ https://bugs.webkit.org/show_bug.cgi?id=165689
+ <rdar://problem/29603053>
+
+ Reviewed by Eric Carlson.
+
+ * DOM/DOMElement.mm:
+ (-[DOMElement webkitRequestFullScreen:]):
+
2016-12-10 Filip Pizlo <[email protected]>
The DOM should have an advancing wavefront opaque root barrier
Modified: trunk/Source/WebKit/mac/DOM/DOMElement.mm (209729 => 209730)
--- trunk/Source/WebKit/mac/DOM/DOMElement.mm 2016-12-12 23:11:29 UTC (rev 209729)
+++ trunk/Source/WebKit/mac/DOM/DOMElement.mm 2016-12-12 23:12:12 UTC (rev 209730)
@@ -442,7 +442,7 @@
- (void)webkitRequestFullScreen:(unsigned short)flags
{
JSMainThreadNullState state;
- unwrap(*self).webkitRequestFullScreen(flags);
+ unwrap(*self).webkitRequestFullscreen();
}
- (void)webkitRequestFullscreen