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

Side by Side Diff: Source/core/css/SVGCSSComputedStyleDeclaration.cpp

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 Copyright (C) 2007 Eric Seidel <eric@webkit.org> 2 Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 3 Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 28 matching lines...) Expand all
39 return CSSPrimitiveValue::create(90.0f, CSSPrimitiveValue::CSS_DEG); 39 return CSSPrimitiveValue::create(90.0f, CSSPrimitiveValue::CSS_DEG);
40 case GO_180DEG: 40 case GO_180DEG:
41 return CSSPrimitiveValue::create(180.0f, CSSPrimitiveValue::CSS_DEG) ; 41 return CSSPrimitiveValue::create(180.0f, CSSPrimitiveValue::CSS_DEG) ;
42 case GO_270DEG: 42 case GO_270DEG:
43 return CSSPrimitiveValue::create(270.0f, CSSPrimitiveValue::CSS_DEG) ; 43 return CSSPrimitiveValue::create(270.0f, CSSPrimitiveValue::CSS_DEG) ;
44 default: 44 default:
45 return 0; 45 return 0;
46 } 46 }
47 } 47 }
48 48
49 static PassRefPtr<CSSValue> strokeDashArrayToCSSValueList(const Vector<SVGLength >& dashes) 49 static PassRefPtr<CSSValue> strokeDashArrayToCSSValueList(PassRefPtr<SVGLengthLi st> passDashes)
50 { 50 {
51 if (dashes.isEmpty()) 51 RefPtr<SVGLengthList> dashes = passDashes;
52
53 if (dashes->isEmpty())
52 return CSSPrimitiveValue::createIdentifier(CSSValueNone); 54 return CSSPrimitiveValue::createIdentifier(CSSValueNone);
53 55
54 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); 56 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
55 const Vector<SVGLength>::const_iterator end = dashes.end(); 57 SVGLengthList::ConstIterator it = dashes->begin();
56 for (Vector<SVGLength>::const_iterator it = dashes.begin(); it != end; ++it) 58 SVGLengthList::ConstIterator itEnd = dashes->end();
59 for (; it != itEnd; ++it)
57 list->append(SVGLength::toCSSPrimitiveValue(*it)); 60 list->append(SVGLength::toCSSPrimitiveValue(*it));
58 61
59 return list.release(); 62 return list.release();
60 } 63 }
61 64
62 static PassRefPtr<CSSValue> paintOrderToCSSValueList(EPaintOrder paintorder) 65 static PassRefPtr<CSSValue> paintOrderToCSSValueList(EPaintOrder paintorder)
63 { 66 {
64 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); 67 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
65 do { 68 do {
66 EPaintOrderType paintOrderType = (EPaintOrderType)(paintorder & ((1 << k PaintOrderBitwidth) - 1)); 69 EPaintOrderType paintOrderType = (EPaintOrderType)(paintorder & ((1 << k PaintOrderBitwidth) - 1));
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 default: 227 default:
225 // If you crash here, it's because you added a css property and are not handling it 228 // If you crash here, it's because you added a css property and are not handling it
226 // in either this switch statement or the one in CSSComputedStyleDelcara tion::getPropertyCSSValue 229 // in either this switch statement or the one in CSSComputedStyleDelcara tion::getPropertyCSSValue
227 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propertyID); 230 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propertyID);
228 } 231 }
229 WTF_LOG_ERROR("unimplemented propertyID: %d", propertyID); 232 WTF_LOG_ERROR("unimplemented propertyID: %d", propertyID);
230 return 0; 233 return 0;
231 } 234 }
232 235
233 } 236 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSCursorImageValue.cpp ('k') | Source/core/css/resolver/AnimatedStyleBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698