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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 1541443002: Fix small bugs in new CSS Property parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * Copyright (C) 2015 Google Inc. All rights reserved. 7 * Copyright (C) 2015 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 return cssValuePool().createIdentifierValue(CSSValueNone); 1040 return cssValuePool().createIdentifierValue(CSSValueNone);
1041 1041
1042 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 1042 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
1043 for (const auto& item : *map) { 1043 for (const auto& item : *map) {
1044 bool isValidCounterValue = propertyID == CSSPropertyCounterIncrement ? i tem.value.isIncrement() : item.value.isReset(); 1044 bool isValidCounterValue = propertyID == CSSPropertyCounterIncrement ? i tem.value.isIncrement() : item.value.isReset();
1045 if (!isValidCounterValue) 1045 if (!isValidCounterValue)
1046 continue; 1046 continue;
1047 1047
1048 list->append(CSSCustomIdentValue::create(item.key)); 1048 list->append(CSSCustomIdentValue::create(item.key));
1049 short number = propertyID == CSSPropertyCounterIncrement ? item.value.in crementValue() : item.value.resetValue(); 1049 short number = propertyID == CSSPropertyCounterIncrement ? item.value.in crementValue() : item.value.resetValue();
1050 list->append(cssValuePool().createValue((double)number, CSSPrimitiveValu e::UnitType::Number)); 1050 list->append(cssValuePool().createValue((double)number, CSSPrimitiveValu e::UnitType::Integer));
1051 } 1051 }
1052 1052
1053 if (!list->length()) 1053 if (!list->length())
1054 return cssValuePool().createIdentifierValue(CSSValueNone); 1054 return cssValuePool().createIdentifierValue(CSSValueNone);
1055 1055
1056 return list.release(); 1056 return list.release();
1057 } 1057 }
1058 1058
1059 static PassRefPtrWillBeRawPtr<CSSValue> valueForShape(const ComputedStyle& style , ShapeValue* shapeValue) 1059 static PassRefPtrWillBeRawPtr<CSSValue> valueForShape(const ComputedStyle& style , ShapeValue* shapeValue)
1060 { 1060 {
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 case CSSPropertyAll: 2734 case CSSPropertyAll:
2735 return nullptr; 2735 return nullptr;
2736 default: 2736 default:
2737 break; 2737 break;
2738 } 2738 }
2739 ASSERT_NOT_REACHED(); 2739 ASSERT_NOT_REACHED();
2740 return nullptr; 2740 return nullptr;
2741 } 2741 }
2742 2742
2743 } 2743 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698