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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2187493004: Add a generated ComputedStyleBase class that ComputedStyle extends (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_make_visibility_enum_class_rebase
Patch Set: Re-ordered inheritance to match initializers Created 4 years, 3 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) 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 class StyleInheritedData; 117 class StyleInheritedData;
117 class StylePath; 118 class StylePath;
118 class StyleResolver; 119 class StyleResolver;
119 class TransformationMatrix; 120 class TransformationMatrix;
120 class TranslateTransformOperation; 121 class TranslateTransformOperation;
121 122
122 class ContentData; 123 class ContentData;
123 124
124 typedef Vector<RefPtr<ComputedStyle>, 4> PseudoStyleCache; 125 typedef Vector<RefPtr<ComputedStyle>, 4> PseudoStyleCache;
125 126
126 class CORE_EXPORT ComputedStyle: public RefCounted<ComputedStyle> { 127 // ComputedStyle stores the final style for an element and provides the
128 // interface between the style engine and the rest of Blink.
129 //
130 // It contains all the resolved styles for an element, and is densely packed and
131 // optimized for memory and performance. Enums and small fields are packed in
132 // bit fields, while large fields are stored in pointers and shared where not
133 // modified from their parent value (see the DataRef class).
134 //
135 // Currently, ComputedStyle is hand-written and ComputedStyleBase is generated.
136 // Over time, methods will be moved to ComputedStyleBase and the generator will
137 // be expanded to handle more and more types of properties. Eventually, all
138 // methods will be on ComputedStyleBase (with custom methods defined in a class
139 // such as ComputedStyleBase.cpp) and ComputedStyle will be removed.
140 class CORE_EXPORT ComputedStyle: public ComputedStyleBase, public RefCounted<Com putedStyle> {
127 friend class AnimatedStyleBuilder; // Used by Web Animations CSS. Sets the c olor styles 141 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. 142 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. 143 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 . 144 friend class ApplyStyleCommand; // Editing has to only reveal unvisited info .
131 friend class EditingStyle; // Editing has to only reveal unvisited info. 145 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. 146 friend class ComputedStyleCSSValueMapping; // Needs to be able to see visite d and unvisited colors for devtools.
133 friend class StyleBuilderFunctions; // Sets color styles 147 friend class StyleBuilderFunctions; // Sets color styles
134 friend class CachedUAStyle; // Saves Border/Background information for later comparison. 148 friend class CachedUAStyle; // Saves Border/Background information for later comparison.
135 friend class ColorPropertyFunctions; // Accesses visited and unvisited color s. 149 friend class ColorPropertyFunctions; // Accesses visited and unvisited color s.
136 150
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 && compareEqualNonIndependent(other); 182 && compareEqualNonIndependent(other);
169 } 183 }
170 184
171 bool operator!=(const InheritedData& other) const { return !(*this == ot her); } 185 bool operator!=(const InheritedData& other) const { return !(*this == ot her); }
172 186
173 inline bool compareEqualIndependent(const InheritedData& other) const 187 inline bool compareEqualIndependent(const InheritedData& other) const
174 { 188 {
175 // These must match the properties tagged 'independent' in 189 // These must match the properties tagged 'independent' in
176 // CSSProperties.in. 190 // CSSProperties.in.
177 // TODO(sashab): Generate this function. 191 // TODO(sashab): Generate this function.
178 return (m_visibility == other.m_visibility) 192 return (m_pointerEvents == other.m_pointerEvents);
179 && (m_pointerEvents == other.m_pointerEvents);
180 } 193 }
181 194
182 inline bool compareEqualNonIndependent(const InheritedData& other) const 195 inline bool compareEqualNonIndependent(const InheritedData& other) const
183 { 196 {
184 return (m_emptyCells == other.m_emptyCells) 197 return (m_emptyCells == other.m_emptyCells)
185 && (m_captionSide == other.m_captionSide) 198 && (m_captionSide == other.m_captionSide)
186 && (m_listStyleType == other.m_listStyleType) 199 && (m_listStyleType == other.m_listStyleType)
187 && (m_listStylePosition == other.m_listStylePosition) 200 && (m_listStylePosition == other.m_listStylePosition)
188 && (m_textAlign == other.m_textAlign) 201 && (m_textAlign == other.m_textAlign)
189 && (m_textTransform == other.m_textTransform) 202 && (m_textTransform == other.m_textTransform)
190 && (m_textUnderline == other.m_textUnderline) 203 && (m_textUnderline == other.m_textUnderline)
191 && (m_cursorStyle == other.m_cursorStyle) 204 && (m_cursorStyle == other.m_cursorStyle)
192 && (m_direction == other.m_direction) 205 && (m_direction == other.m_direction)
193 && (m_whiteSpace == other.m_whiteSpace) 206 && (m_whiteSpace == other.m_whiteSpace)
194 && (m_borderCollapse == other.m_borderCollapse) 207 && (m_borderCollapse == other.m_borderCollapse)
195 && (m_boxDirection == other.m_boxDirection) 208 && (m_boxDirection == other.m_boxDirection)
196 && (m_rtlOrdering == other.m_rtlOrdering) 209 && (m_rtlOrdering == other.m_rtlOrdering)
197 && (m_printColorAdjust == other.m_printColorAdjust) 210 && (m_printColorAdjust == other.m_printColorAdjust)
198 && (m_insideLink == other.m_insideLink) 211 && (m_insideLink == other.m_insideLink)
199 && (m_writingMode == other.m_writingMode); 212 && (m_writingMode == other.m_writingMode);
200 } 213 }
201 214
202 unsigned m_emptyCells : 1; // EEmptyCells 215 unsigned m_emptyCells : 1; // EEmptyCells
203 unsigned m_captionSide : 2; // ECaptionSide 216 unsigned m_captionSide : 2; // ECaptionSide
204 unsigned m_listStyleType : 7; // EListStyleType 217 unsigned m_listStyleType : 7; // EListStyleType
205 unsigned m_listStylePosition : 1; // EListStylePosition 218 unsigned m_listStylePosition : 1; // EListStylePosition
206 unsigned m_visibility : 2; // EVisibility
207 unsigned m_textAlign : 4; // ETextAlign 219 unsigned m_textAlign : 4; // ETextAlign
208 unsigned m_textTransform : 2; // ETextTransform 220 unsigned m_textTransform : 2; // ETextTransform
209 unsigned m_textUnderline : 1; 221 unsigned m_textUnderline : 1;
210 unsigned m_cursorStyle : 6; // ECursor 222 unsigned m_cursorStyle : 6; // ECursor
211 unsigned m_direction : 1; // TextDirection 223 unsigned m_direction : 1; // TextDirection
212 unsigned m_whiteSpace : 3; // EWhiteSpace 224 unsigned m_whiteSpace : 3; // EWhiteSpace
213 unsigned m_borderCollapse : 1; // EBorderCollapse 225 unsigned m_borderCollapse : 1; // EBorderCollapse
214 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction proper ty, flexible box layout module) 226 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction proper ty, flexible box layout module)
215 // 32 bits 227 // 32 bits
216 228
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 unsigned m_isVisibilityInherited : 1; 335 unsigned m_isVisibilityInherited : 1;
324 336
325 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached() 337 // If you add more style bits here, you will also need to update Compute dStyle::copyNonInheritedFromCached()
326 // 68 bits 338 // 68 bits
327 } m_nonInheritedData; 339 } m_nonInheritedData;
328 340
329 // !END SYNC! 341 // !END SYNC!
330 342
331 void setBitDefaults() 343 void setBitDefaults()
332 { 344 {
345 ComputedStyleBase::setBitDefaults();
333 m_inheritedData.m_emptyCells = initialEmptyCells(); 346 m_inheritedData.m_emptyCells = initialEmptyCells();
334 m_inheritedData.m_captionSide = initialCaptionSide(); 347 m_inheritedData.m_captionSide = initialCaptionSide();
335 m_inheritedData.m_listStyleType = initialListStyleType(); 348 m_inheritedData.m_listStyleType = initialListStyleType();
336 m_inheritedData.m_listStylePosition = initialListStylePosition(); 349 m_inheritedData.m_listStylePosition = initialListStylePosition();
337 m_inheritedData.m_visibility = static_cast<unsigned>(initialVisibility() );
338 m_inheritedData.m_textAlign = initialTextAlign(); 350 m_inheritedData.m_textAlign = initialTextAlign();
339 m_inheritedData.m_textTransform = initialTextTransform(); 351 m_inheritedData.m_textTransform = initialTextTransform();
340 m_inheritedData.m_textUnderline = false; 352 m_inheritedData.m_textUnderline = false;
341 m_inheritedData.m_cursorStyle = initialCursor(); 353 m_inheritedData.m_cursorStyle = initialCursor();
342 m_inheritedData.m_direction = initialDirection(); 354 m_inheritedData.m_direction = initialDirection();
343 m_inheritedData.m_whiteSpace = initialWhiteSpace(); 355 m_inheritedData.m_whiteSpace = initialWhiteSpace();
344 m_inheritedData.m_borderCollapse = initialBorderCollapse(); 356 m_inheritedData.m_borderCollapse = initialBorderCollapse();
345 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); 357 m_inheritedData.m_rtlOrdering = initialRTLOrdering();
346 m_inheritedData.m_boxDirection = initialBoxDirection(); 358 m_inheritedData.m_boxDirection = initialBoxDirection();
347 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust(); 359 m_inheritedData.m_printColorAdjust = initialPrintColorAdjust();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 ContentDistributionType resolvedJustifyContentDistribution(const StyleConten tAlignmentData& normalValueBehavior) const; 429 ContentDistributionType resolvedJustifyContentDistribution(const StyleConten tAlignmentData& normalValueBehavior) const;
418 ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData & normalValueBehavior) const; 430 ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData & normalValueBehavior) const;
419 ContentDistributionType resolvedAlignContentDistribution(const StyleContentA lignmentData& normalValueBehavior) const; 431 ContentDistributionType resolvedAlignContentDistribution(const StyleContentA lignmentData& normalValueBehavior) const;
420 StyleSelfAlignmentData resolvedAlignItems(ItemPosition normalValueBehaviour) const; 432 StyleSelfAlignmentData resolvedAlignItems(ItemPosition normalValueBehaviour) const;
421 StyleSelfAlignmentData resolvedAlignSelf(ItemPosition normalValueBehaviour, const ComputedStyle* parentStyle = nullptr) const; 433 StyleSelfAlignmentData resolvedAlignSelf(ItemPosition normalValueBehaviour, const ComputedStyle* parentStyle = nullptr) const;
422 StyleSelfAlignmentData resolvedJustifyItems(ItemPosition normalValueBehaviou r) const; 434 StyleSelfAlignmentData resolvedJustifyItems(ItemPosition normalValueBehaviou r) const;
423 StyleSelfAlignmentData resolvedJustifySelf(ItemPosition normalValueBehaviour , const ComputedStyle* parentStyle = nullptr) const; 435 StyleSelfAlignmentData resolvedJustifySelf(ItemPosition normalValueBehaviour , const ComputedStyle* parentStyle = nullptr) const;
424 436
425 StyleDifference visualInvalidationDiff(const ComputedStyle&) const; 437 StyleDifference visualInvalidationDiff(const ComputedStyle&) const;
426 438
427 enum IsAtShadowBoundary {
428 AtShadowBoundary,
429 NotAtShadowBoundary,
430 };
431
432 void inheritFrom(const ComputedStyle& inheritParent, IsAtShadowBoundary = No tAtShadowBoundary); 439 void inheritFrom(const ComputedStyle& inheritParent, IsAtShadowBoundary = No tAtShadowBoundary);
433 void copyNonInheritedFromCached(const ComputedStyle&); 440 void copyNonInheritedFromCached(const ComputedStyle&);
434 441
435 PseudoId styleType() const { return static_cast<PseudoId>(m_nonInheritedData .m_styleType); } 442 PseudoId styleType() const { return static_cast<PseudoId>(m_nonInheritedData .m_styleType); }
436 void setStyleType(PseudoId styleType) { m_nonInheritedData.m_styleType = sty leType; } 443 void setStyleType(PseudoId styleType) { m_nonInheritedData.m_styleType = sty leType; }
437 444
438 ComputedStyle* getCachedPseudoStyle(PseudoId) const; 445 ComputedStyle* getCachedPseudoStyle(PseudoId) const;
439 ComputedStyle* addCachedPseudoStyle(PassRefPtr<ComputedStyle>); 446 ComputedStyle* addCachedPseudoStyle(PassRefPtr<ComputedStyle>);
440 void removeCachedPseudoStyle(PseudoId); 447 void removeCachedPseudoStyle(PseudoId);
441 448
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 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); }
1249 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b; } 1256 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b; }
1250 1257
1251 // vertical-align 1258 // vertical-align
1252 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline; } 1259 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline; }
1253 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_ nonInheritedData.m_verticalAlign); } 1260 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_ nonInheritedData.m_verticalAlign); }
1254 const Length& getVerticalAlignLength() const { return m_box->verticalAlign() ; } 1261 const Length& getVerticalAlignLength() const { return m_box->verticalAlign() ; }
1255 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign = v; } 1262 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign = v; }
1256 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); }
1257 1264
1265 // visibility
1266 // TODO(sashab): Move this to ComputedStyleBase.
1267 void setVisibilityIsInherited(bool isInherited) { m_nonInheritedData.m_isVis ibilityInherited = isInherited; }
1268
1258 // will-change 1269 // will-change
1259 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; }
1260 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang e->m_contents; } 1271 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang e->m_contents; }
1261 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil lChange->m_scrollPosition; } 1272 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil lChange->m_scrollPosition; }
1262 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr eeWillChangeContents; } 1273 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr eeWillChangeContents; }
1263 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); }
1264 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); }
1265 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); }
1266 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); }
1267 1278
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 // text-size-adjust (aka -webkit-text-size-adjust) 1493 // text-size-adjust (aka -webkit-text-size-adjust)
1483 static TextSizeAdjust initialTextSizeAdjust() { return TextSizeAdjust::adjus tAuto(); } 1494 static TextSizeAdjust initialTextSizeAdjust() { return TextSizeAdjust::adjus tAuto(); }
1484 TextSizeAdjust getTextSizeAdjust() const { return m_rareInheritedData->m_tex tSizeAdjust; } 1495 TextSizeAdjust getTextSizeAdjust() const { return m_rareInheritedData->m_tex tSizeAdjust; }
1485 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); }
1486 1497
1487 // text-transform (aka -epub-text-transform) 1498 // text-transform (aka -epub-text-transform)
1488 static ETextTransform initialTextTransform() { return TTNONE; } 1499 static ETextTransform initialTextTransform() { return TTNONE; }
1489 ETextTransform textTransform() const { return static_cast<ETextTransform>(m_ inheritedData.m_textTransform); } 1500 ETextTransform textTransform() const { return static_cast<ETextTransform>(m_ inheritedData.m_textTransform); }
1490 void setTextTransform(ETextTransform v) { m_inheritedData.m_textTransform = v; } 1501 void setTextTransform(ETextTransform v) { m_inheritedData.m_textTransform = v; }
1491 1502
1492 // visibility
1493 static EVisibility initialVisibility() { return EVisibility::Visible; }
1494 EVisibility visibility() const { return static_cast<EVisibility>(m_inherited Data.m_visibility); }
1495 void setVisibility(EVisibility v) { m_inheritedData.m_visibility = static_ca st<unsigned>(v); }
1496 void setVisibilityIsInherited(bool isInherited) { m_nonInheritedData.m_isVis ibilityInherited = isInherited; }
1497
1498 // white-space inherited 1503 // white-space inherited
1499 static EWhiteSpace initialWhiteSpace() { return NORMAL; } 1504 static EWhiteSpace initialWhiteSpace() { return NORMAL; }
1500 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); }
1501 void setWhiteSpace(EWhiteSpace v) { m_inheritedData.m_whiteSpace = v; } 1506 void setWhiteSpace(EWhiteSpace v) { m_inheritedData.m_whiteSpace = v; }
1502 1507
1503 // word-break inherited (aka -epub-word-break) 1508 // word-break inherited (aka -epub-word-break)
1504 static EWordBreak initialWordBreak() { return NormalWordBreak; } 1509 static EWordBreak initialWordBreak() { return NormalWordBreak; }
1505 EWordBreak wordBreak() const { return static_cast<EWordBreak>(m_rareInherite dData->wordBreak); } 1510 EWordBreak wordBreak() const { return static_cast<EWordBreak>(m_rareInherite dData->wordBreak); }
1506 void setWordBreak(EWordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, b) ; } 1511 void setWordBreak(EWordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, b) ; }
1507 1512
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
2615 } 2620 }
2616 2621
2617 inline bool ComputedStyle::hasPseudoElementStyle() const 2622 inline bool ComputedStyle::hasPseudoElementStyle() const
2618 { 2623 {
2619 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 2624 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
2620 } 2625 }
2621 2626
2622 } // namespace blink 2627 } // namespace blink
2623 2628
2624 #endif // ComputedStyle_h 2629 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698