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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 2106073005: Add fast-path for propagated variable changes (WIP) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@+pointer_events_fastpath_5
Patch Set: Rebase Created 4 years, 1 month 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/css/resolver/StyleBuilderCustom.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index d4f085bcd3c6ff89be5f7899d8d47384ff08ba4d..90f91fdb85b1b0c9dc899b0a8b229d18ed181322 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -120,9 +120,13 @@ void StyleBuilder::applyProperty(CSSPropertyID id,
omitAnimationTainted);
applyProperty(id, state, *resolvedValue);
- if (!state.style()->hasVariableReferenceFromNonInheritedProperty() &&
- !CSSPropertyMetadata::isInheritedProperty(id))
+ // TODO(sashab): Clear this flag if all properties are set back to
+ // non-variable references.
+ if (CSSPropertyMetadata::isInheritedProperty(id))
+ state.style()->setHasVariableReferenceFromInheritedProperty();
+ else
state.style()->setHasVariableReferenceFromNonInheritedProperty();
+
return;
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSVariableData.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