diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-12 09:27:39 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-12 09:27:39 +0200 |
commit | 3749d61e1f7a59f5ec5067e560af1eb610c82015 (patch) | |
tree | 73dc228333948738bbe02976cacca8cd382bc978 /Source/WebCore/dom/ShadowRoot.cpp | |
parent | b32b4dcd9a51ab8de6afc53d9e17f8707e1f7a5e (diff) | |
download | qtwebkit-3749d61e1f7a59f5ec5067e560af1eb610c82015.tar.gz |
Imported WebKit commit a77350243e054f3460d1137301d8b3faee3d2052 (http://svn.webkit.org/repository/webkit/trunk@125365)
New snapshot with build fixes for latest API changes in Qt and all WK1 Win MSVC fixes upstream
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. |