WebKit Bugzilla
Attachment 361939 Details for
Bug 194516
: Entering fullscreen inside a shadow root will not set fullscreen pseudoclasses outside of root
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-194516-20190213143128.patch (text/plain), 5.79 KB, created by
Jer Noble
on 2019-02-13 14:31:28 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2019-02-13 14:31:28 PST
Size:
5.79 KB
patch
obsolete
>Subversion Revision: 241299 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3de6940cb1f1cfd8713f59902f82b7c852e6efc3..5ee78186f966455f6dcf3b34670458d405f1edd4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-11 Jer Noble <jer.noble@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 Andy Estes <aestes@apple.com> > > [iOSMac] Enable Parental Controls Content Filtering >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index 9a9e4def6948c73488c8155473af1954f0c59eea..49a54da52728ead08917789cc27da9976a1e699f 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -3408,7 +3408,9 @@ bool Element::childShouldCreateRenderer(const Node& child) const > 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 > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 93ad21df62f1590e74f66e3634ccb91eeb55fa49..595523a4e0794744870954d3e92b98bf87410c68 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2019-02-11 Jer Noble <jer.noble@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 Adrian Perez de Castro <aperez@igalia.com> > > Unreviewed WPE gardening. Unskip content extensions tests after r241283 >diff --git a/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt b/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..0ab87379d8c1cde044111dc1cec8b256698c9d68 >--- /dev/null >+++ b/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt >@@ -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 >diff --git a/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html b/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html >new file mode 100644 >index 0000000000000000000000000000000000000000..eba1ce0b42dcb90dfdb77b913e3de61b7dff10fb >--- /dev/null >+++ b/LayoutTests/fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html >@@ -0,0 +1,51 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<div id="host"></div> >+<button>Enter fullscreen</button> >+<script src="../../resources/js-test.js"></script> >+<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> >diff --git a/LayoutTests/platform/ios-wk2/TestExpectations b/LayoutTests/platform/ios-wk2/TestExpectations >index 8dc1fb3fe08ddb2d20856bd78e92089b352f3e05..24e1eae8ce61ecf71784387aeacb957d15f80474 100644 >--- a/LayoutTests/platform/ios-wk2/TestExpectations >+++ b/LayoutTests/platform/ios-wk2/TestExpectations >@@ -1009,6 +1009,7 @@ fast/loader/location-hash-user-gesture.html [ Skip ] > 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 ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194516
:
361715
|
361741
| 361939