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

Side by Side Diff: sky/engine/core/rendering/style/StyleRareInheritedData.cpp

Issue 1076623002: Remove our impressive amount of CSS Cursor code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #include "sky/engine/config.h" 22 #include "sky/engine/config.h"
23 #include "sky/engine/core/rendering/style/StyleRareInheritedData.h" 23 #include "sky/engine/core/rendering/style/StyleRareInheritedData.h"
24 24
25 #include "sky/engine/core/rendering/style/AppliedTextDecoration.h" 25 #include "sky/engine/core/rendering/style/AppliedTextDecoration.h"
26 #include "sky/engine/core/rendering/style/CursorData.h"
27 #include "sky/engine/core/rendering/style/DataEquivalency.h" 26 #include "sky/engine/core/rendering/style/DataEquivalency.h"
28 #include "sky/engine/core/rendering/style/QuotesData.h" 27 #include "sky/engine/core/rendering/style/QuotesData.h"
29 #include "sky/engine/core/rendering/style/RenderStyle.h" 28 #include "sky/engine/core/rendering/style/RenderStyle.h"
30 #include "sky/engine/core/rendering/style/RenderStyleConstants.h" 29 #include "sky/engine/core/rendering/style/RenderStyleConstants.h"
31 #include "sky/engine/core/rendering/style/ShadowList.h" 30 #include "sky/engine/core/rendering/style/ShadowList.h"
32 #include "sky/engine/core/rendering/style/StyleImage.h" 31 #include "sky/engine/core/rendering/style/StyleImage.h"
33 32
34 namespace blink { 33 namespace blink {
35 34
36 struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI nheritedData> { 35 struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI nheritedData> {
37 void* styleImage; 36 void* styleImage;
38 Color firstColor; 37 Color firstColor;
39 float firstFloat; 38 float firstFloat;
40 Color colors[2]; 39 Color colors[2];
41 void* ownPtrs[1]; 40 void* ownPtrs[1];
42 AtomicString atomicStrings[4]; 41 AtomicString atomicStrings[4];
43 void* refPtrs[3]; 42 void* refPtrs[2];
44 Length lengths[1]; 43 Length lengths[1];
45 unsigned m_bitfields[2]; 44 unsigned m_bitfields[2];
46 short pagedMediaShorts[2]; 45 short pagedMediaShorts[2];
47 unsigned unsigneds[1]; 46 unsigned unsigneds[1];
48 short hyphenationShorts[3]; 47 short hyphenationShorts[3];
49 48
50 Color touchColors; 49 Color touchColors;
51 }; 50 };
52 51
53 COMPILE_ASSERT(sizeof(StyleRareInheritedData) == sizeof(SameSizeAsStyleRareInher itedData), StyleRareInheritedData_should_bit_pack); 52 COMPILE_ASSERT(sizeof(StyleRareInheritedData) == sizeof(SameSizeAsStyleRareInher itedData), StyleRareInheritedData_should_bit_pack);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 92
94 StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o) 93 StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
95 : RefCounted<StyleRareInheritedData>() 94 : RefCounted<StyleRareInheritedData>()
96 , listStyleImage(o.listStyleImage) 95 , listStyleImage(o.listStyleImage)
97 , m_textStrokeColor(o.m_textStrokeColor) 96 , m_textStrokeColor(o.m_textStrokeColor)
98 , textStrokeWidth(o.textStrokeWidth) 97 , textStrokeWidth(o.textStrokeWidth)
99 , m_textFillColor(o.m_textFillColor) 98 , m_textFillColor(o.m_textFillColor)
100 , m_textEmphasisColor(o.m_textEmphasisColor) 99 , m_textEmphasisColor(o.m_textEmphasisColor)
101 , textShadow(o.textShadow) 100 , textShadow(o.textShadow)
102 , highlight(o.highlight) 101 , highlight(o.highlight)
103 , cursorData(o.cursorData)
104 , indent(o.indent) 102 , indent(o.indent)
105 , widows(o.widows) 103 , widows(o.widows)
106 , orphans(o.orphans) 104 , orphans(o.orphans)
107 , m_hasAutoWidows(o.m_hasAutoWidows) 105 , m_hasAutoWidows(o.m_hasAutoWidows)
108 , m_hasAutoOrphans(o.m_hasAutoOrphans) 106 , m_hasAutoOrphans(o.m_hasAutoOrphans)
109 , m_textStrokeColorIsCurrentColor(o.m_textStrokeColorIsCurrentColor) 107 , m_textStrokeColorIsCurrentColor(o.m_textStrokeColorIsCurrentColor)
110 , m_textFillColorIsCurrentColor(o.m_textFillColorIsCurrentColor) 108 , m_textFillColorIsCurrentColor(o.m_textFillColorIsCurrentColor)
111 , m_textEmphasisColorIsCurrentColor(o.m_textEmphasisColorIsCurrentColor) 109 , m_textEmphasisColorIsCurrentColor(o.m_textEmphasisColorIsCurrentColor)
112 , userModify(o.userModify) 110 , userModify(o.userModify)
113 , wordBreak(o.wordBreak) 111 , wordBreak(o.wordBreak)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 145
148 bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const 146 bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
149 { 147 {
150 return m_textStrokeColor == o.m_textStrokeColor 148 return m_textStrokeColor == o.m_textStrokeColor
151 && textStrokeWidth == o.textStrokeWidth 149 && textStrokeWidth == o.textStrokeWidth
152 && m_textFillColor == o.m_textFillColor 150 && m_textFillColor == o.m_textFillColor
153 && m_textEmphasisColor == o.m_textEmphasisColor 151 && m_textEmphasisColor == o.m_textEmphasisColor
154 && tapHighlightColor == o.tapHighlightColor 152 && tapHighlightColor == o.tapHighlightColor
155 && shadowDataEquivalent(o) 153 && shadowDataEquivalent(o)
156 && highlight == o.highlight 154 && highlight == o.highlight
157 && dataEquivalent(cursorData.get(), o.cursorData.get())
158 && indent == o.indent 155 && indent == o.indent
159 && widows == o.widows 156 && widows == o.widows
160 && orphans == o.orphans 157 && orphans == o.orphans
161 && m_hasAutoWidows == o.m_hasAutoWidows 158 && m_hasAutoWidows == o.m_hasAutoWidows
162 && m_hasAutoOrphans == o.m_hasAutoOrphans 159 && m_hasAutoOrphans == o.m_hasAutoOrphans
163 && m_textStrokeColorIsCurrentColor == o.m_textStrokeColorIsCurrentColor 160 && m_textStrokeColorIsCurrentColor == o.m_textStrokeColorIsCurrentColor
164 && m_textFillColorIsCurrentColor == o.m_textFillColorIsCurrentColor 161 && m_textFillColorIsCurrentColor == o.m_textFillColorIsCurrentColor
165 && m_textEmphasisColorIsCurrentColor == o.m_textEmphasisColorIsCurrentCo lor 162 && m_textEmphasisColorIsCurrentColor == o.m_textEmphasisColorIsCurrentCo lor
166 && userModify == o.userModify 163 && userModify == o.userModify
167 && wordBreak == o.wordBreak 164 && wordBreak == o.wordBreak
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 { 196 {
200 return dataEquivalent(textShadow.get(), o.textShadow.get()); 197 return dataEquivalent(textShadow.get(), o.textShadow.get());
201 } 198 }
202 199
203 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData& o) const 200 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData& o) const
204 { 201 {
205 return dataEquivalent(quotes, o.quotes); 202 return dataEquivalent(quotes, o.quotes);
206 } 203 }
207 204
208 } // namespace blink 205 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/style/StyleRareInheritedData.h ('k') | sky/engine/core/rendering/style/StyleRareNonInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698