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

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

Issue 1853713002: Fixed ::slotted performance in pure v1 shadow documents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing Member<> in HeapVector template 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index 6e10d0a669856f096c4619b06d57cf270511920e..986e787de3d78efb077c212d4ac39e35f5b01cdc 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -727,14 +727,20 @@ void StyleEngine::setStatsEnabled(bool enabled)
void StyleEngine::setShadowCascadeOrder(ShadowCascadeOrder order)
{
- if (order <= m_shadowCascadeOrder)
+ ASSERT(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)
document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::Shadow));
- m_shadowCascadeOrder = order;
+ if (order > m_shadowCascadeOrder)
+ m_shadowCascadeOrder = order;
kochi 2016/04/04 04:48:09 Aha, good catch! createShadowRoot() could set this
}
void StyleEngine::setPreferredStylesheetSetNameIfNotSet(const String& name)
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698