Title: [241510] branches/safari-607-branch
- Revision
- 241510
- Author
- [email protected]
- Date
- 2019-02-14 00:34:51 -0800 (Thu, 14 Feb 2019)
Log Message
Cherry-pick r241484. rdar://problem/48065620
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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-607-branch/LayoutTests/ChangeLog (241509 => 241510)
--- branches/safari-607-branch/LayoutTests/ChangeLog 2019-02-14 08:34:48 UTC (rev 241509)
+++ branches/safari-607-branch/LayoutTests/ChangeLog 2019-02-14 08:34:51 UTC (rev 241510)
@@ -1,5 +1,45 @@
2019-02-13 Babak Shafiei <[email protected]>
+ Cherry-pick r241484. rdar://problem/48065620
+
+ 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:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-02-13 Jer Noble <[email protected]>
+
+ 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-13 Babak Shafiei <[email protected]>
+
Cherry-pick r241481. rdar://problem/48065616
Encrypted PDFs inside <embed> or <object> crash the Web Content process
Added: branches/safari-607-branch/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt (0 => 241510)
--- branches/safari-607-branch/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt (rev 0)
+++ branches/safari-607-branch/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt 2019-02-14 08:34:51 UTC (rev 241510)
@@ -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: branches/safari-607-branch/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html (0 => 241510)
--- branches/safari-607-branch/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html (rev 0)
+++ branches/safari-607-branch/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html 2019-02-14 08:34:51 UTC (rev 241510)
@@ -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: branches/safari-607-branch/LayoutTests/platform/ios-wk2/TestExpectations (241509 => 241510)
--- branches/safari-607-branch/LayoutTests/platform/ios-wk2/TestExpectations 2019-02-14 08:34:48 UTC (rev 241509)
+++ branches/safari-607-branch/LayoutTests/platform/ios-wk2/TestExpectations 2019-02-14 08:34:51 UTC (rev 241510)
@@ -1012,6 +1012,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: branches/safari-607-branch/Source/WebCore/ChangeLog (241509 => 241510)
--- branches/safari-607-branch/Source/WebCore/ChangeLog 2019-02-14 08:34:48 UTC (rev 241509)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog 2019-02-14 08:34:51 UTC (rev 241510)
@@ -1,5 +1,49 @@
2019-02-13 Babak Shafiei <[email protected]>
+ Cherry-pick r241484. rdar://problem/48065620
+
+ 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:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-02-13 Jer Noble <[email protected]>
+
+ 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-13 Babak Shafiei <[email protected]>
+
Cherry-pick r241480. rdar://problem/48065618
Further restricting webarchive loads
Modified: branches/safari-607-branch/Source/WebCore/dom/Element.cpp (241509 => 241510)
--- branches/safari-607-branch/Source/WebCore/dom/Element.cpp 2019-02-14 08:34:48 UTC (rev 241509)
+++ branches/safari-607-branch/Source/WebCore/dom/Element.cpp 2019-02-14 08:34:51 UTC (rev 241510)
@@ -3418,7 +3418,9 @@
static Element* parentCrossingFrameBoundaries(Element* element)
{
ASSERT(element);
- return element->parentElement() ? element->parentElement() : element->document().ownerElement();
+ if (auto* parent = element->parentElementInComposedTree())
+ return parent;
+ return element->document().ownerElement();
}
void Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(bool flag)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes