[Webkit-unassigned] [Bug 222657] adoptNode() discards native shadow DOM roots, breaking several input and media elements
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Mar 4 22:54:02 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=222657
--- Comment #7 from Ryosuke Niwa <rniwa at webkit.org> ---
This is the fix:
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index e1d903331b07..291964180f72 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -4290,7 +4290,10 @@ void HTMLMediaElement::ensureMediaControlsShadowRoot()
return;
m_creatingControls = true;
- ensureUserAgentShadowRoot();
+ if (auto shadowRoot = userAgentShadowRoot(); shadowRoot && !shadowRoot->hasChildNodes())
+ didAddUserAgentShadowRoot(*shadowRoot);
+ else
+ ensureUserAgentShadowRoot();
m_creatingControls = false;
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210305/c2bcd054/attachment.htm>
More information about the webkit-unassigned
mailing list