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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl

Issue 1376573004: Split out Color from CSSPrimitiveValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_property
Patch Set: Rebase and review feedback Created 5 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 | « no previous file | third_party/WebKit/Source/core/animation/ColorInterpolationType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
index 5ed359d8e2b12ba2afd352d8e2776fabff412197..bbee50cec4ee6b622c9d1b8b028fe4d338d29e29 100644
--- a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
@@ -515,17 +515,14 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
if (value->isURIValue()) {
paintType = SVG_PAINTTYPE_URI;
url = toCSSURIValue(value)->value();
+ } else if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone) {
+ paintType = url.isEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE;
+ } else if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueCurrentcolor) {
+ color = state.style()->color();
+ paintType = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR : SVG_PAINTTYPE_URI_CURRENTCOLOR;
} else {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueNone) {
- paintType = url.isEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE;
- } else if (primitiveValue->getValueID() == CSSValueCurrentcolor) {
- color = state.style()->color();
- paintType = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR : SVG_PAINTTYPE_URI_CURRENTCOLOR;
- } else {
- color = StyleBuilderConverter::convertColor(state, *primitiveValue);
- paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_RGBCOLOR;
- }
+ color = StyleBuilderConverter::convertColor(state, *value);
+ paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_RGBCOLOR;
}
{{set_value(property)}}(paintType, color, url,
state.applyPropertyToRegularStyle(),
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/ColorInterpolationType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698