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

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

Issue 1157463002: Simplify UnicodeRangeToken handling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 years, 7 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 | « Source/core/css/parser/CSSParserValues.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 92ad1ec0ffb497ff18b4964cfd079da71c7c920a..659d515efef886fe2973eb0c0bdc942d2a829d58 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -4791,13 +4791,11 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFaceUnicodeRang
if (!current || current->unit != CSSParserValue::UnicodeRange)
return nullptr;
- CSSParserValue* start = current->valueList->valueAt(0);
- CSSParserValue* end = current->valueList->valueAt(1);
- ASSERT(start->unit == CSSPrimitiveValue::CSS_NUMBER);
- ASSERT(end->unit == CSSPrimitiveValue::CSS_NUMBER);
- if (start->fValue > end->fValue)
+ UChar32 start = current->m_unicodeRange.start;
+ UChar32 end = current->m_unicodeRange.end;
+ if (start > end)
return nullptr;
- values->append(CSSUnicodeRangeValue::create(start->fValue, end->fValue));
+ values->append(CSSUnicodeRangeValue::create(start, end));
m_valueList->next();
} while (consumeComma(m_valueList));
« no previous file with comments | « Source/core/css/parser/CSSParserValues.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698