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

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

Issue 2066563002: Rename StyleLayoutData to StyleGeometryData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/SVGComputedStyle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Rob Buis <buis@kde.org> 3 2004, 2005 Rob Buis <buis@kde.org>
4 Copyright (C) 2005, 2006 Apple Computer, Inc. 4 Copyright (C) 2005, 2006 Apple Computer, Inc.
5 Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void setColorInterpolationFilters(EColorInterpolation val) { svg_inherited_f lags.colorInterpolationFilters = val; } 112 void setColorInterpolationFilters(EColorInterpolation val) { svg_inherited_f lags.colorInterpolationFilters = val; }
113 void setColorRendering(EColorRendering val) { svg_inherited_flags.colorRende ring = val; } 113 void setColorRendering(EColorRendering val) { svg_inherited_flags.colorRende ring = val; }
114 void setFillRule(WindRule val) { svg_inherited_flags.fillRule = val; } 114 void setFillRule(WindRule val) { svg_inherited_flags.fillRule = val; }
115 void setJoinStyle(LineJoin val) { svg_inherited_flags.joinStyle = val; } 115 void setJoinStyle(LineJoin val) { svg_inherited_flags.joinStyle = val; }
116 void setShapeRendering(EShapeRendering val) { svg_inherited_flags.shapeRende ring = val; } 116 void setShapeRendering(EShapeRendering val) { svg_inherited_flags.shapeRende ring = val; }
117 void setTextAnchor(ETextAnchor val) { svg_inherited_flags.textAnchor = val; } 117 void setTextAnchor(ETextAnchor val) { svg_inherited_flags.textAnchor = val; }
118 void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; } 118 void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; }
119 void setPaintOrder(EPaintOrder val) { svg_inherited_flags.paintOrder = (int) val; } 119 void setPaintOrder(EPaintOrder val) { svg_inherited_flags.paintOrder = (int) val; }
120 void setD(PassRefPtr<StylePath> d) 120 void setD(PassRefPtr<StylePath> d)
121 { 121 {
122 if (!(layout->d == d)) 122 if (!(geometry->d == d))
123 layout.access()->d = d; 123 geometry.access()->d = d;
124 } 124 }
125 void setCx(const Length& obj) 125 void setCx(const Length& obj)
126 { 126 {
127 if (!(layout->cx == obj)) 127 if (!(geometry->cx == obj))
128 layout.access()->cx = obj; 128 geometry.access()->cx = obj;
129 } 129 }
130 void setCy(const Length& obj) 130 void setCy(const Length& obj)
131 { 131 {
132 if (!(layout->cy == obj)) 132 if (!(geometry->cy == obj))
133 layout.access()->cy = obj; 133 geometry.access()->cy = obj;
134 } 134 }
135 void setX(const Length& obj) 135 void setX(const Length& obj)
136 { 136 {
137 if (!(layout->x == obj)) 137 if (!(geometry->x == obj))
138 layout.access()->x = obj; 138 geometry.access()->x = obj;
139 } 139 }
140 void setY(const Length& obj) 140 void setY(const Length& obj)
141 { 141 {
142 if (!(layout->y == obj)) 142 if (!(geometry->y == obj))
143 layout.access()->y = obj; 143 geometry.access()->y = obj;
144 } 144 }
145 void setR(const Length& obj) 145 void setR(const Length& obj)
146 { 146 {
147 if (!(layout->r == obj)) 147 if (!(geometry->r == obj))
148 layout.access()->r = obj; 148 geometry.access()->r = obj;
149 } 149 }
150 void setRx(const Length& obj) 150 void setRx(const Length& obj)
151 { 151 {
152 if (!(layout->rx == obj)) 152 if (!(geometry->rx == obj))
153 layout.access()->rx = obj; 153 geometry.access()->rx = obj;
154 } 154 }
155 void setRy(const Length& obj) 155 void setRy(const Length& obj)
156 { 156 {
157 if (!(layout->ry == obj)) 157 if (!(geometry->ry == obj))
158 layout.access()->ry = obj; 158 geometry.access()->ry = obj;
159 } 159 }
160 void setFillOpacity(float obj) 160 void setFillOpacity(float obj)
161 { 161 {
162 if (!(fill->opacity == obj)) 162 if (!(fill->opacity == obj))
163 fill.access()->opacity = obj; 163 fill.access()->opacity = obj;
164 } 164 }
165 165
166 void setFillPaint(SVGPaintType type, const Color& color, const String& uri, bool applyToRegularStyle = true, bool applyToVisitedLinkStyle = false) 166 void setFillPaint(SVGPaintType type, const Color& color, const String& uri, bool applyToRegularStyle = true, bool applyToVisitedLinkStyle = false)
167 { 167 {
168 if (applyToRegularStyle) { 168 if (applyToRegularStyle) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 SVGDashArray* strokeDashArray() const { return stroke->dashArray.get(); } 333 SVGDashArray* strokeDashArray() const { return stroke->dashArray.get(); }
334 float strokeMiterLimit() const { return stroke->miterLimit; } 334 float strokeMiterLimit() const { return stroke->miterLimit; }
335 const UnzoomedLength& strokeWidth() const { return stroke->width; } 335 const UnzoomedLength& strokeWidth() const { return stroke->width; }
336 const Length& strokeDashOffset() const { return stroke->dashOffset; } 336 const Length& strokeDashOffset() const { return stroke->dashOffset; }
337 float stopOpacity() const { return stops->opacity; } 337 float stopOpacity() const { return stops->opacity; }
338 const Color& stopColor() const { return stops->color; } 338 const Color& stopColor() const { return stops->color; }
339 float floodOpacity() const { return misc->floodOpacity; } 339 float floodOpacity() const { return misc->floodOpacity; }
340 const Color& floodColor() const { return misc->floodColor; } 340 const Color& floodColor() const { return misc->floodColor; }
341 const Color& lightingColor() const { return misc->lightingColor; } 341 const Color& lightingColor() const { return misc->lightingColor; }
342 const Length& baselineShiftValue() const { return misc->baselineShiftValue; } 342 const Length& baselineShiftValue() const { return misc->baselineShiftValue; }
343 StylePath* d() const { return layout->d.get(); } 343 StylePath* d() const { return geometry->d.get(); }
344 const Length& cx() const { return layout->cx; } 344 const Length& cx() const { return geometry->cx; }
345 const Length& cy() const { return layout->cy; } 345 const Length& cy() const { return geometry->cy; }
346 const Length& x() const { return layout->x; } 346 const Length& x() const { return geometry->x; }
347 const Length& y() const { return layout->y; } 347 const Length& y() const { return geometry->y; }
348 const Length& r() const { return layout->r; } 348 const Length& r() const { return geometry->r; }
349 const Length& rx() const { return layout->rx; } 349 const Length& rx() const { return geometry->rx; }
350 const Length& ry() const { return layout->ry; } 350 const Length& ry() const { return geometry->ry; }
351 const AtomicString& clipperResource() const { return resources->clipper; } 351 const AtomicString& clipperResource() const { return resources->clipper; }
352 const AtomicString& filterResource() const { return resources->filter; } 352 const AtomicString& filterResource() const { return resources->filter; }
353 const AtomicString& maskerResource() const { return resources->masker; } 353 const AtomicString& maskerResource() const { return resources->masker; }
354 const AtomicString& markerStartResource() const { return inheritedResources- >markerStart; } 354 const AtomicString& markerStartResource() const { return inheritedResources- >markerStart; }
355 const AtomicString& markerMidResource() const { return inheritedResources->m arkerMid; } 355 const AtomicString& markerMidResource() const { return inheritedResources->m arkerMid; }
356 const AtomicString& markerEndResource() const { return inheritedResources->m arkerEnd; } 356 const AtomicString& markerEndResource() const { return inheritedResources->m arkerEnd; }
357 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; } 357 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; }
358 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags.pa intOrder; } 358 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags.pa intOrder; }
359 EPaintOrderType paintOrderType(unsigned index) const; 359 EPaintOrderType paintOrderType(unsigned index) const;
360 360
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 } svg_noninherited_flags; 448 } svg_noninherited_flags;
449 449
450 // inherited attributes 450 // inherited attributes
451 DataRef<StyleFillData> fill; 451 DataRef<StyleFillData> fill;
452 DataRef<StyleStrokeData> stroke; 452 DataRef<StyleStrokeData> stroke;
453 DataRef<StyleInheritedResourceData> inheritedResources; 453 DataRef<StyleInheritedResourceData> inheritedResources;
454 454
455 // non-inherited attributes 455 // non-inherited attributes
456 DataRef<StyleStopData> stops; 456 DataRef<StyleStopData> stops;
457 DataRef<StyleMiscData> misc; 457 DataRef<StyleMiscData> misc;
458 DataRef<StyleLayoutData> layout; 458 DataRef<StyleGeometryData> geometry;
459 DataRef<StyleResourceData> resources; 459 DataRef<StyleResourceData> resources;
460 460
461 private: 461 private:
462 enum CreateInitialType { CreateInitial }; 462 enum CreateInitialType { CreateInitial };
463 463
464 SVGComputedStyle(); 464 SVGComputedStyle();
465 SVGComputedStyle(const SVGComputedStyle&); 465 SVGComputedStyle(const SVGComputedStyle&);
466 SVGComputedStyle(CreateInitialType); // Used to create the initial style sin gleton. 466 SVGComputedStyle(CreateInitialType); // Used to create the initial style sin gleton.
467 467
468 bool diffNeedsLayoutAndPaintInvalidation(const SVGComputedStyle* other) cons t; 468 bool diffNeedsLayoutAndPaintInvalidation(const SVGComputedStyle* other) cons t;
(...skipping 18 matching lines...) Expand all
487 svg_noninherited_flags.f.baselineShift = initialBaselineShift(); 487 svg_noninherited_flags.f.baselineShift = initialBaselineShift();
488 svg_noninherited_flags.f.vectorEffect = initialVectorEffect(); 488 svg_noninherited_flags.f.vectorEffect = initialVectorEffect();
489 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); 489 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering();
490 svg_noninherited_flags.f.maskType = initialMaskType(); 490 svg_noninherited_flags.f.maskType = initialMaskType();
491 } 491 }
492 }; 492 };
493 493
494 } // namespace blink 494 } // namespace blink
495 495
496 #endif // SVGComputedStyle_h 496 #endif // SVGComputedStyle_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/SVGComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698