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

Side by Side Diff: Source/core/layout/style/StyleRareInheritedData.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) 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 "config.h" 22 #include "config.h"
23 #include "core/layout/style/StyleRareInheritedData.h" 23 #include "core/layout/style/StyleRareInheritedData.h"
24 24
25 #include "core/layout/style/AppliedTextDecoration.h" 25 #include "core/layout/style/AppliedTextDecoration.h"
26 #include "core/layout/style/CursorData.h" 26 #include "core/layout/style/CursorData.h"
27 #include "core/layout/style/DataEquivalency.h" 27 #include "core/layout/style/DataEquivalency.h"
28 #include "core/layout/style/LayoutStyle.h" 28 #include "core/layout/style/ComputedStyle.h"
29 #include "core/layout/style/LayoutStyleConstants.h" 29 #include "core/layout/style/ComputedStyleConstants.h"
30 #include "core/layout/style/QuotesData.h" 30 #include "core/layout/style/QuotesData.h"
31 #include "core/layout/style/ShadowList.h" 31 #include "core/layout/style/ShadowList.h"
32 #include "core/layout/style/StyleImage.h" 32 #include "core/layout/style/StyleImage.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI nheritedData> { 36 struct SameSizeAsStyleRareInheritedData : public RefCounted<SameSizeAsStyleRareI nheritedData> {
37 void* styleImage; 37 void* styleImage;
38 Color firstColor; 38 Color firstColor;
39 float firstFloat; 39 float firstFloat;
40 Color colors[5]; 40 Color colors[5];
41 void* ownPtrs[1]; 41 void* ownPtrs[1];
42 AtomicString atomicStrings[4]; 42 AtomicString atomicStrings[4];
43 void* refPtrs[3]; 43 void* refPtrs[3];
44 Length lengths[1]; 44 Length lengths[1];
45 float secondFloat; 45 float secondFloat;
46 unsigned m_bitfields[2]; 46 unsigned m_bitfields[2];
47 short pagedMediaShorts[2]; 47 short pagedMediaShorts[2];
48 short hyphenationShorts[3]; 48 short hyphenationShorts[3];
49 49
50 Color touchColors; 50 Color touchColors;
51 TabSize tabSize; 51 TabSize tabSize;
52 }; 52 };
53 53
54 static_assert(sizeof(StyleRareInheritedData) == sizeof(SameSizeAsStyleRareInheri tedData), "StyleRareInheritedData should stay small"); 54 static_assert(sizeof(StyleRareInheritedData) == sizeof(SameSizeAsStyleRareInheri tedData), "StyleRareInheritedData should stay small");
55 55
56 StyleRareInheritedData::StyleRareInheritedData() 56 StyleRareInheritedData::StyleRareInheritedData()
57 : listStyleImage(LayoutStyle::initialListStyleImage()) 57 : listStyleImage(ComputedStyle::initialListStyleImage())
58 , textStrokeWidth(LayoutStyle::initialTextStrokeWidth()) 58 , textStrokeWidth(ComputedStyle::initialTextStrokeWidth())
59 , indent(LayoutStyle::initialTextIndent()) 59 , indent(ComputedStyle::initialTextIndent())
60 , m_effectiveZoom(LayoutStyle::initialZoom()) 60 , m_effectiveZoom(ComputedStyle::initialZoom())
61 , widows(LayoutStyle::initialWidows()) 61 , widows(ComputedStyle::initialWidows())
62 , orphans(LayoutStyle::initialOrphans()) 62 , orphans(ComputedStyle::initialOrphans())
63 , m_hasAutoOrphans(true) 63 , m_hasAutoOrphans(true)
64 , m_textStrokeColorIsCurrentColor(true) 64 , m_textStrokeColorIsCurrentColor(true)
65 , m_textFillColorIsCurrentColor(true) 65 , m_textFillColorIsCurrentColor(true)
66 , m_textEmphasisColorIsCurrentColor(true) 66 , m_textEmphasisColorIsCurrentColor(true)
67 , m_visitedLinkTextStrokeColorIsCurrentColor(true) 67 , m_visitedLinkTextStrokeColorIsCurrentColor(true)
68 , m_visitedLinkTextFillColorIsCurrentColor(true) 68 , m_visitedLinkTextFillColorIsCurrentColor(true)
69 , m_visitedLinkTextEmphasisColorIsCurrentColor(true) 69 , m_visitedLinkTextEmphasisColorIsCurrentColor(true)
70 , textSecurity(LayoutStyle::initialTextSecurity()) 70 , textSecurity(ComputedStyle::initialTextSecurity())
71 , userModify(READ_ONLY) 71 , userModify(READ_ONLY)
72 , wordBreak(LayoutStyle::initialWordBreak()) 72 , wordBreak(ComputedStyle::initialWordBreak())
73 , overflowWrap(LayoutStyle::initialOverflowWrap()) 73 , overflowWrap(ComputedStyle::initialOverflowWrap())
74 , lineBreak(LineBreakAuto) 74 , lineBreak(LineBreakAuto)
75 , userSelect(LayoutStyle::initialUserSelect()) 75 , userSelect(ComputedStyle::initialUserSelect())
76 , speak(SpeakNormal) 76 , speak(SpeakNormal)
77 , hyphens(HyphensManual) 77 , hyphens(HyphensManual)
78 , textEmphasisFill(TextEmphasisFillFilled) 78 , textEmphasisFill(TextEmphasisFillFilled)
79 , textEmphasisMark(TextEmphasisMarkNone) 79 , textEmphasisMark(TextEmphasisMarkNone)
80 , textEmphasisPosition(TextEmphasisPositionOver) 80 , textEmphasisPosition(TextEmphasisPositionOver)
81 , m_textAlignLast(LayoutStyle::initialTextAlignLast()) 81 , m_textAlignLast(ComputedStyle::initialTextAlignLast())
82 , m_textJustify(LayoutStyle::initialTextJustify()) 82 , m_textJustify(ComputedStyle::initialTextJustify())
83 , m_textOrientation(TextOrientationVerticalRight) 83 , m_textOrientation(TextOrientationVerticalRight)
84 , m_textIndentLine(LayoutStyle::initialTextIndentLine()) 84 , m_textIndentLine(ComputedStyle::initialTextIndentLine())
85 , m_textIndentType(LayoutStyle::initialTextIndentLine()) 85 , m_textIndentType(ComputedStyle::initialTextIndentLine())
86 , m_lineBoxContain(LayoutStyle::initialLineBoxContain()) 86 , m_lineBoxContain(ComputedStyle::initialLineBoxContain())
87 , m_imageRendering(LayoutStyle::initialImageRendering()) 87 , m_imageRendering(ComputedStyle::initialImageRendering())
88 , m_textUnderlinePosition(LayoutStyle::initialTextUnderlinePosition()) 88 , m_textUnderlinePosition(ComputedStyle::initialTextUnderlinePosition())
89 , m_rubyPosition(LayoutStyle::initialRubyPosition()) 89 , m_rubyPosition(ComputedStyle::initialRubyPosition())
90 , m_subtreeWillChangeContents(false) 90 , m_subtreeWillChangeContents(false)
91 , m_selfOrAncestorHasDirAutoAttribute(false) 91 , m_selfOrAncestorHasDirAutoAttribute(false)
92 , hyphenationLimitBefore(-1) 92 , hyphenationLimitBefore(-1)
93 , hyphenationLimitAfter(-1) 93 , hyphenationLimitAfter(-1)
94 , hyphenationLimitLines(-1) 94 , hyphenationLimitLines(-1)
95 , tapHighlightColor(LayoutStyle::initialTapHighlightColor()) 95 , tapHighlightColor(ComputedStyle::initialTapHighlightColor())
96 , m_tabSize(LayoutStyle::initialTabSize()) 96 , m_tabSize(ComputedStyle::initialTabSize())
97 { 97 {
98 } 98 }
99 99
100 StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o) 100 StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
101 : RefCounted<StyleRareInheritedData>() 101 : RefCounted<StyleRareInheritedData>()
102 , listStyleImage(o.listStyleImage) 102 , listStyleImage(o.listStyleImage)
103 , m_textStrokeColor(o.m_textStrokeColor) 103 , m_textStrokeColor(o.m_textStrokeColor)
104 , textStrokeWidth(o.textStrokeWidth) 104 , textStrokeWidth(o.textStrokeWidth)
105 , m_textFillColor(o.m_textFillColor) 105 , m_textFillColor(o.m_textFillColor)
106 , m_textEmphasisColor(o.m_textEmphasisColor) 106 , m_textEmphasisColor(o.m_textEmphasisColor)
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 { 221 {
222 return dataEquivalent(textShadow.get(), o.textShadow.get()); 222 return dataEquivalent(textShadow.get(), o.textShadow.get());
223 } 223 }
224 224
225 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData& o) const 225 bool StyleRareInheritedData::quotesDataEquivalent(const StyleRareInheritedData& o) const
226 { 226 {
227 return dataEquivalent(quotes, o.quotes); 227 return dataEquivalent(quotes, o.quotes);
228 } 228 }
229 229
230 } // namespace blink 230 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/style/StylePendingImage.h ('k') | Source/core/layout/style/StyleRareNonInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698