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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 1835403003: Allow number-percentage calc() in border-image-slice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another approach Created 4 years, 8 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
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index f22d087d3a5e2aa4b325bde047ed67d1d604a5d7..7217b80a719762f66aeb9296d386f2760b86c335 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -2737,9 +2737,7 @@ static CSSValue* consumeBorderImageSlice(CSSPropertyID property, CSSParserTokenR
CSSPrimitiveValue* slices[4] = { 0 };
for (size_t index = 0; index < 4; ++index) {
- CSSPrimitiveValue* value = consumePercent(range, ValueRangeNonNegative);
- if (!value)
- value = consumeNumber(range, ValueRangeNonNegative);
+ CSSPrimitiveValue* value = consumeNumberOrPercent(range, ValueRangeNonNegative);
if (!value)
break;
slices[index] = value;

Powered by Google App Engine
This is Rietveld 408576698