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

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

Issue 1803933002: Use correct cascading order for Shadow DOM v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix enum Created 4 years, 9 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 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;
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentOrderedList.h ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698