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

Side by Side Diff: third_party/WebKit/Source/core/style/SVGComputedStyle.cpp

Issue 1439793003: SVG: Promote d to a property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CSSPropertyParser Created 5 years 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, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2010 Rob Buis <buis@kde.org> 3 2004, 2005, 2010 Rob Buis <buis@kde.org>
4 Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 5
6 Based on khtml code by: 6 Based on khtml code by:
7 Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 7 Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) 8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org) 9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org)
10 Copyright (C) 2002 Apple Computer, Inc. 10 Copyright (C) 2002 Apple Computer, Inc.
(...skipping 11 matching lines...) Expand all
22 You should have received a copy of the GNU Library General Public License 22 You should have received a copy of the GNU Library General Public License
23 along with this library; see the file COPYING.LIB. If not, write to 23 along with this library; see the file COPYING.LIB. If not, write to
24 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 24 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 Boston, MA 02110-1301, USA. 25 Boston, MA 02110-1301, USA.
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 29
30 #include "core/style/SVGComputedStyle.h" 30 #include "core/style/SVGComputedStyle.h"
31 31
32 #include "core/style/DataEquivalency.h"
33
32 namespace blink { 34 namespace blink {
33 35
34 static const int kPaintOrderBitwidth = 2; 36 static const int kPaintOrderBitwidth = 2;
35 37
36 SVGComputedStyle::SVGComputedStyle() 38 SVGComputedStyle::SVGComputedStyle()
37 { 39 {
38 static SVGComputedStyle* initialStyle = new SVGComputedStyle(CreateInitial); 40 static SVGComputedStyle* initialStyle = new SVGComputedStyle(CreateInitial);
39 41
40 fill = initialStyle->fill; 42 fill = initialStyle->fill;
41 stroke = initialStyle->stroke; 43 stroke = initialStyle->stroke;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 || stroke->paintUri != other->stroke->paintUri 182 || stroke->paintUri != other->stroke->paintUri
181 || stroke->miterLimit != other->stroke->miterLimit 183 || stroke->miterLimit != other->stroke->miterLimit
182 || *stroke->dashArray != *other->stroke->dashArray 184 || *stroke->dashArray != *other->stroke->dashArray
183 || stroke->dashOffset != other->stroke->dashOffset 185 || stroke->dashOffset != other->stroke->dashOffset
184 || stroke->visitedLinkPaintColor != other->stroke->visitedLinkPaintC olor 186 || stroke->visitedLinkPaintColor != other->stroke->visitedLinkPaintC olor
185 || stroke->visitedLinkPaintUri != other->stroke->visitedLinkPaintUri 187 || stroke->visitedLinkPaintUri != other->stroke->visitedLinkPaintUri
186 || stroke->visitedLinkPaintType != other->stroke->visitedLinkPaintTy pe) 188 || stroke->visitedLinkPaintType != other->stroke->visitedLinkPaintTy pe)
187 return true; 189 return true;
188 } 190 }
189 191
190 // The x, y, rx and ry properties require a re-layout. 192 // The StyleLayoutData properties require a re-layout.
191 if (layout.get() != other->layout.get()) { 193 if (layout.get() != other->layout.get()) {
192 if (layout->x != other->layout->x 194 if (layout->x != other->layout->x
193 || layout->y != other->layout->y 195 || layout->y != other->layout->y
194 || layout->r != other->layout->r 196 || layout->r != other->layout->r
195 || layout->rx != other->layout->rx 197 || layout->rx != other->layout->rx
196 || layout->ry != other->layout->ry 198 || layout->ry != other->layout->ry
197 || layout->cx != other->layout->cx 199 || layout->cx != other->layout->cx
198 || layout->cy != other->layout->cy) 200 || layout->cy != other->layout->cy
201 || !dataEquivalent(layout->d, other->layout->d))
199 return true; 202 return true;
200 } 203 }
201 204
202 return false; 205 return false;
203 } 206 }
204 207
205 bool SVGComputedStyle::diffNeedsPaintInvalidation(const SVGComputedStyle* other) const 208 bool SVGComputedStyle::diffNeedsPaintInvalidation(const SVGComputedStyle* other) const
206 { 209 {
207 if (stroke->opacity != other->stroke->opacity) 210 if (stroke->opacity != other->stroke->opacity)
208 return true; 211 return true;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 case PaintOrderMarkersStrokeFill: 279 case PaintOrderMarkersStrokeFill:
277 pt = paintOrderSequence(PT_MARKERS, PT_STROKE, PT_FILL); 280 pt = paintOrderSequence(PT_MARKERS, PT_STROKE, PT_FILL);
278 break; 281 break;
279 } 282 }
280 283
281 pt = (pt >> (kPaintOrderBitwidth*index)) & ((1u << kPaintOrderBitwidth) - 1) ; 284 pt = (pt >> (kPaintOrderBitwidth*index)) & ((1u << kPaintOrderBitwidth) - 1) ;
282 return (EPaintOrderType)pt; 285 return (EPaintOrderType)pt;
283 } 286 }
284 287
285 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698