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

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: V4 Created 4 years, 12 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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 return cssValuePool().createIdentifierValue(CSSValueNone); 1041 return cssValuePool().createIdentifierValue(CSSValueNone);
1042 1042
1043 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 1043 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
1044 for (const auto& item : *map) { 1044 for (const auto& item : *map) {
1045 bool isValidCounterValue = propertyID == CSSPropertyCounterIncrement ? i tem.value.isIncrement() : item.value.isReset(); 1045 bool isValidCounterValue = propertyID == CSSPropertyCounterIncrement ? i tem.value.isIncrement() : item.value.isReset();
1046 if (!isValidCounterValue) 1046 if (!isValidCounterValue)
1047 continue; 1047 continue;
1048 1048
1049 list->append(CSSCustomIdentValue::create(item.key)); 1049 list->append(CSSCustomIdentValue::create(item.key));
1050 short number = propertyID == CSSPropertyCounterIncrement ? item.value.in crementValue() : item.value.resetValue(); 1050 short number = propertyID == CSSPropertyCounterIncrement ? item.value.in crementValue() : item.value.resetValue();
1051 list->append(cssValuePool().createValue((double)number, CSSPrimitiveValu e::UnitType::Number)); 1051 list->append(cssValuePool().createValue((double)number, CSSPrimitiveValu e::UnitType::Integer));
1052 } 1052 }
1053 1053
1054 if (!list->length()) 1054 if (!list->length())
1055 return cssValuePool().createIdentifierValue(CSSValueNone); 1055 return cssValuePool().createIdentifierValue(CSSValueNone);
1056 1056
1057 return list.release(); 1057 return list.release();
1058 } 1058 }
1059 1059
1060 static PassRefPtrWillBeRawPtr<CSSValue> valueForShape(const ComputedStyle& style , ShapeValue* shapeValue) 1060 static PassRefPtrWillBeRawPtr<CSSValue> valueForShape(const ComputedStyle& style , ShapeValue* shapeValue)
1061 { 1061 {
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2735 case CSSPropertyAll: 2735 case CSSPropertyAll:
2736 return nullptr; 2736 return nullptr;
2737 default: 2737 default:
2738 break; 2738 break;
2739 } 2739 }
2740 ASSERT_NOT_REACHED(); 2740 ASSERT_NOT_REACHED();
2741 return nullptr; 2741 return nullptr;
2742 } 2742 }
2743 2743
2744 } 2744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698