Title: [241531] releases/WebKitGTK/webkit-2.24
- Revision
- 241531
- Author
- carlo...@webkit.org
- Date
- 2019-02-14 03:28:03 -0800 (Thu, 14 Feb 2019)
Log Message
Merge r241484 - Entering fullscreen inside a shadow root will not set fullscreen pseudoclasses outside of root
https://bugs.webkit.org/show_bug.cgi?id=194516
<rdar://problem/44678353>
Reviewed by Antoine Quint.
Source/WebCore:
Test: fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html
When walking up the element ancestor chain, use parentElementInComposedTree() to
walk past the shadow root boundary.
* dom/Element.cpp:
(WebCore::parentCrossingFrameBoundaries):
LayoutTests:
* fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt: Added.
* fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html: Added.
* platform/ios-wk2/TestExpectations:
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog (241530 => 241531)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-02-14 11:27:53 UTC (rev 241530)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-02-14 11:28:03 UTC (rev 241531)
@@ -1,3 +1,15 @@
+2019-02-13 Jer Noble <jer.no...@apple.com>
+
+ Entering fullscreen inside a shadow root will not set fullscreen pseudoclasses outside of root
+ https://bugs.webkit.org/show_bug.cgi?id=194516
+ <rdar://problem/44678353>
+
+ Reviewed by Antoine Quint.
+
+ * fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt: Added.
+ * fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html: Added.
+ * platform/ios-wk2/TestExpectations:
+
2019-02-12 Jiewen Tan <jiewen_...@apple.com>
Further restricting webarchive loads
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt (0 => 241531)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt 2019-02-14 11:28:03 UTC (rev 241531)
@@ -0,0 +1,10 @@
+Test that webkitFullscreenElement retargets the fullscreen element inside a shadow tree.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.querySelector(":-webkit-full-screen-ancestor") is document.documentElement
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Enter fullscreen
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html (0 => 241531)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html 2019-02-14 11:28:03 UTC (rev 241531)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div id="host"></div>
+<button>Enter fullscreen</button>
+<script src=""
+<script>
+
+description('Test that webkitFullscreenElement retargets the fullscreen element inside a shadow tree.');
+
+let shadowHost = document.getElementById('host');
+let shadowRoot = shadowHost.attachShadow({mode: 'closed'});
+shadowRoot.innerHTML = '<span>full screen content</span>';
+
+function goFullscreen() {
+ shadowRoot.querySelector('span').webkitRequestFullscreen();
+ setTimeout(function () {
+ if (done)
+ return;
+
+ testFailed('webkitfullscreenchange was not fired');
+ finishJSTest();
+ }, 2000);
+}
+
+let done = false;
+function finalizeTest() {
+ if (done)
+ return;
+ done = true;
+
+ shouldBe('document.querySelector(":-webkit-full-screen-ancestor")', 'document.documentElement');
+ finishJSTest();
+}
+
+shadowRoot.addEventListener('webkitfullscreenchange', finalizeTest);
+document.addEventListener('fullscreenchange', finalizeTest); // Standard fullscreenchange only fires at document level.
+
+let button = document.querySelector('button');
+button._onclick_ = goFullscreen;
+
+if (window.eventSender) {
+ jsTestIsAsync = true;
+ eventSender.mouseMoveTo(button.offsetLeft + 5, button.offsetTop + 5);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+}
+
+</script>
+</body>
+</html>
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/platform/ios-wk2/TestExpectations (241530 => 241531)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/platform/ios-wk2/TestExpectations 2019-02-14 11:27:53 UTC (rev 241530)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/platform/ios-wk2/TestExpectations 2019-02-14 11:28:03 UTC (rev 241531)
@@ -1009,6 +1009,7 @@
imported/blink/editing/selection/selectstart-event-crash.html [ Skip ]
fast/dom/Window/post-message-user-action.html [ Skip ]
fast/images/image-usemap-parsing.html [ Skip ]
+fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html [ Skip ]
fast/shadow-dom/fullscreen-in-shadow-fullscreenElement.html [ Skip ]
fast/shadow-dom/fullscreen-in-shadow-webkitCurrentFullScreenElement.html [ Skip ]
fast/shadow-dom/fullscreen-in-slot-fullscreenElement.html [ Skip ]
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog (241530 => 241531)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-02-14 11:27:53 UTC (rev 241530)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-02-14 11:28:03 UTC (rev 241531)
@@ -1,3 +1,19 @@
+2019-02-13 Jer Noble <jer.no...@apple.com>
+
+ Entering fullscreen inside a shadow root will not set fullscreen pseudoclasses outside of root
+ https://bugs.webkit.org/show_bug.cgi?id=194516
+ <rdar://problem/44678353>
+
+ Reviewed by Antoine Quint.
+
+ Test: fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html
+
+ When walking up the element ancestor chain, use parentElementInComposedTree() to
+ walk past the shadow root boundary.
+
+ * dom/Element.cpp:
+ (WebCore::parentCrossingFrameBoundaries):
+
2019-02-12 Jiewen Tan <jiewen_...@apple.com>
Further restricting webarchive loads
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/dom/Element.cpp (241530 => 241531)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/dom/Element.cpp 2019-02-14 11:27:53 UTC (rev 241530)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/dom/Element.cpp 2019-02-14 11:28:03 UTC (rev 241531)
@@ -3408,7 +3408,9 @@
static Element* parentCrossingFrameBoundaries(const Element* element)
{
ASSERT(element);
- return element->parentElement() ? element->parentElement() : element->document().ownerElement();
+ if (auto* parent = element->parentElementInComposedTree())
+ return parent;
+ return element->document().ownerElement();
}
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes