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

Unified Diff: Source/core/css/CSSParser-in.cpp

Issue 71253002: Eliminate "FractionConversion" from CSSPrimitiveValue::convertToLength (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 1 month 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/CSSCalculationValue.cpp ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParser-in.cpp
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp
index 0eb6b090ef03304d54efc9b6f834f83220f072c7..1235037b131ebf213cfeaeab684958727ab126cb 100644
--- a/Source/core/css/CSSParser-in.cpp
+++ b/Source/core/css/CSSParser-in.cpp
@@ -1093,7 +1093,7 @@ static bool parseKeywordValue(MutableStylePropertySet* declaration, CSSPropertyI
}
template <typename CharacterType>
-static bool parseTransformArguments(CSSTransformValue* transformValue, CharacterType* characters, unsigned length, unsigned start, unsigned expectedCount)
+static bool parseTransformTranslateArguments(CSSTransformValue* transformValue, CharacterType* characters, unsigned length, unsigned start, unsigned expectedCount)
{
while (expectedCount) {
size_t end = WTF::find(characters, length, expectedCount == 1 ? ')' : ',', start);
@@ -1106,7 +1106,7 @@ static bool parseTransformArguments(CSSTransformValue* transformValue, Character
return false;
if (unit != CSSPrimitiveValue::CSS_PX && (number || unit != CSSPrimitiveValue::CSS_NUMBER))
return false;
- transformValue->append(cssValuePool().createValue(number, unit));
+ transformValue->append(cssValuePool().createValue(number, CSSPrimitiveValue::CSS_PX));
start = end + 1;
--expectedCount;
}
@@ -1149,9 +1149,9 @@ static bool parseTranslateTransformValue(MutableStylePropertySet* properties, CS
RefPtr<CSSTransformValue> transformValue = CSSTransformValue::create(transformType);
bool success;
if (string.is8Bit())
- success = parseTransformArguments(transformValue.get(), string.characters8(), string.length(), argumentStart, expectedArgumentCount);
+ success = parseTransformTranslateArguments(transformValue.get(), string.characters8(), string.length(), argumentStart, expectedArgumentCount);
else
- success = parseTransformArguments(transformValue.get(), string.characters16(), string.length(), argumentStart, expectedArgumentCount);
+ success = parseTransformTranslateArguments(transformValue.get(), string.characters16(), string.length(), argumentStart, expectedArgumentCount);
if (!success)
return false;
RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
« no previous file with comments | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698