WebKit Bugzilla
Attachment 361715 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
bug-194516-20190211152443.patch (text/plain), 4.91 KB, created by
Jer Noble
on 2019-02-11 15:24:44 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2019-02-11 15:24:44 PST
Size:
4.91 KB
patch
obsolete
>Subversion Revision: 241104 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 973bd061fe7961c76c7cb88742bafb6d73a3994d..ebab0b9a751b40f619d3079a1ee6a738b881c8b7 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 NOBODY (OOPS!). >+ >+ 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-01-22 Jer Noble <jer.noble@apple.com> > > [Cocoa] Media elements will restart network buffering just before suspending >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 ca65763731d33e5b533363a3dd5e0cc982537f17..df45612aa133a1911fea0d959e6e23a7225b09c8 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+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 NOBODY (OOPS!). >+ >+ * fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor-expected.txt: Added. >+ * fast/shadow-dom/fullscreen-in-shadow-full-screen-ancestor.html: Added. >+ > 2019-02-06 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] PrivateName to PublicName hash table is wasteful >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>
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