Index: third_party/WebKit/Source/core/dom/Element.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
index 427788b9f362641bf5e07718973f50e949ee0e74..35cce75ba86cd5db87310476a440e63dad92e279 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -1901,6 +1901,9 @@ ShadowRoot* Element::createShadowRoot(const ScriptState* scriptState, ExceptionS |
exceptionState.throwDOMException(InvalidStateError, "Shadow root cannot be created on a host which already hosts an user-agent shadow tree."); |
return nullptr; |
} |
+ } else if (alwaysCreateUserAgentShadowRoot()) { |
+ exceptionState.throwDOMException(InvalidStateError, "Shadow root cannot be created on a host which already hosts an user-agent shadow tree."); |
+ return nullptr; |
} |
document().setShadowCascadeOrder(ShadowCascadeOrder::ShadowCascadeV0); |