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

Unified Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2631663002: Clean up ComputedStyleCSSValueMapping after change to ComputedStyle::getVariable() (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | 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/css/ComputedStyleCSSValueMapping.cpp
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
index 1c0ff85aee8f97a36381be5d1437a1b91bb77953..7a2f5486be031b2c5a5c377398182889b920dd08 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -1948,26 +1948,17 @@ const CSSValue* ComputedStyleCSSValueMapping::get(
const PropertyRegistry::Registration* registration =
registry->registration(customPropertyName);
if (registration) {
- const CSSValue* result = nullptr;
- if (registration->inherits()) {
- if (StyleInheritedVariables* variables = style.inheritedVariables())
- result = variables->registeredVariable(customPropertyName);
- } else {
- if (StyleNonInheritedVariables* variables =
- style.nonInheritedVariables())
- result = variables->registeredVariable(customPropertyName);
- }
+ const CSSValue* result = style.getRegisteredVariable(
+ customPropertyName, registration->inherits());
if (result)
return result;
return registration->initial();
}
}
- StyleInheritedVariables* variables = style.inheritedVariables();
- if (!variables)
- return nullptr;
-
- CSSVariableData* data = variables->getVariable(customPropertyName);
+ bool isInheritedProperty = true;
+ CSSVariableData* data =
+ style.getVariable(customPropertyName, isInheritedProperty);
if (!data)
return nullptr;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698