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

Unified Diff: Source/core/css/resolver/StyleBuilderConverter.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: Rebase and review feedback 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
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleBuilderConverter.cpp
diff --git a/Source/core/css/resolver/StyleBuilderConverter.cpp b/Source/core/css/resolver/StyleBuilderConverter.cpp
index 616a239f2fe5ac2bb03a95dedac3ee6f68a82d01..1428e3e4e1c138dc19e631c306c50c3f94e140ed 100644
--- a/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -469,6 +469,7 @@ void StyleBuilderConverter::convertGridTrackList(CSSValue* value, Vector<GridTra
for (auto& currValue : *toCSSValueList(value)) {
if (currValue->isGridLineNamesValue()) {
for (auto& namedGridLineValue : toCSSGridLineNamesValue(*currValue)) {
+ ASSERT(toCSSPrimitiveValue(namedGridLineValue.get())->isCustomIdent());
String namedGridLine = toCSSPrimitiveValue(namedGridLineValue.get())->getStringValue();
NamedGridLinesMap::AddResult result = namedGridLines.add(namedGridLine, Vector<size_t>());
result.storedValue->value.append(currentNamedGridLine);
@@ -740,13 +741,15 @@ PassRefPtr<QuotesData> StyleBuilderConverter::convertQuotes(StyleResolverState&,
for (size_t i = 0; i < list->length(); i += 2) {
CSSValue* first = list->item(i);
CSSValue* second = list->item(i + 1);
+ ASSERT(toCSSPrimitiveValue(first)->isString());
+ ASSERT(toCSSPrimitiveValue(second)->isString());
String startQuote = toCSSPrimitiveValue(first)->getStringValue();
String endQuote = toCSSPrimitiveValue(second)->getStringValue();
quotes->addPair(std::make_pair(startQuote, endQuote));
}
return quotes.release();
}
- // FIXME: We should assert we're a primitive value with valueID = CSSValueNone
+ ASSERT(value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone);
return QuotesData::create();
}
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698