OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
11 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
12 * | 12 * |
13 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 * Library General Public License for more details. | 16 * Library General Public License for more details. |
17 * | 17 * |
18 * You should have received a copy of the GNU Library General Public License | 18 * You should have received a copy of the GNU Library General Public License |
19 * along with this library; see the file COPYING.LIB. If not, write to | 19 * along with this library; see the file COPYING.LIB. If not, write to |
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #ifndef ComputedStyle_h | 25 #ifndef ComputedStyle_h |
26 #define ComputedStyle_h | 26 #define ComputedStyle_h |
27 | 27 |
28 #include "core/CSSPropertyNames.h" | 28 #include "core/CSSPropertyNames.h" |
| 29 #include "core/ComputedStyleBase.h" |
29 #include "core/CoreExport.h" | 30 #include "core/CoreExport.h" |
30 #include "core/style/BorderValue.h" | 31 #include "core/style/BorderValue.h" |
31 #include "core/style/ComputedStyleConstants.h" | 32 #include "core/style/ComputedStyleConstants.h" |
32 #include "core/style/CounterDirectives.h" | 33 #include "core/style/CounterDirectives.h" |
33 #include "core/style/DataRef.h" | 34 #include "core/style/DataRef.h" |
34 #include "core/style/LineClampValue.h" | 35 #include "core/style/LineClampValue.h" |
35 #include "core/style/NinePieceImage.h" | 36 #include "core/style/NinePieceImage.h" |
36 #include "core/style/SVGComputedStyle.h" | 37 #include "core/style/SVGComputedStyle.h" |
37 #include "core/style/StyleBackgroundData.h" | 38 #include "core/style/StyleBackgroundData.h" |
38 #include "core/style/StyleBoxData.h" | 39 #include "core/style/StyleBoxData.h" |
(...skipping 25 matching lines...) Expand all Loading... |
64 #include "platform/fonts/FontDescription.h" | 65 #include "platform/fonts/FontDescription.h" |
65 #include "platform/geometry/FloatRoundedRect.h" | 66 #include "platform/geometry/FloatRoundedRect.h" |
66 #include "platform/geometry/LayoutRectOutsets.h" | 67 #include "platform/geometry/LayoutRectOutsets.h" |
67 #include "platform/graphics/Color.h" | 68 #include "platform/graphics/Color.h" |
68 #include "platform/scroll/ScrollTypes.h" | 69 #include "platform/scroll/ScrollTypes.h" |
69 #include "platform/text/TextDirection.h" | 70 #include "platform/text/TextDirection.h" |
70 #include "platform/text/UnicodeBidi.h" | 71 #include "platform/text/UnicodeBidi.h" |
71 #include "platform/transforms/TransformOperations.h" | 72 #include "platform/transforms/TransformOperations.h" |
72 #include "wtf/Forward.h" | 73 #include "wtf/Forward.h" |
73 #include "wtf/LeakAnnotations.h" | 74 #include "wtf/LeakAnnotations.h" |
74 #include "wtf/RefCounted.h" | |
75 #include "wtf/Vector.h" | 75 #include "wtf/Vector.h" |
76 #include <memory> | 76 #include <memory> |
77 | 77 |
78 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } | 78 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
) { return t == static_cast<T>(u); } |
79 | 79 |
80 #define SET_VAR(group, variable, value) \ | 80 #define SET_VAR(group, variable, value) \ |
81 if (!compareEqual(group->variable, value)) \ | 81 if (!compareEqual(group->variable, value)) \ |
82 group.access()->variable = value | 82 group.access()->variable = value |
83 | 83 |
84 #define SET_NESTED_VAR(group, base, variable, value) \ | 84 #define SET_NESTED_VAR(group, base, variable, value) \ |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 class StyleInheritedData; | 116 class StyleInheritedData; |
117 class StylePath; | 117 class StylePath; |
118 class StyleResolver; | 118 class StyleResolver; |
119 class TransformationMatrix; | 119 class TransformationMatrix; |
120 class TranslateTransformOperation; | 120 class TranslateTransformOperation; |
121 | 121 |
122 class ContentData; | 122 class ContentData; |
123 | 123 |
124 typedef Vector<RefPtr<ComputedStyle>, 4> PseudoStyleCache; | 124 typedef Vector<RefPtr<ComputedStyle>, 4> PseudoStyleCache; |
125 | 125 |
126 class CORE_EXPORT ComputedStyle: public RefCounted<ComputedStyle> { | 126 // ComputedStyle stores the final style for an element and provides the |
| 127 // interface between the style engine and the rest of Blink. |
| 128 // |
| 129 // It contains all the resolved styles for an element, and is densely packed and |
| 130 // optimized for memory and performance. Enums and small fields are packed in |
| 131 // bit fields, while large fields are stored in pointers and shared where not |
| 132 // modified from their parent value (see the DataRef class). |
| 133 // |
| 134 // Currently, ComputedStyle is hand-written and ComputedStyleBase is generated. |
| 135 // Over time, methods will be moved to ComputedStyleBase and the generator will |
| 136 // be expanded to handle more and more types of properties. Eventually, all |
| 137 // methods will be on ComputedStyleBase (with custom methods defined in a class |
| 138 // such as ComputedStyleBase.cpp) and ComputedStyle will be removed. |
| 139 class CORE_EXPORT ComputedStyle: public ComputedStyleBase { |
127 friend class AnimatedStyleBuilder; // Used by Web Animations CSS. Sets the c
olor styles | 140 friend class AnimatedStyleBuilder; // Used by Web Animations CSS. Sets the c
olor styles |
128 friend class CSSAnimatableValueFactory; // Used by Web Animations CSS. Gets
visited and unvisited colors separately. | 141 friend class CSSAnimatableValueFactory; // Used by Web Animations CSS. Gets
visited and unvisited colors separately. |
129 friend class CSSPropertyEquality; // Used by CSS animations. We can't allow
them to animate based off visited colors. | 142 friend class CSSPropertyEquality; // Used by CSS animations. We can't allow
them to animate based off visited colors. |
130 friend class ApplyStyleCommand; // Editing has to only reveal unvisited info
. | 143 friend class ApplyStyleCommand; // Editing has to only reveal unvisited info
. |
131 friend class EditingStyle; // Editing has to only reveal unvisited info. | 144 friend class EditingStyle; // Editing has to only reveal unvisited info. |
132 friend class ComputedStyleCSSValueMapping; // Needs to be able to see visite
d and unvisited colors for devtools. | 145 friend class ComputedStyleCSSValueMapping; // Needs to be able to see visite
d and unvisited colors for devtools. |
133 friend class StyleBuilderFunctions; // Sets color styles | 146 friend class StyleBuilderFunctions; // Sets color styles |
134 friend class CachedUAStyle; // Saves Border/Background information for later
comparison. | 147 friend class CachedUAStyle; // Saves Border/Background information for later
comparison. |
135 friend class ColorPropertyFunctions; // Accesses visited and unvisited color
s. | 148 friend class ColorPropertyFunctions; // Accesses visited and unvisited color
s. |
136 | 149 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 && compareEqualNonIndependent(other); | 181 && compareEqualNonIndependent(other); |
169 } | 182 } |
170 | 183 |
171 bool operator!=(const InheritedData& other) const { return !(*this == ot
her); } | 184 bool operator!=(const InheritedData& other) const { return !(*this == ot
her); } |
172 | 185 |
173 inline bool compareEqualIndependent(const InheritedData& other) const | 186 inline bool compareEqualIndependent(const InheritedData& other) const |
174 { | 187 { |
175 // These must match the properties tagged 'independent' in | 188 // These must match the properties tagged 'independent' in |
176 // CSSProperties.in. | 189 // CSSProperties.in. |
177 // TODO(sashab): Generate this function. | 190 // TODO(sashab): Generate this function. |
178 return (m_visibility == other.m_visibility) | 191 return (m_pointerEvents == other.m_pointerEvents); |
179 && (m_pointerEvents == other.m_pointerEvents); | |
180 } | 192 } |
181 | 193 |
182 inline bool compareEqualNonIndependent(const InheritedData& other) const | 194 inline bool compareEqualNonIndependent(const InheritedData& other) const |
183 { | 195 { |
184 return (m_emptyCells == other.m_emptyCells) | 196 return (m_emptyCells == other.m_emptyCells) |
185 && (m_captionSide == other.m_captionSide) | 197 && (m_captionSide == other.m_captionSide) |
186 && (m_listStyleType == other.m_listStyleType) | 198 && (m_listStyleType == other.m_listStyleType) |
187 && (m_listStylePosition == other.m_listStylePosition) | 199 && (m_listStylePosition == other.m_listStylePosition) |
188 && (m_textAlign == other.m_textAlign) | 200 && (m_textAlign == other.m_textAlign) |
189 && (m_textTransform == other.m_textTransform) | 201 && (m_textTransform == other.m_textTransform) |
190 && (m_textUnderline == other.m_textUnderline) | 202 && (m_textUnderline == other.m_textUnderline) |
191 && (m_cursorStyle == other.m_cursorStyle) | 203 && (m_cursorStyle == other.m_cursorStyle) |
192 && (m_direction == other.m_direction) | 204 && (m_direction == other.m_direction) |
193 && (m_whiteSpace == other.m_whiteSpace) | 205 && (m_whiteSpace == other.m_whiteSpace) |
194 && (m_borderCollapse == other.m_borderCollapse) | 206 && (m_borderCollapse == other.m_borderCollapse) |
195 && (m_boxDirection == other.m_boxDirection) | 207 && (m_boxDirection == other.m_boxDirection) |
196 && (m_rtlOrdering == other.m_rtlOrdering) | 208 && (m_rtlOrdering == other.m_rtlOrdering) |
197 && (m_printColorAdjust == other.m_printColorAdjust) | 209 && (m_printColorAdjust == other.m_printColorAdjust) |
198 && (m_insideLink == other.m_insideLink) | 210 && (m_insideLink == other.m_insideLink) |
199 && (m_writingMode == other.m_writingMode); | 211 && (m_writingMode == other.m_writingMode); |
200 } | 212 } |
201 | 213 |
202 unsigned m_emptyCells : 1; // EEmptyCells | 214 unsigned m_emptyCells : 1; // EEmptyCells |
203 unsigned m_captionSide : 2; // ECaptionSide | 215 unsigned m_captionSide : 2; // ECaptionSide |
204 unsigned m_listStyleType : 7; // EListStyleType | 216 unsigned m_listStyleType : 7; // EListStyleType |
205 unsigned m_listStylePosition : 1; // EListStylePosition | 217 unsigned m_listStylePosition : 1; // EListStylePosition |
206 unsigned m_visibility : 2; // EVisibility | |
207 unsigned m_textAlign : 4; // ETextAlign | 218 unsigned m_textAlign : 4; // ETextAlign |
208 unsigned m_textTransform : 2; // ETextTransform | 219 unsigned m_textTransform : 2; // ETextTransform |
209 unsigned m_textUnderline : 1; | 220 unsigned m_textUnderline : 1; |
210 unsigned m_cursorStyle : 6; // ECursor | 221 unsigned m_cursorStyle : 6; // ECursor |
211 unsigned m_direction : 1; // TextDirection | 222 unsigned m_direction : 1; // TextDirection |
212 unsigned m_whiteSpace : 3; // EWhiteSpace | 223 unsigned m_whiteSpace : 3; // EWhiteSpace |
213 unsigned m_borderCollapse : 1; // EBorderCollapse | 224 unsigned m_borderCollapse : 1; // EBorderCollapse |
214 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction proper
ty, flexible box layout module) | 225 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction proper
ty, flexible box layout module) |
215 // 32 bits | 226 // 32 bits |
216 | 227 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 unsigned m_isVisibilityInherited : 1; | 334 unsigned m_isVisibilityInherited : 1; |
324 | 335 |
325 // If you add more style bits here, you will also need to update Compute
dStyle::copyNonInheritedFromCached() | 336 // If you add more style bits here, you will also need to update Compute
dStyle::copyNonInheritedFromCached() |
326 // 68 bits | 337 // 68 bits |
327 } m_nonInheritedData; | 338 } m_nonInheritedData; |
328 | 339 |
329 // !END SYNC! | 340 // !END SYNC! |
330 | 341 |
331 void setBitDefaults() | 342 void setBitDefaults() |
332 { | 343 { |
| 344 ComputedStyleBase::setBitDefaults(); |
333 m_inheritedData.m_emptyCells = initialEmptyCells(); | 345 m_inheritedData.m_emptyCells = initialEmptyCells(); |
334 m_inheritedData.m_captionSide = initialCaptionSide(); | 346 m_inheritedData.m_captionSide = initialCaptionSide(); |
335 m_inheritedData.m_listStyleType = initialListStyleType(); | 347 m_inheritedData.m_listStyleType = initialListStyleType(); |
336 m_inheritedData.m_listStylePosition = initialListStylePosition(); | 348 m_inheritedData.m_listStylePosition = initialListStylePosition(); |
337 m_inheritedData.m_visibility = static_cast<unsigned>(initialVisibility()
); | |
338 m_inheritedData.m_textAlign = initialTextAlign(); | 349 m_inheritedData.m_textAlign = initialTextAlign(); |
339 m_inheritedData.m_textTransform = initialTextTransform(); | 350 m_inheritedData.m_textTransform = initialTextTransform(); |
340 m_inheritedData.m_textUnderline = false; | 351 m_inheritedData.m_textUnderline = false; |
341 m_inheritedData.m_cursorStyle = initialCursor(); | 352 m_inheritedData.m_cursorStyle = initialCursor(); |
342 m_inheritedData.m_direction = initialDirection(); | 353 m_inheritedData.m_direction = initialDirection(); |
343 m_inheritedData.m_whiteSpace = initialWhiteSpace(); | 354 m_inheritedData.m_whiteSpace = initialWhiteSpace(); |
344 m_inheritedData.m_borderCollapse = initialBorderCollapse(); | 355 m_inheritedData.m_borderCollapse = initialBorderCollapse(); |
345 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); | 356 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); |
346 m_inheritedData.m_boxDirection = initialBoxDirection(); | 357 m_inheritedData.m_boxDirection = initialBoxDirection(); |
347 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust(); | 358 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 ContentDistributionType resolvedJustifyContentDistribution(const StyleConten
tAlignmentData& normalValueBehavior) const; | 428 ContentDistributionType resolvedJustifyContentDistribution(const StyleConten
tAlignmentData& normalValueBehavior) const; |
418 ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData
& normalValueBehavior) const; | 429 ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData
& normalValueBehavior) const; |
419 ContentDistributionType resolvedAlignContentDistribution(const StyleContentA
lignmentData& normalValueBehavior) const; | 430 ContentDistributionType resolvedAlignContentDistribution(const StyleContentA
lignmentData& normalValueBehavior) const; |
420 StyleSelfAlignmentData resolvedAlignItems(ItemPosition normalValueBehaviour)
const; | 431 StyleSelfAlignmentData resolvedAlignItems(ItemPosition normalValueBehaviour)
const; |
421 StyleSelfAlignmentData resolvedAlignSelf(ItemPosition normalValueBehaviour,
const ComputedStyle* parentStyle = nullptr) const; | 432 StyleSelfAlignmentData resolvedAlignSelf(ItemPosition normalValueBehaviour,
const ComputedStyle* parentStyle = nullptr) const; |
422 StyleSelfAlignmentData resolvedJustifyItems(ItemPosition normalValueBehaviou
r) const; | 433 StyleSelfAlignmentData resolvedJustifyItems(ItemPosition normalValueBehaviou
r) const; |
423 StyleSelfAlignmentData resolvedJustifySelf(ItemPosition normalValueBehaviour
, const ComputedStyle* parentStyle = nullptr) const; | 434 StyleSelfAlignmentData resolvedJustifySelf(ItemPosition normalValueBehaviour
, const ComputedStyle* parentStyle = nullptr) const; |
424 | 435 |
425 StyleDifference visualInvalidationDiff(const ComputedStyle&) const; | 436 StyleDifference visualInvalidationDiff(const ComputedStyle&) const; |
426 | 437 |
427 enum IsAtShadowBoundary { | |
428 AtShadowBoundary, | |
429 NotAtShadowBoundary, | |
430 }; | |
431 | |
432 void inheritFrom(const ComputedStyle& inheritParent, IsAtShadowBoundary = No
tAtShadowBoundary); | 438 void inheritFrom(const ComputedStyle& inheritParent, IsAtShadowBoundary = No
tAtShadowBoundary); |
433 void copyNonInheritedFromCached(const ComputedStyle&); | 439 void copyNonInheritedFromCached(const ComputedStyle&); |
434 | 440 |
435 PseudoId styleType() const { return static_cast<PseudoId>(m_nonInheritedData
.m_styleType); } | 441 PseudoId styleType() const { return static_cast<PseudoId>(m_nonInheritedData
.m_styleType); } |
436 void setStyleType(PseudoId styleType) { m_nonInheritedData.m_styleType = sty
leType; } | 442 void setStyleType(PseudoId styleType) { m_nonInheritedData.m_styleType = sty
leType; } |
437 | 443 |
438 ComputedStyle* getCachedPseudoStyle(PseudoId) const; | 444 ComputedStyle* getCachedPseudoStyle(PseudoId) const; |
439 ComputedStyle* addCachedPseudoStyle(PassRefPtr<ComputedStyle>); | 445 ComputedStyle* addCachedPseudoStyle(PassRefPtr<ComputedStyle>); |
440 void removeCachedPseudoStyle(PseudoId); | 446 void removeCachedPseudoStyle(PseudoId); |
441 | 447 |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(m_nonInh
eritedData.m_unicodeBidi); } | 1255 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(m_nonInh
eritedData.m_unicodeBidi); } |
1250 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b;
} | 1256 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b;
} |
1251 | 1257 |
1252 // vertical-align | 1258 // vertical-align |
1253 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline;
} | 1259 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline;
} |
1254 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_
nonInheritedData.m_verticalAlign); } | 1260 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_
nonInheritedData.m_verticalAlign); } |
1255 const Length& getVerticalAlignLength() const { return m_box->verticalAlign()
; } | 1261 const Length& getVerticalAlignLength() const { return m_box->verticalAlign()
; } |
1256 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign
= v; } | 1262 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign
= v; } |
1257 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica
lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } | 1263 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica
lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } |
1258 | 1264 |
| 1265 // visibility |
| 1266 // TODO(sashab): Move this to ComputedStyleBase. |
| 1267 void setVisibilityIsInherited(bool isInherited) { m_nonInheritedData.m_isVis
ibilityInherited = isInherited; } |
| 1268 |
1259 // will-change | 1269 // will-change |
1260 const Vector<CSSPropertyID>& willChangeProperties() const { return m_rareNon
InheritedData->m_willChange->m_properties; } | 1270 const Vector<CSSPropertyID>& willChangeProperties() const { return m_rareNon
InheritedData->m_willChange->m_properties; } |
1261 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang
e->m_contents; } | 1271 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang
e->m_contents; } |
1262 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil
lChange->m_scrollPosition; } | 1272 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil
lChange->m_scrollPosition; } |
1263 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr
eeWillChangeContents; } | 1273 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr
eeWillChangeContents; } |
1264 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_
NESTED_VAR(m_rareNonInheritedData, m_willChange, m_properties, properties); } | 1274 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_
NESTED_VAR(m_rareNonInheritedData, m_willChange, m_properties, properties); } |
1265 void setWillChangeContents(bool b) { SET_NESTED_VAR(m_rareNonInheritedData,
m_willChange, m_contents, b); } | 1275 void setWillChangeContents(bool b) { SET_NESTED_VAR(m_rareNonInheritedData,
m_willChange, m_contents, b); } |
1266 void setWillChangeScrollPosition(bool b) { SET_NESTED_VAR(m_rareNonInherited
Data, m_willChange, m_scrollPosition, b); } | 1276 void setWillChangeScrollPosition(bool b) { SET_NESTED_VAR(m_rareNonInherited
Data, m_willChange, m_scrollPosition, b); } |
1267 void setSubtreeWillChangeContents(bool b) { SET_VAR(m_rareInheritedData, m_s
ubtreeWillChangeContents, b); } | 1277 void setSubtreeWillChangeContents(bool b) { SET_VAR(m_rareInheritedData, m_s
ubtreeWillChangeContents, b); } |
1268 | 1278 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 // text-size-adjust (aka -webkit-text-size-adjust) | 1493 // text-size-adjust (aka -webkit-text-size-adjust) |
1484 static TextSizeAdjust initialTextSizeAdjust() { return TextSizeAdjust::adjus
tAuto(); } | 1494 static TextSizeAdjust initialTextSizeAdjust() { return TextSizeAdjust::adjus
tAuto(); } |
1485 TextSizeAdjust getTextSizeAdjust() const { return m_rareInheritedData->m_tex
tSizeAdjust; } | 1495 TextSizeAdjust getTextSizeAdjust() const { return m_rareInheritedData->m_tex
tSizeAdjust; } |
1486 void setTextSizeAdjust(TextSizeAdjust sizeAdjust) { SET_VAR(m_rareInheritedD
ata, m_textSizeAdjust, sizeAdjust); } | 1496 void setTextSizeAdjust(TextSizeAdjust sizeAdjust) { SET_VAR(m_rareInheritedD
ata, m_textSizeAdjust, sizeAdjust); } |
1487 | 1497 |
1488 // text-transform (aka -epub-text-transform) | 1498 // text-transform (aka -epub-text-transform) |
1489 static ETextTransform initialTextTransform() { return TTNONE; } | 1499 static ETextTransform initialTextTransform() { return TTNONE; } |
1490 ETextTransform textTransform() const { return static_cast<ETextTransform>(m_
inheritedData.m_textTransform); } | 1500 ETextTransform textTransform() const { return static_cast<ETextTransform>(m_
inheritedData.m_textTransform); } |
1491 void setTextTransform(ETextTransform v) { m_inheritedData.m_textTransform =
v; } | 1501 void setTextTransform(ETextTransform v) { m_inheritedData.m_textTransform =
v; } |
1492 | 1502 |
1493 // visibility | |
1494 static EVisibility initialVisibility() { return EVisibility::Visible; } | |
1495 EVisibility visibility() const { return static_cast<EVisibility>(m_inherited
Data.m_visibility); } | |
1496 void setVisibility(EVisibility v) { m_inheritedData.m_visibility = static_ca
st<unsigned>(v); } | |
1497 void setVisibilityIsInherited(bool isInherited) { m_nonInheritedData.m_isVis
ibilityInherited = isInherited; } | |
1498 | |
1499 // white-space inherited | 1503 // white-space inherited |
1500 static EWhiteSpace initialWhiteSpace() { return NORMAL; } | 1504 static EWhiteSpace initialWhiteSpace() { return NORMAL; } |
1501 EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(m_inherited
Data.m_whiteSpace); } | 1505 EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(m_inherited
Data.m_whiteSpace); } |
1502 void setWhiteSpace(EWhiteSpace v) { m_inheritedData.m_whiteSpace = v; } | 1506 void setWhiteSpace(EWhiteSpace v) { m_inheritedData.m_whiteSpace = v; } |
1503 | 1507 |
1504 // word-break inherited (aka -epub-word-break) | 1508 // word-break inherited (aka -epub-word-break) |
1505 static EWordBreak initialWordBreak() { return NormalWordBreak; } | 1509 static EWordBreak initialWordBreak() { return NormalWordBreak; } |
1506 EWordBreak wordBreak() const { return static_cast<EWordBreak>(m_rareInherite
dData->wordBreak); } | 1510 EWordBreak wordBreak() const { return static_cast<EWordBreak>(m_rareInherite
dData->wordBreak); } |
1507 void setWordBreak(EWordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, b)
; } | 1511 void setWordBreak(EWordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, b)
; } |
1508 | 1512 |
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2613 } | 2617 } |
2614 | 2618 |
2615 inline bool ComputedStyle::hasPseudoElementStyle() const | 2619 inline bool ComputedStyle::hasPseudoElementStyle() const |
2616 { | 2620 { |
2617 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 2621 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
2618 } | 2622 } |
2619 | 2623 |
2620 } // namespace blink | 2624 } // namespace blink |
2621 | 2625 |
2622 #endif // ComputedStyle_h | 2626 #endif // ComputedStyle_h |
OLD | NEW |