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 960c8a3a28a5fbb1221c8bacf4be72b22c6b0fcc..08c99827126ee6d97a6d1f7fc83b58466c01ff55 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -1906,6 +1906,8 @@ PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(const ScriptState* |
return nullptr; |
} |
} |
+ document().styleEngine().setShadowCascadeOrder(ShadowCascadeOrder::ShadowCascadeV0); |
+ |
return createShadowRootInternal(ShadowRootType::V0, exceptionState); |
} |
@@ -1944,6 +1946,8 @@ PassRefPtrWillBeRawPtr<ShadowRoot> Element::attachShadow(const ScriptState* scri |
return nullptr; |
} |
+ document().styleEngine().setShadowCascadeOrder(ShadowCascadeOrder::ShadowCascadeV1); |
+ |
ShadowRootType type = ShadowRootType::V0; |
if (shadowRootInitDict.hasMode()) |
type = shadowRootInitDict.mode() == "open" ? ShadowRootType::Open : ShadowRootType::Closed; |