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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 1307673003: Made CSSPrimitiveValue::getString() only work for String types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@split_out_pair
Patch Set: Small fix Created 5 years, 4 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: Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index c2d215fd01073ec802f9a7f3afe27859db880db6..fa4afc3e40c824c33d01a3f120debdcc13c68314 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -769,10 +769,12 @@ void StyleBuilderFunctions::applyValueCSSPropertyContent(StyleResolverState& sta
void StyleBuilderFunctions::applyValueCSSPropertyWebkitLocale(StyleResolverState& state, CSSValue* value)
{
const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueAuto)
+ if (primitiveValue->getValueID() == CSSValueAuto) {
state.style()->setLocale(nullAtom);
- else
+ } else {
+ ASSERT(primitiveValue->isString());
state.style()->setLocale(AtomicString(primitiveValue->getStringValue()));
+ }
state.fontBuilder().setScript(state.style()->locale());
}

Powered by Google App Engine
This is Rietveld 408576698