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

Unified Diff: Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl

Issue 141763003: Allow counter-reset/increment: none. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added assert. Created 6 years, 11 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 | « LayoutTests/fast/css/counter-none-expected.htm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
diff --git a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
index 87f4b581a09e63550590402feb1e681dbc117d29..47dd7dbf8625a9f1a8b0f96b9f8070f30d051a62 100644
--- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
+++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
@@ -312,11 +312,6 @@ namespace WebCore {
{{ declare_value_function(property_id) }}
{
- if (!value->isValueList())
- return;
-
- CSSValueList* list = toCSSValueList(value);
-
CounterDirectiveMap& map = state.style()->accessCounterDirectives();
typedef CounterDirectiveMap::iterator Iterator;
@@ -324,6 +319,13 @@ namespace WebCore {
for (Iterator it = map.begin(); it != end; ++it)
it->value.clear{{action}}();
+ if (!value->isValueList()) {
+ ASSERT(value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone);
+ return;
+ }
+
+ CSSValueList* list = toCSSValueList(value);
+
int length = list ? list->length() : 0;
for (int i = 0; i < length; ++i) {
CSSValue* currValue = list->itemWithoutBoundsCheck(i);
« no previous file with comments | « LayoutTests/fast/css/counter-none-expected.htm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698