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

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

Issue 1869773004: Move shadowCascadeOrder to Document from StyleEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ASSERT and insert DCHECK_NE 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index e395f5019c5109fd4935bca12118138f2ae34e32..f8ae24c5cf94efb34d2df18322ba2dda0b63a7b0 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5962,6 +5962,24 @@ void Document::enforceStrictMixedContentChecking()
frame()->loader().client()->didEnforceStrictMixedContentChecking();
}
+void Document::setShadowCascadeOrder(ShadowCascadeOrder order)
+{
+ DCHECK_NE(order, ShadowCascadeOrder::ShadowCascadeNone);
+
+ if (order == m_shadowCascadeOrder)
+ return;
+
+ if (order == ShadowCascadeOrder::ShadowCascadeV0)
+ m_mayContainV0Shadow = true;
+
+ // For V0 -> V1 upgrade, we need style recalculation for the whole document.
+ if (m_shadowCascadeOrder == ShadowCascadeOrder::ShadowCascadeV0 && order == ShadowCascadeOrder::ShadowCascadeV1)
+ this->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::Shadow));
+
+ if (order > m_shadowCascadeOrder)
+ m_shadowCascadeOrder = order;
+}
+
LayoutViewItem Document::layoutViewItem() const
{
return LayoutViewItem(m_layoutView);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698