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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 case CSSPropertyStrokeDasharray: 2085 case CSSPropertyStrokeDasharray:
2086 { 2086 {
2087 HANDLE_SVG_INHERIT_AND_INITIAL(strokeDashArray, StrokeDashArray) 2087 HANDLE_SVG_INHERIT_AND_INITIAL(strokeDashArray, StrokeDashArray)
2088 if (!value->isValueList()) { 2088 if (!value->isValueList()) {
2089 state.style()->accessSVGStyle()->setStrokeDashArray(SVGRenderStyle:: initialStrokeDashArray()); 2089 state.style()->accessSVGStyle()->setStrokeDashArray(SVGRenderStyle:: initialStrokeDashArray());
2090 break; 2090 break;
2091 } 2091 }
2092 2092
2093 CSSValueList* dashes = toCSSValueList(value); 2093 CSSValueList* dashes = toCSSValueList(value);
2094 2094
2095 Vector<SVGLength> array; 2095 RefPtr<SVGLengthList> array = SVGLengthList::create();
2096 size_t length = dashes->length(); 2096 size_t length = dashes->length();
2097 for (size_t i = 0; i < length; ++i) { 2097 for (size_t i = 0; i < length; ++i) {
2098 CSSValue* currValue = dashes->itemWithoutBoundsCheck(i); 2098 CSSValue* currValue = dashes->itemWithoutBoundsCheck(i);
2099 if (!currValue->isPrimitiveValue()) 2099 if (!currValue->isPrimitiveValue())
2100 continue; 2100 continue;
2101 2101
2102 CSSPrimitiveValue* dash = toCSSPrimitiveValue(dashes->itemWithoutBou ndsCheck(i)); 2102 CSSPrimitiveValue* dash = toCSSPrimitiveValue(dashes->itemWithoutBou ndsCheck(i));
2103 array.append(SVGLength::fromCSSPrimitiveValue(dash)); 2103 array->append(SVGLength::fromCSSPrimitiveValue(dash));
2104 } 2104 }
2105 2105
2106 state.style()->accessSVGStyle()->setStrokeDashArray(array); 2106 state.style()->accessSVGStyle()->setStrokeDashArray(array.release());
2107 break; 2107 break;
2108 } 2108 }
2109 case CSSPropertyStopColor: 2109 case CSSPropertyStopColor:
2110 { 2110 {
2111 HANDLE_SVG_INHERIT_AND_INITIAL(stopColor, StopColor); 2111 HANDLE_SVG_INHERIT_AND_INITIAL(stopColor, StopColor);
2112 if (value->isSVGColor()) 2112 if (value->isSVGColor())
2113 state.style()->accessSVGStyle()->setStopColor(colorFromSVGColorCSSVa lue(toSVGColor(value), state.style()->color())); 2113 state.style()->accessSVGStyle()->setStopColor(colorFromSVGColorCSSVa lue(toSVGColor(value), state.style()->color()));
2114 break; 2114 break;
2115 } 2115 }
2116 case CSSPropertyLightingColor: 2116 case CSSPropertyLightingColor:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 break; 2154 break;
2155 } 2155 }
2156 case CSSPropertyEnableBackground: 2156 case CSSPropertyEnableBackground:
2157 // Silently ignoring this property for now 2157 // Silently ignoring this property for now
2158 // http://bugs.webkit.org/show_bug.cgi?id=6022 2158 // http://bugs.webkit.org/show_bug.cgi?id=6022
2159 break; 2159 break;
2160 } 2160 }
2161 } 2161 }
2162 2162
2163 } // namespace WebCore 2163 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.cpp ('k') | Source/core/frame/animation/CSSPropertyAnimation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698