Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1901403002: Remove UserAgent ShadowRoot + Author ShadowRoot code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Element::createShadowRoot, update some tests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698