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

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

Issue 896773002: [svg2] Make 'x' and 'y' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 10 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 | « Source/core/layout/style/SVGLayoutStyleDefs.h ('k') | Source/core/layout/svg/LayoutSVGRect.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, 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
30 #include "core/layout/style/SVGLayoutStyleDefs.h" 29 #include "core/layout/style/SVGLayoutStyleDefs.h"
31 30
32 #include "core/layout/style/SVGLayoutStyle.h" 31 #include "core/layout/style/SVGLayoutStyle.h"
33 32
34 namespace blink { 33 namespace blink {
35 34
36 StyleFillData::StyleFillData() 35 StyleFillData::StyleFillData()
37 : opacity(SVGLayoutStyle::initialFillOpacity()) 36 : opacity(SVGLayoutStyle::initialFillOpacity())
38 , paintType(SVGLayoutStyle::initialFillPaintType()) 37 , paintType(SVGLayoutStyle::initialFillPaintType())
39 , paintColor(SVGLayoutStyle::initialFillPaintColor()) 38 , paintColor(SVGLayoutStyle::initialFillPaintColor())
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 { 193 {
195 } 194 }
196 195
197 bool StyleInheritedResourceData::operator==(const StyleInheritedResourceData& ot her) const 196 bool StyleInheritedResourceData::operator==(const StyleInheritedResourceData& ot her) const
198 { 197 {
199 return markerStart == other.markerStart 198 return markerStart == other.markerStart
200 && markerMid == other.markerMid 199 && markerMid == other.markerMid
201 && markerEnd == other.markerEnd; 200 && markerEnd == other.markerEnd;
202 } 201 }
203 202
203 StyleLayoutData::StyleLayoutData()
204 : x(SVGLayoutStyle::initialX())
205 , y(SVGLayoutStyle::initialY())
206 {
204 } 207 }
208
209 inline StyleLayoutData::StyleLayoutData(const StyleLayoutData& other)
210 : RefCounted<StyleLayoutData>()
211 , x(other.x)
212 , y(other.y)
213 {
214 }
215
216 PassRefPtr<StyleLayoutData> StyleLayoutData::copy() const
217 {
218 return adoptRef(new StyleLayoutData(*this));
219 }
220
221 bool StyleLayoutData::operator==(const StyleLayoutData& other) const
222 {
223 return x == other.x
224 && y == other.y;
225 }
226
227 }
OLDNEW
« no previous file with comments | « Source/core/layout/style/SVGLayoutStyleDefs.h ('k') | Source/core/layout/svg/LayoutSVGRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698