diff options
Diffstat (limited to 'Source/WebCore/dom/ShadowRoot.cpp')
-rw-r--r-- | Source/WebCore/dom/ShadowRoot.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/WebCore/dom/ShadowRoot.cpp b/Source/WebCore/dom/ShadowRoot.cpp index 9e82ab2b4..b9c481c18 100644 --- a/Source/WebCore/dom/ShadowRoot.cpp +++ b/Source/WebCore/dom/ShadowRoot.cpp @@ -35,9 +35,12 @@ #include "Element.h" #include "ElementShadow.h" #include "HTMLContentElement.h" +#include "HTMLInputElement.h" #include "HTMLNames.h" +#include "HTMLTextAreaElement.h" #include "InsertionPoint.h" #include "NodeRareData.h" +#include "RuntimeEnabledFeatures.h" #include "SVGNames.h" #include "StyleResolver.h" #include "markup.h" @@ -75,6 +78,19 @@ ShadowRoot::~ShadowRoot() static bool allowsAuthorShadowRoot(Element* element) { +#if ENABLE(SHADOW_DOM) + if (RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled()) + return true; +#endif + + // FIXME: The elements in Shadow DOM of an input element assumes that they have renderer if the input + // element has a renderer. However, this does not hold until input elemnet is AuthorShadowDOM-ready. + // So we would like to prohibit having a AuthorShadowDOM for a while. The same thing happens to + // textarea element also. + // https://bugs.webkit.org/show_bug.cgi?id=92608 + if (isHTMLInputElement(element) || isHTMLTextAreaElement(element)) + return false; + // FIXME: We disable multiple shadow subtrees for SVG for while, because there will be problems to support it. // https://bugs.webkit.org/show_bug.cgi?id=78205 // Especially SVG TREF recreates shadow root dynamically. |