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

Side by Side Diff: Source/core/layout/style/SVGComputedStyleDefs.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2007 Rob Buis <buis@kde.org> 3 2004, 2005, 2007 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.
11 11
12 This library is free software; you can redistribute it and/or 12 This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Library General Public 13 modify it under the terms of the GNU Library General Public
14 License as published by the Free Software Foundation; either 14 License as published by the Free Software Foundation; either
15 version 2 of the License, or (at your option) any later version. 15 version 2 of the License, or (at your option) any later version.
16 16
17 This library is distributed in the hope that it will be useful, 17 This library is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Library General Public License for more details. 20 Library General Public License for more details.
21 21
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 #include "core/layout/style/SVGLayoutStyleDefs.h" 29 #include "core/layout/style/SVGComputedStyleDefs.h"
30 30
31 #include "core/layout/style/SVGLayoutStyle.h" 31 #include "core/layout/style/SVGComputedStyle.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 StyleFillData::StyleFillData() 35 StyleFillData::StyleFillData()
36 : opacity(SVGLayoutStyle::initialFillOpacity()) 36 : opacity(SVGComputedStyle::initialFillOpacity())
37 , paintType(SVGLayoutStyle::initialFillPaintType()) 37 , paintType(SVGComputedStyle::initialFillPaintType())
38 , paintColor(SVGLayoutStyle::initialFillPaintColor()) 38 , paintColor(SVGComputedStyle::initialFillPaintColor())
39 , paintUri(SVGLayoutStyle::initialFillPaintUri()) 39 , paintUri(SVGComputedStyle::initialFillPaintUri())
40 , visitedLinkPaintType(SVGLayoutStyle::initialStrokePaintType()) 40 , visitedLinkPaintType(SVGComputedStyle::initialStrokePaintType())
41 , visitedLinkPaintColor(SVGLayoutStyle::initialFillPaintColor()) 41 , visitedLinkPaintColor(SVGComputedStyle::initialFillPaintColor())
42 , visitedLinkPaintUri(SVGLayoutStyle::initialFillPaintUri()) 42 , visitedLinkPaintUri(SVGComputedStyle::initialFillPaintUri())
43 { 43 {
44 } 44 }
45 45
46 StyleFillData::StyleFillData(const StyleFillData& other) 46 StyleFillData::StyleFillData(const StyleFillData& other)
47 : RefCounted<StyleFillData>() 47 : RefCounted<StyleFillData>()
48 , opacity(other.opacity) 48 , opacity(other.opacity)
49 , paintType(other.paintType) 49 , paintType(other.paintType)
50 , paintColor(other.paintColor) 50 , paintColor(other.paintColor)
51 , paintUri(other.paintUri) 51 , paintUri(other.paintUri)
52 , visitedLinkPaintType(other.visitedLinkPaintType) 52 , visitedLinkPaintType(other.visitedLinkPaintType)
53 , visitedLinkPaintColor(other.visitedLinkPaintColor) 53 , visitedLinkPaintColor(other.visitedLinkPaintColor)
54 , visitedLinkPaintUri(other.visitedLinkPaintUri) 54 , visitedLinkPaintUri(other.visitedLinkPaintUri)
55 { 55 {
56 } 56 }
57 57
58 bool StyleFillData::operator==(const StyleFillData& other) const 58 bool StyleFillData::operator==(const StyleFillData& other) const
59 { 59 {
60 return opacity == other.opacity 60 return opacity == other.opacity
61 && paintType == other.paintType 61 && paintType == other.paintType
62 && paintColor == other.paintColor 62 && paintColor == other.paintColor
63 && paintUri == other.paintUri 63 && paintUri == other.paintUri
64 && visitedLinkPaintType == other.visitedLinkPaintType 64 && visitedLinkPaintType == other.visitedLinkPaintType
65 && visitedLinkPaintColor == other.visitedLinkPaintColor 65 && visitedLinkPaintColor == other.visitedLinkPaintColor
66 && visitedLinkPaintUri == other.visitedLinkPaintUri; 66 && visitedLinkPaintUri == other.visitedLinkPaintUri;
67 } 67 }
68 68
69 StyleStrokeData::StyleStrokeData() 69 StyleStrokeData::StyleStrokeData()
70 : opacity(SVGLayoutStyle::initialStrokeOpacity()) 70 : opacity(SVGComputedStyle::initialStrokeOpacity())
71 , miterLimit(SVGLayoutStyle::initialStrokeMiterLimit()) 71 , miterLimit(SVGComputedStyle::initialStrokeMiterLimit())
72 , width(SVGLayoutStyle::initialStrokeWidth()) 72 , width(SVGComputedStyle::initialStrokeWidth())
73 , dashOffset(SVGLayoutStyle::initialStrokeDashOffset()) 73 , dashOffset(SVGComputedStyle::initialStrokeDashOffset())
74 , dashArray(SVGLayoutStyle::initialStrokeDashArray()) 74 , dashArray(SVGComputedStyle::initialStrokeDashArray())
75 , paintType(SVGLayoutStyle::initialStrokePaintType()) 75 , paintType(SVGComputedStyle::initialStrokePaintType())
76 , paintColor(SVGLayoutStyle::initialStrokePaintColor()) 76 , paintColor(SVGComputedStyle::initialStrokePaintColor())
77 , paintUri(SVGLayoutStyle::initialStrokePaintUri()) 77 , paintUri(SVGComputedStyle::initialStrokePaintUri())
78 , visitedLinkPaintType(SVGLayoutStyle::initialStrokePaintType()) 78 , visitedLinkPaintType(SVGComputedStyle::initialStrokePaintType())
79 , visitedLinkPaintColor(SVGLayoutStyle::initialStrokePaintColor()) 79 , visitedLinkPaintColor(SVGComputedStyle::initialStrokePaintColor())
80 , visitedLinkPaintUri(SVGLayoutStyle::initialStrokePaintUri()) 80 , visitedLinkPaintUri(SVGComputedStyle::initialStrokePaintUri())
81 { 81 {
82 } 82 }
83 83
84 StyleStrokeData::StyleStrokeData(const StyleStrokeData& other) 84 StyleStrokeData::StyleStrokeData(const StyleStrokeData& other)
85 : RefCounted<StyleStrokeData>() 85 : RefCounted<StyleStrokeData>()
86 , opacity(other.opacity) 86 , opacity(other.opacity)
87 , miterLimit(other.miterLimit) 87 , miterLimit(other.miterLimit)
88 , width(other.width) 88 , width(other.width)
89 , dashOffset(other.dashOffset) 89 , dashOffset(other.dashOffset)
90 , dashArray(other.dashArray) 90 , dashArray(other.dashArray)
(...skipping 15 matching lines...) Expand all
106 && *dashArray == *other.dashArray 106 && *dashArray == *other.dashArray
107 && paintType == other.paintType 107 && paintType == other.paintType
108 && paintColor == other.paintColor 108 && paintColor == other.paintColor
109 && paintUri == other.paintUri 109 && paintUri == other.paintUri
110 && visitedLinkPaintType == other.visitedLinkPaintType 110 && visitedLinkPaintType == other.visitedLinkPaintType
111 && visitedLinkPaintColor == other.visitedLinkPaintColor 111 && visitedLinkPaintColor == other.visitedLinkPaintColor
112 && visitedLinkPaintUri == other.visitedLinkPaintUri; 112 && visitedLinkPaintUri == other.visitedLinkPaintUri;
113 } 113 }
114 114
115 StyleStopData::StyleStopData() 115 StyleStopData::StyleStopData()
116 : opacity(SVGLayoutStyle::initialStopOpacity()) 116 : opacity(SVGComputedStyle::initialStopOpacity())
117 , color(SVGLayoutStyle::initialStopColor()) 117 , color(SVGComputedStyle::initialStopColor())
118 { 118 {
119 } 119 }
120 120
121 StyleStopData::StyleStopData(const StyleStopData& other) 121 StyleStopData::StyleStopData(const StyleStopData& other)
122 : RefCounted<StyleStopData>() 122 : RefCounted<StyleStopData>()
123 , opacity(other.opacity) 123 , opacity(other.opacity)
124 , color(other.color) 124 , color(other.color)
125 { 125 {
126 } 126 }
127 127
128 bool StyleStopData::operator==(const StyleStopData& other) const 128 bool StyleStopData::operator==(const StyleStopData& other) const
129 { 129 {
130 return color == other.color 130 return color == other.color
131 && opacity == other.opacity; 131 && opacity == other.opacity;
132 } 132 }
133 133
134 StyleMiscData::StyleMiscData() 134 StyleMiscData::StyleMiscData()
135 : floodColor(SVGLayoutStyle::initialFloodColor()) 135 : floodColor(SVGComputedStyle::initialFloodColor())
136 , floodOpacity(SVGLayoutStyle::initialFloodOpacity()) 136 , floodOpacity(SVGComputedStyle::initialFloodOpacity())
137 , lightingColor(SVGLayoutStyle::initialLightingColor()) 137 , lightingColor(SVGComputedStyle::initialLightingColor())
138 , baselineShiftValue(SVGLayoutStyle::initialBaselineShiftValue()) 138 , baselineShiftValue(SVGComputedStyle::initialBaselineShiftValue())
139 { 139 {
140 } 140 }
141 141
142 StyleMiscData::StyleMiscData(const StyleMiscData& other) 142 StyleMiscData::StyleMiscData(const StyleMiscData& other)
143 : RefCounted<StyleMiscData>() 143 : RefCounted<StyleMiscData>()
144 , floodColor(other.floodColor) 144 , floodColor(other.floodColor)
145 , floodOpacity(other.floodOpacity) 145 , floodOpacity(other.floodOpacity)
146 , lightingColor(other.lightingColor) 146 , lightingColor(other.lightingColor)
147 , baselineShiftValue(other.baselineShiftValue) 147 , baselineShiftValue(other.baselineShiftValue)
148 { 148 {
149 } 149 }
150 150
151 bool StyleMiscData::operator==(const StyleMiscData& other) const 151 bool StyleMiscData::operator==(const StyleMiscData& other) const
152 { 152 {
153 return floodOpacity == other.floodOpacity 153 return floodOpacity == other.floodOpacity
154 && floodColor == other.floodColor 154 && floodColor == other.floodColor
155 && lightingColor == other.lightingColor 155 && lightingColor == other.lightingColor
156 && baselineShiftValue == other.baselineShiftValue; 156 && baselineShiftValue == other.baselineShiftValue;
157 } 157 }
158 158
159 StyleResourceData::StyleResourceData() 159 StyleResourceData::StyleResourceData()
160 : clipper(SVGLayoutStyle::initialClipperResource()) 160 : clipper(SVGComputedStyle::initialClipperResource())
161 , filter(SVGLayoutStyle::initialFilterResource()) 161 , filter(SVGComputedStyle::initialFilterResource())
162 , masker(SVGLayoutStyle::initialMaskerResource()) 162 , masker(SVGComputedStyle::initialMaskerResource())
163 { 163 {
164 } 164 }
165 165
166 StyleResourceData::StyleResourceData(const StyleResourceData& other) 166 StyleResourceData::StyleResourceData(const StyleResourceData& other)
167 : RefCounted<StyleResourceData>() 167 : RefCounted<StyleResourceData>()
168 , clipper(other.clipper) 168 , clipper(other.clipper)
169 , filter(other.filter) 169 , filter(other.filter)
170 , masker(other.masker) 170 , masker(other.masker)
171 { 171 {
172 } 172 }
173 173
174 bool StyleResourceData::operator==(const StyleResourceData& other) const 174 bool StyleResourceData::operator==(const StyleResourceData& other) const
175 { 175 {
176 return clipper == other.clipper 176 return clipper == other.clipper
177 && filter == other.filter 177 && filter == other.filter
178 && masker == other.masker; 178 && masker == other.masker;
179 } 179 }
180 180
181 StyleInheritedResourceData::StyleInheritedResourceData() 181 StyleInheritedResourceData::StyleInheritedResourceData()
182 : markerStart(SVGLayoutStyle::initialMarkerStartResource()) 182 : markerStart(SVGComputedStyle::initialMarkerStartResource())
183 , markerMid(SVGLayoutStyle::initialMarkerMidResource()) 183 , markerMid(SVGComputedStyle::initialMarkerMidResource())
184 , markerEnd(SVGLayoutStyle::initialMarkerEndResource()) 184 , markerEnd(SVGComputedStyle::initialMarkerEndResource())
185 { 185 {
186 } 186 }
187 187
188 StyleInheritedResourceData::StyleInheritedResourceData(const StyleInheritedResou rceData& other) 188 StyleInheritedResourceData::StyleInheritedResourceData(const StyleInheritedResou rceData& other)
189 : RefCounted<StyleInheritedResourceData>() 189 : RefCounted<StyleInheritedResourceData>()
190 , markerStart(other.markerStart) 190 , markerStart(other.markerStart)
191 , markerMid(other.markerMid) 191 , markerMid(other.markerMid)
192 , markerEnd(other.markerEnd) 192 , markerEnd(other.markerEnd)
193 { 193 {
194 } 194 }
195 195
196 bool StyleInheritedResourceData::operator==(const StyleInheritedResourceData& ot her) const 196 bool StyleInheritedResourceData::operator==(const StyleInheritedResourceData& ot her) const
197 { 197 {
198 return markerStart == other.markerStart 198 return markerStart == other.markerStart
199 && markerMid == other.markerMid 199 && markerMid == other.markerMid
200 && markerEnd == other.markerEnd; 200 && markerEnd == other.markerEnd;
201 } 201 }
202 202
203 StyleLayoutData::StyleLayoutData() 203 StyleLayoutData::StyleLayoutData()
204 : cx(SVGLayoutStyle::initialCx()) 204 : cx(SVGComputedStyle::initialCx())
205 , cy(SVGLayoutStyle::initialCy()) 205 , cy(SVGComputedStyle::initialCy())
206 , x(SVGLayoutStyle::initialX()) 206 , x(SVGComputedStyle::initialX())
207 , y(SVGLayoutStyle::initialY()) 207 , y(SVGComputedStyle::initialY())
208 , r(SVGLayoutStyle::initialR()) 208 , r(SVGComputedStyle::initialR())
209 , rx(SVGLayoutStyle::initialRx()) 209 , rx(SVGComputedStyle::initialRx())
210 , ry(SVGLayoutStyle::initialRy()) 210 , ry(SVGComputedStyle::initialRy())
211 { 211 {
212 } 212 }
213 213
214 inline StyleLayoutData::StyleLayoutData(const StyleLayoutData& other) 214 inline StyleLayoutData::StyleLayoutData(const StyleLayoutData& other)
215 : RefCounted<StyleLayoutData>() 215 : RefCounted<StyleLayoutData>()
216 , cx(other.cx) 216 , cx(other.cx)
217 , cy(other.cy) 217 , cy(other.cy)
218 , x(other.x) 218 , x(other.x)
219 , y(other.y) 219 , y(other.y)
220 , r(other.r) 220 , r(other.r)
(...skipping 12 matching lines...) Expand all
233 return x == other.x 233 return x == other.x
234 && y == other.y 234 && y == other.y
235 && r == other.r 235 && r == other.r
236 && rx == other.rx 236 && rx == other.rx
237 && ry == other.ry 237 && ry == other.ry
238 && cx == other.cx 238 && cx == other.cx
239 && cy == other.cy; 239 && cy == other.cy;
240 } 240 }
241 241
242 } 242 }
OLDNEW
« no previous file with comments | « Source/core/layout/style/SVGComputedStyleDefs.h ('k') | Source/core/layout/style/SVGComputedStyleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698