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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2426323003: Invalidate properties registered as non-inherited for custom paint (Closed)
Patch Set: Created 4 years, 2 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/style/ComputedStyle.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/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 7fbcc82f295c4fe5a9262d0c67c628545fcaa9f0..08db13def869a7d84a2ab03df1efeb663de58b75 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1018,18 +1018,11 @@ bool ComputedStyle::diffNeedsPaintInvalidationObjectForPaintImage(
return true;
}
- if (inheritedVariables() || other.inheritedVariables()) {
+ if (inheritedVariables() || nonInheritedVariables() ||
+ other.inheritedVariables() || other.nonInheritedVariables()) {
meade_UTC10 2016/10/19 07:41:14 There are variables that aren't inherited or non-i
Timothy Loh 2016/10/20 06:05:17 There's just no function right now that checks whe
for (const AtomicString& property :
*value->customInvalidationProperties()) {
- CSSVariableData* thisVar =
- inheritedVariables() ? inheritedVariables()->getVariable(property)
- : nullptr;
- CSSVariableData* otherVar =
- other.inheritedVariables()
- ? other.inheritedVariables()->getVariable(property)
- : nullptr;
-
- if (!dataEquivalent(thisVar, otherVar))
+ if (!dataEquivalent(getVariable(property), other.getVariable(property)))
return true;
}
}
@@ -1780,6 +1773,18 @@ void ComputedStyle::removeNonInheritedVariable(const AtomicString& name) {
mutableNonInheritedVariables().removeVariable(name);
}
+CSSVariableData* ComputedStyle::getVariable(const AtomicString& name) const {
+ if (inheritedVariables()) {
+ if (CSSVariableData* variable = inheritedVariables()->getVariable(name))
+ return variable;
+ }
+ if (nonInheritedVariables()) {
+ if (CSSVariableData* variable = nonInheritedVariables()->getVariable(name))
+ return variable;
+ }
+ return nullptr;
+}
+
float ComputedStyle::wordSpacing() const {
return getFontDescription().wordSpacing();
}
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698