OLD | NEW |
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, |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "core/style/StyleRareInheritedData.h" | 23 #include "core/style/StyleRareInheritedData.h" |
24 | 24 |
25 #include "core/style/AppliedTextDecoration.h" | 25 #include "core/style/AppliedTextDecoration.h" |
26 #include "core/style/CursorData.h" | 26 #include "core/style/CursorData.h" |
27 #include "core/style/DataEquivalency.h" | 27 #include "core/style/DataEquivalency.h" |
28 #include "core/style/ComputedStyle.h" | 28 #include "core/style/ComputedStyle.h" |
29 #include "core/style/ComputedStyleConstants.h" | 29 #include "core/style/ComputedStyleConstants.h" |
30 #include "core/style/QuotesData.h" | 30 #include "core/style/QuotesData.h" |
31 #include "core/style/ShadowList.h" | 31 #include "core/style/ShadowList.h" |
32 #include "core/style/StyleImage.h" | 32 #include "core/style/StyleImage.h" |
| 33 #include "wtf/SizeAssertions.h" |
33 | 34 |
34 namespace blink { | 35 namespace blink { |
35 | 36 |
36 struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI
nheritedData> { | 37 ASSERT_SIZE(StyleRareInheritedData, 112, 160); |
37 void* styleImage; | |
38 Color firstColor; | |
39 float firstFloat; | |
40 Color colors[5]; | |
41 void* ownPtrs[1]; | |
42 AtomicString atomicStrings[4]; | |
43 #if ENABLE(OILPAN) | |
44 void* refPtrs[1]; | |
45 Persistent<void*> persistentHandles[2]; | |
46 #else | |
47 void* refPtrs[3]; | |
48 #endif | |
49 Length lengths[1]; | |
50 float secondFloat; | |
51 unsigned m_bitfields[2]; | |
52 short pagedMediaShorts[2]; | |
53 short hyphenationShorts[3]; | |
54 | |
55 Color touchColors; | |
56 TabSize tabSize; | |
57 }; | |
58 | |
59 static_assert(sizeof(StyleRareInheritedData) <= sizeof(SameSizeAsStyleRareInheri
tedData), "StyleRareInheritedData should stay small"); | |
60 | 38 |
61 StyleRareInheritedData::StyleRareInheritedData() | 39 StyleRareInheritedData::StyleRareInheritedData() |
62 : listStyleImage(ComputedStyle::initialListStyleImage()) | 40 : listStyleImage(ComputedStyle::initialListStyleImage()) |
63 , textStrokeWidth(ComputedStyle::initialTextStrokeWidth()) | 41 , textStrokeWidth(ComputedStyle::initialTextStrokeWidth()) |
64 , indent(ComputedStyle::initialTextIndent()) | 42 , indent(ComputedStyle::initialTextIndent()) |
65 , m_effectiveZoom(ComputedStyle::initialZoom()) | 43 , m_effectiveZoom(ComputedStyle::initialZoom()) |
66 , widows(ComputedStyle::initialWidows()) | 44 , widows(ComputedStyle::initialWidows()) |
67 , orphans(ComputedStyle::initialOrphans()) | 45 , orphans(ComputedStyle::initialOrphans()) |
68 , m_hasAutoOrphans(true) | 46 , m_hasAutoOrphans(true) |
69 , m_textStrokeColorIsCurrentColor(true) | 47 , m_textStrokeColorIsCurrentColor(true) |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 { | 210 { |
233 return dataEquivalent(textShadow.get(), o.textShadow.get()); | 211 return dataEquivalent(textShadow.get(), o.textShadow.get()); |
234 } | 212 } |
235 | 213 |
236 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData&
o) const | 214 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData&
o) const |
237 { | 215 { |
238 return dataEquivalent(quotes, o.quotes); | 216 return dataEquivalent(quotes, o.quotes); |
239 } | 217 } |
240 | 218 |
241 } // namespace blink | 219 } // namespace blink |
OLD | NEW |