• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3  *           (C) 2000 Antti Koivisto (koivisto@kde.org)
4  *           (C) 2000 Dirk Mueller (mueller@kde.org)
5  * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6  * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
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
20  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  *
23  */
24 
25 #ifndef RenderStyle_h
26 #define RenderStyle_h
27 
28 #include "core/CSSPropertyNames.h"
29 #include "core/animation/css/CSSAnimationData.h"
30 #include "core/animation/css/CSSTransitionData.h"
31 #include "core/css/CSSLineBoxContainValue.h"
32 #include "core/css/CSSPrimitiveValue.h"
33 #include "core/rendering/style/BorderValue.h"
34 #include "core/rendering/style/CounterDirectives.h"
35 #include "core/rendering/style/DataRef.h"
36 #include "core/rendering/style/LineClampValue.h"
37 #include "core/rendering/style/NinePieceImage.h"
38 #include "core/rendering/style/OutlineValue.h"
39 #include "core/rendering/style/RenderStyleConstants.h"
40 #include "core/rendering/style/SVGRenderStyle.h"
41 #include "core/rendering/style/ShapeValue.h"
42 #include "core/rendering/style/StyleBackgroundData.h"
43 #include "core/rendering/style/StyleBoxData.h"
44 #include "core/rendering/style/StyleDeprecatedFlexibleBoxData.h"
45 #include "core/rendering/style/StyleDifference.h"
46 #include "core/rendering/style/StyleFilterData.h"
47 #include "core/rendering/style/StyleFlexibleBoxData.h"
48 #include "core/rendering/style/StyleGridData.h"
49 #include "core/rendering/style/StyleGridItemData.h"
50 #include "core/rendering/style/StyleInheritedData.h"
51 #include "core/rendering/style/StyleMarqueeData.h"
52 #include "core/rendering/style/StyleMultiColData.h"
53 #include "core/rendering/style/StyleRareInheritedData.h"
54 #include "core/rendering/style/StyleRareNonInheritedData.h"
55 #include "core/rendering/style/StyleReflection.h"
56 #include "core/rendering/style/StyleSurroundData.h"
57 #include "core/rendering/style/StyleTransformData.h"
58 #include "core/rendering/style/StyleVisualData.h"
59 #include "core/rendering/style/StyleWillChangeData.h"
60 #include "platform/Length.h"
61 #include "platform/LengthBox.h"
62 #include "platform/LengthSize.h"
63 #include "platform/ThemeTypes.h"
64 #include "platform/fonts/FontBaseline.h"
65 #include "platform/fonts/FontDescription.h"
66 #include "platform/geometry/FloatRoundedRect.h"
67 #include "platform/geometry/LayoutBoxExtent.h"
68 #include "platform/geometry/RoundedRect.h"
69 #include "platform/graphics/Color.h"
70 #include "platform/graphics/GraphicsTypes.h"
71 #include "platform/scroll/ScrollableArea.h"
72 #include "platform/text/TextDirection.h"
73 #include "platform/text/UnicodeBidi.h"
74 #include "platform/transforms/TransformOperations.h"
75 #include "wtf/Forward.h"
76 #include "wtf/OwnPtr.h"
77 #include "wtf/RefCounted.h"
78 #include "wtf/StdLibExtras.h"
79 #include "wtf/Vector.h"
80 
compareEqual(const T & t,const U & u)81 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u) { return t == static_cast<T>(u); }
82 
83 #define SET_VAR(group, variable, value) \
84     if (!compareEqual(group->variable, value)) \
85         group.access()->variable = value
86 
87 #define SET_VAR_WITH_SETTER(group, getter, setter, value)    \
88     if (!compareEqual(group->getter(), value)) \
89         group.access()->setter(value)
90 
91 #define SET_BORDERVALUE_COLOR(group, variable, value) \
92     if (!compareEqual(group->variable.color(), value)) \
93         group.access()->variable.setColor(value)
94 
95 namespace blink {
96 
97 using std::max;
98 
99 class FilterOperations;
100 
101 class AppliedTextDecoration;
102 class BorderData;
103 struct BorderEdge;
104 class CounterContent;
105 class Font;
106 class FontMetrics;
107 class ShadowList;
108 class StyleImage;
109 class StyleInheritedData;
110 class StyleResolver;
111 class TransformationMatrix;
112 
113 class ContentData;
114 
115 typedef Vector<RefPtr<RenderStyle>, 4> PseudoStyleCache;
116 
117 class RenderStyle: public RefCounted<RenderStyle> {
118     friend class AnimatedStyleBuilder; // Used by Web Animations CSS. Sets the color styles
119     friend class CSSAnimatableValueFactory; // Used by Web Animations CSS. Gets visited and unvisited colors separately.
120     friend class CSSPropertyEquality; // Used by CSS animations. We can't allow them to animate based off visited colors.
121     friend class ApplyStyleCommand; // Editing has to only reveal unvisited info.
122     friend class EditingStyle; // Editing has to only reveal unvisited info.
123     friend class CSSComputedStyleDeclaration; // Ignores visited styles, so needs to be able to see unvisited info.
124     friend class StyleBuilderFunctions; // Sets color styles
125     friend class CachedUAStyle; // Saves Border/Background information for later comparison.
126 
127     // FIXME: When we stop resolving currentColor at style time, these can be removed.
128     friend class CSSToStyleMap;
129     friend class FilterOperationResolver;
130     friend class StyleBuilderConverter;
131     friend class StyleResolverState;
132     friend class StyleResolver;
133 protected:
134 
135     // non-inherited attributes
136     DataRef<StyleBoxData> m_box;
137     DataRef<StyleVisualData> visual;
138     DataRef<StyleBackgroundData> m_background;
139     DataRef<StyleSurroundData> surround;
140     DataRef<StyleRareNonInheritedData> rareNonInheritedData;
141 
142     // inherited attributes
143     DataRef<StyleRareInheritedData> rareInheritedData;
144     DataRef<StyleInheritedData> inherited;
145 
146     // list of associated pseudo styles
147     OwnPtr<PseudoStyleCache> m_cachedPseudoStyles;
148 
149     DataRef<SVGRenderStyle> m_svgStyle;
150 
151 // !START SYNC!: Keep this in sync with the copy constructor in RenderStyle.cpp and implicitlyInherited() in StyleResolver.cpp
152 
153     // inherit
154     struct InheritedFlags {
155         bool operator==(const InheritedFlags& other) const
156         {
157             return (_empty_cells == other._empty_cells)
158                 && (_caption_side == other._caption_side)
159                 && (_list_style_type == other._list_style_type)
160                 && (_list_style_position == other._list_style_position)
161                 && (_visibility == other._visibility)
162                 && (_text_align == other._text_align)
163                 && (_text_transform == other._text_transform)
164                 && (m_textUnderline == other.m_textUnderline)
165                 && (_cursor_style == other._cursor_style)
166                 && (_direction == other._direction)
167                 && (_white_space == other._white_space)
168                 && (_border_collapse == other._border_collapse)
169                 && (_box_direction == other._box_direction)
170                 && (m_rtlOrdering == other.m_rtlOrdering)
171                 && (m_printColorAdjust == other.m_printColorAdjust)
172                 && (_pointerEvents == other._pointerEvents)
173                 && (_insideLink == other._insideLink)
174                 && (m_writingMode == other.m_writingMode);
175         }
176 
177         bool operator!=(const InheritedFlags& other) const { return !(*this == other); }
178 
179         unsigned _empty_cells : 1; // EEmptyCell
180         unsigned _caption_side : 2; // ECaptionSide
181         unsigned _list_style_type : 7; // EListStyleType
182         unsigned _list_style_position : 1; // EListStylePosition
183         unsigned _visibility : 2; // EVisibility
184         unsigned _text_align : 4; // ETextAlign
185         unsigned _text_transform : 2; // ETextTransform
186         unsigned m_textUnderline : 1;
187         unsigned _cursor_style : 6; // ECursor
188         unsigned _direction : 1; // TextDirection
189         unsigned _white_space : 3; // EWhiteSpace
190         unsigned _border_collapse : 1; // EBorderCollapse
191         unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction property, flexible box layout module)
192         // 32 bits
193 
194         // non CSS2 inherited
195         unsigned m_rtlOrdering : 1; // Order
196         unsigned m_printColorAdjust : PrintColorAdjustBits;
197         unsigned _pointerEvents : 4; // EPointerEvents
198         unsigned _insideLink : 2; // EInsideLink
199 
200         // CSS Text Layout Module Level 3: Vertical writing support
201         unsigned m_writingMode : 2; // WritingMode
202         // 42 bits
203     } inherited_flags;
204 
205 // don't inherit
206     struct NonInheritedFlags {
207         bool operator==(const NonInheritedFlags& other) const
208         {
209             return effectiveDisplay == other.effectiveDisplay
210                 && originalDisplay == other.originalDisplay
211                 && overflowX == other.overflowX
212                 && overflowY == other.overflowY
213                 && verticalAlign == other.verticalAlign
214                 && clear == other.clear
215                 && position == other.position
216                 && floating == other.floating
217                 && tableLayout == other.tableLayout
218                 && pageBreakBefore == other.pageBreakBefore
219                 && pageBreakAfter == other.pageBreakAfter
220                 && pageBreakInside == other.pageBreakInside
221                 && styleType == other.styleType
222                 && affectedByFocus == other.affectedByFocus
223                 && affectedByHover == other.affectedByHover
224                 && affectedByActive == other.affectedByActive
225                 && affectedByDrag == other.affectedByDrag
226                 && pseudoBits == other.pseudoBits
227                 && unicodeBidi == other.unicodeBidi
228                 && explicitInheritance == other.explicitInheritance
229                 && unique == other.unique
230                 && emptyState == other.emptyState
231                 && firstChildState == other.firstChildState
232                 && lastChildState == other.lastChildState
233                 && isLink == other.isLink;
234         }
235 
236         bool operator!=(const NonInheritedFlags& other) const { return !(*this == other); }
237 
238         unsigned effectiveDisplay : 5; // EDisplay
239         unsigned originalDisplay : 5; // EDisplay
240         unsigned overflowX : 3; // EOverflow
241         unsigned overflowY : 3; // EOverflow
242         unsigned verticalAlign : 4; // EVerticalAlign
243         unsigned clear : 2; // EClear
244         unsigned position : 3; // EPosition
245         unsigned floating : 2; // EFloat
246         unsigned tableLayout : 1; // ETableLayout
247         unsigned unicodeBidi : 3; // EUnicodeBidi
248 
249         // This is set if we used viewport units when resolving a length.
250         // It is mutable so we can pass around const RenderStyles to resolve lengths.
251         mutable unsigned hasViewportUnits : 1;
252 
253         // 32 bits
254 
255         unsigned pageBreakBefore : 2; // EPageBreak
256         unsigned pageBreakAfter : 2; // EPageBreak
257         unsigned pageBreakInside : 2; // EPageBreak
258 
259         unsigned styleType : 6; // PseudoId
260         unsigned pseudoBits : 8;
261         unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited property
262         unsigned unique : 1; // Style can not be shared.
263 
264         unsigned emptyState : 1;
265         unsigned firstChildState : 1;
266         unsigned lastChildState : 1;
267 
268         unsigned affectedByFocus : 1;
269         unsigned affectedByHover : 1;
270         unsigned affectedByActive : 1;
271         unsigned affectedByDrag : 1;
272 
273         unsigned isLink : 1;
274         // If you add more style bits here, you will also need to update RenderStyle::copyNonInheritedFrom()
275         // 62 bits
276     } noninherited_flags;
277 
278 // !END SYNC!
279 
280 protected:
setBitDefaults()281     void setBitDefaults()
282     {
283         inherited_flags._empty_cells = initialEmptyCells();
284         inherited_flags._caption_side = initialCaptionSide();
285         inherited_flags._list_style_type = initialListStyleType();
286         inherited_flags._list_style_position = initialListStylePosition();
287         inherited_flags._visibility = initialVisibility();
288         inherited_flags._text_align = initialTextAlign();
289         inherited_flags._text_transform = initialTextTransform();
290         inherited_flags.m_textUnderline = false;
291         inherited_flags._cursor_style = initialCursor();
292         inherited_flags._direction = initialDirection();
293         inherited_flags._white_space = initialWhiteSpace();
294         inherited_flags._border_collapse = initialBorderCollapse();
295         inherited_flags.m_rtlOrdering = initialRTLOrdering();
296         inherited_flags._box_direction = initialBoxDirection();
297         inherited_flags.m_printColorAdjust = initialPrintColorAdjust();
298         inherited_flags._pointerEvents = initialPointerEvents();
299         inherited_flags._insideLink = NotInsideLink;
300         inherited_flags.m_writingMode = initialWritingMode();
301 
302         noninherited_flags.effectiveDisplay = noninherited_flags.originalDisplay = initialDisplay();
303         noninherited_flags.overflowX = initialOverflowX();
304         noninherited_flags.overflowY = initialOverflowY();
305         noninherited_flags.verticalAlign = initialVerticalAlign();
306         noninherited_flags.clear = initialClear();
307         noninherited_flags.position = initialPosition();
308         noninherited_flags.floating = initialFloating();
309         noninherited_flags.tableLayout = initialTableLayout();
310         noninherited_flags.unicodeBidi = initialUnicodeBidi();
311         noninherited_flags.pageBreakBefore = initialPageBreak();
312         noninherited_flags.pageBreakAfter = initialPageBreak();
313         noninherited_flags.pageBreakInside = initialPageBreak();
314         noninherited_flags.styleType = NOPSEUDO;
315         noninherited_flags.pseudoBits = 0;
316         noninherited_flags.explicitInheritance = false;
317         noninherited_flags.unique = false;
318         noninherited_flags.emptyState = false;
319         noninherited_flags.firstChildState = false;
320         noninherited_flags.lastChildState = false;
321         noninherited_flags.hasViewportUnits = false;
322         noninherited_flags.affectedByFocus = false;
323         noninherited_flags.affectedByHover = false;
324         noninherited_flags.affectedByActive = false;
325         noninherited_flags.affectedByDrag = false;
326         noninherited_flags.isLink = false;
327     }
328 
329 private:
330     ALWAYS_INLINE RenderStyle();
331 
332     enum DefaultStyleTag {
333         DefaultStyle
334     };
335     ALWAYS_INLINE explicit RenderStyle(DefaultStyleTag);
336     ALWAYS_INLINE RenderStyle(const RenderStyle&);
337 
338 public:
339     static PassRefPtr<RenderStyle> create();
340     static PassRefPtr<RenderStyle> createDefaultStyle();
341     static PassRefPtr<RenderStyle> createAnonymousStyleWithDisplay(const RenderStyle* parentStyle, EDisplay);
342     static PassRefPtr<RenderStyle> clone(const RenderStyle*);
343 
344     // Computes how the style change should be propagated down the tree.
345     static StyleRecalcChange stylePropagationDiff(const RenderStyle* oldStyle, const RenderStyle* newStyle);
346 
347     StyleDifference visualInvalidationDiff(const RenderStyle&) const;
348 
349     enum IsAtShadowBoundary {
350         AtShadowBoundary,
351         NotAtShadowBoundary,
352     };
353 
354     void inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary = NotAtShadowBoundary);
355     void copyNonInheritedFrom(const RenderStyle*);
356 
styleType()357     PseudoId styleType() const { return static_cast<PseudoId>(noninherited_flags.styleType); }
setStyleType(PseudoId styleType)358     void setStyleType(PseudoId styleType) { noninherited_flags.styleType = styleType; }
359 
360     RenderStyle* getCachedPseudoStyle(PseudoId) const;
361     RenderStyle* addCachedPseudoStyle(PassRefPtr<RenderStyle>);
362     void removeCachedPseudoStyle(PseudoId);
363 
cachedPseudoStyles()364     const PseudoStyleCache* cachedPseudoStyles() const { return m_cachedPseudoStyles.get(); }
365 
366     void setHasViewportUnits(bool hasViewportUnits = true) const { noninherited_flags.hasViewportUnits = hasViewportUnits; }
hasViewportUnits()367     bool hasViewportUnits() const { return noninherited_flags.hasViewportUnits; }
368 
affectedByFocus()369     bool affectedByFocus() const { return noninherited_flags.affectedByFocus; }
affectedByHover()370     bool affectedByHover() const { return noninherited_flags.affectedByHover; }
affectedByActive()371     bool affectedByActive() const { return noninherited_flags.affectedByActive; }
affectedByDrag()372     bool affectedByDrag() const { return noninherited_flags.affectedByDrag; }
373 
setAffectedByFocus()374     void setAffectedByFocus() { noninherited_flags.affectedByFocus = true; }
setAffectedByHover()375     void setAffectedByHover() { noninherited_flags.affectedByHover = true; }
setAffectedByActive()376     void setAffectedByActive() { noninherited_flags.affectedByActive = true; }
setAffectedByDrag()377     void setAffectedByDrag() { noninherited_flags.affectedByDrag = true; }
378 
379     bool operator==(const RenderStyle& other) const;
380     bool operator!=(const RenderStyle& other) const { return !(*this == other); }
isFloating()381     bool isFloating() const { return noninherited_flags.floating != NoFloat; }
hasMargin()382     bool hasMargin() const { return surround->margin.nonZero(); }
hasBorder()383     bool hasBorder() const { return surround->border.hasBorder(); }
hasPadding()384     bool hasPadding() const { return surround->padding.nonZero(); }
hasOffset()385     bool hasOffset() const { return surround->offset.nonZero(); }
hasMarginBeforeQuirk()386     bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); }
hasMarginAfterQuirk()387     bool hasMarginAfterQuirk() const { return marginAfter().quirk(); }
388 
hasBackgroundImage()389     bool hasBackgroundImage() const { return m_background->background().hasImage(); }
hasFixedBackgroundImage()390     bool hasFixedBackgroundImage() const { return m_background->background().hasFixedImage(); }
391 
392     bool hasEntirelyFixedBackground() const;
393 
hasAppearance()394     bool hasAppearance() const { return appearance() != NoControlPart; }
395 
hasBackground()396     bool hasBackground() const
397     {
398         Color color = visitedDependentColor(CSSPropertyBackgroundColor);
399         if (color.alpha())
400             return true;
401         return hasBackgroundImage();
402     }
403 
404     LayoutBoxExtent imageOutsets(const NinePieceImage&) const;
hasBorderImageOutsets()405     bool hasBorderImageOutsets() const
406     {
407         return borderImage().hasImage() && borderImage().outset().nonZero();
408     }
borderImageOutsets()409     LayoutBoxExtent borderImageOutsets() const
410     {
411         return imageOutsets(borderImage());
412     }
413 
maskBoxImageOutsets()414     LayoutBoxExtent maskBoxImageOutsets() const
415     {
416         return imageOutsets(maskBoxImage());
417     }
418 
hasFilterOutsets()419     bool hasFilterOutsets() const { return hasFilter() && filter().hasOutsets(); }
filterOutsets()420     FilterOutsets filterOutsets() const { return hasFilter() ? filter().outsets() : FilterOutsets(); }
421 
rtlOrdering()422     Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlOrdering); }
setRTLOrdering(Order o)423     void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; }
424 
425     bool isStyleAvailable() const;
426 
427     bool hasAnyPublicPseudoStyles() const;
428     bool hasPseudoStyle(PseudoId pseudo) const;
429     void setHasPseudoStyle(PseudoId pseudo);
430     bool hasUniquePseudoStyle() const;
431     bool hasPseudoElementStyle() const;
432 
433     // attribute getter methods
434 
display()435     EDisplay display() const { return static_cast<EDisplay>(noninherited_flags.effectiveDisplay); }
originalDisplay()436     EDisplay originalDisplay() const { return static_cast<EDisplay>(noninherited_flags.originalDisplay); }
437 
left()438     const Length& left() const { return surround->offset.left(); }
right()439     const Length& right() const { return surround->offset.right(); }
top()440     const Length& top() const { return surround->offset.top(); }
bottom()441     const Length& bottom() const { return surround->offset.bottom(); }
442 
443     // Accessors for positioned object edges that take into account writing mode.
logicalLeft()444     const Length& logicalLeft() const { return surround->offset.logicalLeft(writingMode()); }
logicalRight()445     const Length& logicalRight() const { return surround->offset.logicalRight(writingMode()); }
logicalTop()446     const Length& logicalTop() const { return surround->offset.before(writingMode()); }
logicalBottom()447     const Length& logicalBottom() const { return surround->offset.after(writingMode()); }
448 
449     // Whether or not a positioned element requires normal flow x/y to be computed
450     // to determine its position.
hasAutoLeftAndRight()451     bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto(); }
hasAutoTopAndBottom()452     bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto(); }
hasStaticInlinePosition(bool horizontal)453     bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? hasAutoLeftAndRight() : hasAutoTopAndBottom(); }
hasStaticBlockPosition(bool horizontal)454     bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? hasAutoTopAndBottom() : hasAutoLeftAndRight(); }
455 
position()456     EPosition position() const { return static_cast<EPosition>(noninherited_flags.position); }
hasOutOfFlowPosition()457     bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; }
hasInFlowPosition()458     bool hasInFlowPosition() const { return position() == RelativePosition; }
hasViewportConstrainedPosition()459     bool hasViewportConstrainedPosition() const { return position() == FixedPosition; }
floating()460     EFloat floating() const { return static_cast<EFloat>(noninherited_flags.floating); }
461 
width()462     const Length& width() const { return m_box->width(); }
height()463     const Length& height() const { return m_box->height(); }
minWidth()464     const Length& minWidth() const { return m_box->minWidth(); }
maxWidth()465     const Length& maxWidth() const { return m_box->maxWidth(); }
minHeight()466     const Length& minHeight() const { return m_box->minHeight(); }
maxHeight()467     const Length& maxHeight() const { return m_box->maxHeight(); }
468 
logicalWidth()469     const Length& logicalWidth() const { return isHorizontalWritingMode() ? width() : height(); }
logicalHeight()470     const Length& logicalHeight() const { return isHorizontalWritingMode() ? height() : width(); }
logicalMinWidth()471     const Length& logicalMinWidth() const { return isHorizontalWritingMode() ? minWidth() : minHeight(); }
logicalMaxWidth()472     const Length& logicalMaxWidth() const { return isHorizontalWritingMode() ? maxWidth() : maxHeight(); }
logicalMinHeight()473     const Length& logicalMinHeight() const { return isHorizontalWritingMode() ? minHeight() : minWidth(); }
logicalMaxHeight()474     const Length& logicalMaxHeight() const { return isHorizontalWritingMode() ? maxHeight() : maxWidth(); }
475 
border()476     const BorderData& border() const { return surround->border; }
borderLeft()477     const BorderValue& borderLeft() const { return surround->border.left(); }
borderRight()478     const BorderValue& borderRight() const { return surround->border.right(); }
borderTop()479     const BorderValue& borderTop() const { return surround->border.top(); }
borderBottom()480     const BorderValue& borderBottom() const { return surround->border.bottom(); }
481 
482     const BorderValue& borderBefore() const;
483     const BorderValue& borderAfter() const;
484     const BorderValue& borderStart() const;
485     const BorderValue& borderEnd() const;
486 
borderImage()487     const NinePieceImage& borderImage() const { return surround->border.image(); }
borderImageSource()488     StyleImage* borderImageSource() const { return surround->border.image().image(); }
borderImageSlices()489     const LengthBox& borderImageSlices() const { return surround->border.image().imageSlices(); }
borderImageWidth()490     const BorderImageLengthBox& borderImageWidth() const { return surround->border.image().borderSlices(); }
borderImageOutset()491     const BorderImageLengthBox& borderImageOutset() const { return surround->border.image().outset(); }
492 
borderTopLeftRadius()493     const LengthSize& borderTopLeftRadius() const { return surround->border.topLeft(); }
borderTopRightRadius()494     const LengthSize& borderTopRightRadius() const { return surround->border.topRight(); }
borderBottomLeftRadius()495     const LengthSize& borderBottomLeftRadius() const { return surround->border.bottomLeft(); }
borderBottomRightRadius()496     const LengthSize& borderBottomRightRadius() const { return surround->border.bottomRight(); }
hasBorderRadius()497     bool hasBorderRadius() const { return surround->border.hasBorderRadius(); }
498 
borderLeftWidth()499     unsigned borderLeftWidth() const { return surround->border.borderLeftWidth(); }
borderLeftStyle()500     EBorderStyle borderLeftStyle() const { return surround->border.left().style(); }
borderLeftIsTransparent()501     bool borderLeftIsTransparent() const { return surround->border.left().isTransparent(); }
borderRightWidth()502     unsigned borderRightWidth() const { return surround->border.borderRightWidth(); }
borderRightStyle()503     EBorderStyle borderRightStyle() const { return surround->border.right().style(); }
borderRightIsTransparent()504     bool borderRightIsTransparent() const { return surround->border.right().isTransparent(); }
borderTopWidth()505     unsigned borderTopWidth() const { return surround->border.borderTopWidth(); }
borderTopStyle()506     EBorderStyle borderTopStyle() const { return surround->border.top().style(); }
borderTopIsTransparent()507     bool borderTopIsTransparent() const { return surround->border.top().isTransparent(); }
borderBottomWidth()508     unsigned borderBottomWidth() const { return surround->border.borderBottomWidth(); }
borderBottomStyle()509     EBorderStyle borderBottomStyle() const { return surround->border.bottom().style(); }
borderBottomIsTransparent()510     bool borderBottomIsTransparent() const { return surround->border.bottom().isTransparent(); }
511 
512     unsigned short borderBeforeWidth() const;
513     unsigned short borderAfterWidth() const;
514     unsigned short borderStartWidth() const;
515     unsigned short borderEndWidth() const;
516 
outlineSize()517     unsigned short outlineSize() const { return max(0, outlineWidth() + outlineOffset()); }
outlineWidth()518     unsigned short outlineWidth() const
519     {
520         if (m_background->outline().style() == BNONE)
521             return 0;
522         return m_background->outline().width();
523     }
hasOutline()524     bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > BHIDDEN; }
outlineStyle()525     EBorderStyle outlineStyle() const { return m_background->outline().style(); }
outlineStyleIsAuto()526     OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto>(m_background->outline().isAuto()); }
527 
overflowX()528     EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_flags.overflowX); }
overflowY()529     EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_flags.overflowY); }
530     // It's sufficient to just check one direction, since it's illegal to have visible on only one overflow value.
isOverflowVisible()531     bool isOverflowVisible() const { ASSERT(overflowX() != OVISIBLE || overflowX() == overflowY()); return overflowX() == OVISIBLE; }
isOverflowPaged()532     bool isOverflowPaged() const { return overflowY() == OPAGEDX || overflowY() == OPAGEDY; }
533 
visibility()534     EVisibility visibility() const { return static_cast<EVisibility>(inherited_flags._visibility); }
verticalAlign()535     EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(noninherited_flags.verticalAlign); }
verticalAlignLength()536     const Length& verticalAlignLength() const { return m_box->verticalAlign(); }
537 
clipLeft()538     const Length& clipLeft() const { return visual->clip.left(); }
clipRight()539     const Length& clipRight() const { return visual->clip.right(); }
clipTop()540     const Length& clipTop() const { return visual->clip.top(); }
clipBottom()541     const Length& clipBottom() const { return visual->clip.bottom(); }
clip()542     const LengthBox& clip() const { return visual->clip; }
hasAutoClip()543     bool hasAutoClip() const { return visual->hasAutoClip; }
544 
unicodeBidi()545     EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninherited_flags.unicodeBidi); }
546 
clear()547     EClear clear() const { return static_cast<EClear>(noninherited_flags.clear); }
tableLayout()548     ETableLayout tableLayout() const { return static_cast<ETableLayout>(noninherited_flags.tableLayout); }
isFixedTableLayout()549     bool isFixedTableLayout() const { return tableLayout() == TFIXED && !logicalWidth().isAuto(); }
550 
551     const Font& font() const;
552     const FontMetrics& fontMetrics() const;
553     const FontDescription& fontDescription() const;
554     float specifiedFontSize() const;
555     float computedFontSize() const;
556     int fontSize() const;
557     FontWeight fontWeight() const;
558     FontStretch fontStretch() const;
559 
textAutosizingMultiplier()560     float textAutosizingMultiplier() const { return inherited->textAutosizingMultiplier; }
561 
textIndent()562     const Length& textIndent() const { return rareInheritedData->indent; }
textIndentLine()563     TextIndentLine textIndentLine() const { return static_cast<TextIndentLine>(rareInheritedData->m_textIndentLine); }
textIndentType()564     TextIndentType textIndentType() const { return static_cast<TextIndentType>(rareInheritedData->m_textIndentType); }
textAlign()565     ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flags._text_align); }
textAlignLast()566     TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(rareInheritedData->m_textAlignLast); }
textJustify()567     TextJustify textJustify() const { return static_cast<TextJustify>(rareInheritedData->m_textJustify); }
textTransform()568     ETextTransform textTransform() const { return static_cast<ETextTransform>(inherited_flags._text_transform); }
569     TextDecoration textDecorationsInEffect() const;
570     const Vector<AppliedTextDecoration>& appliedTextDecorations() const;
textDecoration()571     TextDecoration textDecoration() const { return static_cast<TextDecoration>(visual->textDecoration); }
textUnderlinePosition()572     TextUnderlinePosition textUnderlinePosition() const { return static_cast<TextUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); }
textDecorationStyle()573     TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(rareNonInheritedData->m_textDecorationStyle); }
574     float wordSpacing() const;
575     float letterSpacing() const;
576 
zoom()577     float zoom() const { return visual->m_zoom; }
effectiveZoom()578     float effectiveZoom() const { return rareInheritedData->m_effectiveZoom; }
579 
direction()580     TextDirection direction() const { return static_cast<TextDirection>(inherited_flags._direction); }
isLeftToRightDirection()581     bool isLeftToRightDirection() const { return direction() == LTR; }
582 
583     const Length& specifiedLineHeight() const;
584     Length lineHeight() const;
585     int computedLineHeight() const;
586 
whiteSpace()587     EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(inherited_flags._white_space); }
autoWrap(EWhiteSpace ws)588     static bool autoWrap(EWhiteSpace ws)
589     {
590         // Nowrap and pre don't automatically wrap.
591         return ws != NOWRAP && ws != PRE;
592     }
593 
autoWrap()594     bool autoWrap() const
595     {
596         return autoWrap(whiteSpace());
597     }
598 
preserveNewline(EWhiteSpace ws)599     static bool preserveNewline(EWhiteSpace ws)
600     {
601         // Normal and nowrap do not preserve newlines.
602         return ws != NORMAL && ws != NOWRAP;
603     }
604 
preserveNewline()605     bool preserveNewline() const
606     {
607         return preserveNewline(whiteSpace());
608     }
609 
collapseWhiteSpace(EWhiteSpace ws)610     static bool collapseWhiteSpace(EWhiteSpace ws)
611     {
612         // Pre and prewrap do not collapse whitespace.
613         return ws != PRE && ws != PRE_WRAP;
614     }
615 
collapseWhiteSpace()616     bool collapseWhiteSpace() const
617     {
618         return collapseWhiteSpace(whiteSpace());
619     }
620 
isCollapsibleWhiteSpace(UChar c)621     bool isCollapsibleWhiteSpace(UChar c) const
622     {
623         switch (c) {
624             case ' ':
625             case '\t':
626                 return collapseWhiteSpace();
627             case '\n':
628                 return !preserveNewline();
629         }
630         return false;
631     }
632 
breakOnlyAfterWhiteSpace()633     bool breakOnlyAfterWhiteSpace() const
634     {
635         return whiteSpace() == PRE_WRAP || lineBreak() == LineBreakAfterWhiteSpace;
636     }
637 
breakWords()638     bool breakWords() const
639     {
640         return wordBreak() == BreakWordBreak || overflowWrap() == BreakOverflowWrap;
641     }
642 
backgroundRepeatX()643     EFillRepeat backgroundRepeatX() const { return static_cast<EFillRepeat>(m_background->background().repeatX()); }
backgroundRepeatY()644     EFillRepeat backgroundRepeatY() const { return static_cast<EFillRepeat>(m_background->background().repeatY()); }
backgroundComposite()645     CompositeOperator backgroundComposite() const { return static_cast<CompositeOperator>(m_background->background().composite()); }
backgroundAttachment()646     EFillAttachment backgroundAttachment() const { return static_cast<EFillAttachment>(m_background->background().attachment()); }
backgroundClip()647     EFillBox backgroundClip() const { return static_cast<EFillBox>(m_background->background().clip()); }
backgroundOrigin()648     EFillBox backgroundOrigin() const { return static_cast<EFillBox>(m_background->background().origin()); }
backgroundXPosition()649     const Length& backgroundXPosition() const { return m_background->background().xPosition(); }
backgroundYPosition()650     const Length& backgroundYPosition() const { return m_background->background().yPosition(); }
backgroundSizeType()651     EFillSizeType backgroundSizeType() const { return m_background->background().sizeType(); }
backgroundSizeLength()652     const LengthSize& backgroundSizeLength() const { return m_background->background().sizeLength(); }
accessBackgroundLayers()653     FillLayer& accessBackgroundLayers() { return m_background.access()->m_background; }
backgroundLayers()654     const FillLayer& backgroundLayers() const { return m_background->background(); }
655 
maskImage()656     StyleImage* maskImage() const { return rareNonInheritedData->m_mask.image(); }
maskRepeatX()657     EFillRepeat maskRepeatX() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.repeatX()); }
maskRepeatY()658     EFillRepeat maskRepeatY() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.repeatY()); }
maskComposite()659     CompositeOperator maskComposite() const { return static_cast<CompositeOperator>(rareNonInheritedData->m_mask.composite()); }
maskClip()660     EFillBox maskClip() const { return static_cast<EFillBox>(rareNonInheritedData->m_mask.clip()); }
maskOrigin()661     EFillBox maskOrigin() const { return static_cast<EFillBox>(rareNonInheritedData->m_mask.origin()); }
maskXPosition()662     const Length& maskXPosition() const { return rareNonInheritedData->m_mask.xPosition(); }
maskYPosition()663     const Length& maskYPosition() const { return rareNonInheritedData->m_mask.yPosition(); }
maskSizeType()664     EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.sizeType(); }
maskSizeLength()665     const LengthSize& maskSizeLength() const { return rareNonInheritedData->m_mask.sizeLength(); }
accessMaskLayers()666     FillLayer& accessMaskLayers() { return rareNonInheritedData.access()->m_mask; }
maskLayers()667     const FillLayer& maskLayers() const { return rareNonInheritedData->m_mask; }
668 
maskBoxImage()669     const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_maskBoxImage; }
maskBoxImageSource()670     StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_maskBoxImage.image(); }
maskBoxImageSlices()671     const LengthBox& maskBoxImageSlices() const { return rareNonInheritedData->m_maskBoxImage.imageSlices(); }
maskBoxImageSlicesFill()672     bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBoxImage.fill(); }
maskBoxImageWidth()673     const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheritedData->m_maskBoxImage.borderSlices(); }
maskBoxImageOutset()674     const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInheritedData->m_maskBoxImage.outset(); }
675 
borderCollapse()676     EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse>(inherited_flags._border_collapse); }
677     short horizontalBorderSpacing() const;
678     short verticalBorderSpacing() const;
emptyCells()679     EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_flags._empty_cells); }
captionSide()680     ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherited_flags._caption_side); }
681 
listStyleType()682     EListStyleType listStyleType() const { return static_cast<EListStyleType>(inherited_flags._list_style_type); }
683     StyleImage* listStyleImage() const;
listStylePosition()684     EListStylePosition listStylePosition() const { return static_cast<EListStylePosition>(inherited_flags._list_style_position); }
685 
marginTop()686     const Length& marginTop() const { return surround->margin.top(); }
marginBottom()687     const Length& marginBottom() const { return surround->margin.bottom(); }
marginLeft()688     const Length& marginLeft() const { return surround->margin.left(); }
marginRight()689     const Length& marginRight() const { return surround->margin.right(); }
marginBefore()690     const Length& marginBefore() const { return surround->margin.before(writingMode()); }
marginAfter()691     const Length& marginAfter() const { return surround->margin.after(writingMode()); }
marginStart()692     const Length& marginStart() const { return surround->margin.start(writingMode(), direction()); }
marginEnd()693     const Length& marginEnd() const { return surround->margin.end(writingMode(), direction()); }
marginStartUsing(const RenderStyle * otherStyle)694     const Length& marginStartUsing(const RenderStyle* otherStyle) const { return surround->margin.start(otherStyle->writingMode(), otherStyle->direction()); }
marginEndUsing(const RenderStyle * otherStyle)695     const Length& marginEndUsing(const RenderStyle* otherStyle) const { return surround->margin.end(otherStyle->writingMode(), otherStyle->direction()); }
marginBeforeUsing(const RenderStyle * otherStyle)696     const Length& marginBeforeUsing(const RenderStyle* otherStyle) const { return surround->margin.before(otherStyle->writingMode()); }
marginAfterUsing(const RenderStyle * otherStyle)697     const Length& marginAfterUsing(const RenderStyle* otherStyle) const { return surround->margin.after(otherStyle->writingMode()); }
698 
paddingBox()699     const LengthBox& paddingBox() const { return surround->padding; }
paddingTop()700     const Length& paddingTop() const { return surround->padding.top(); }
paddingBottom()701     const Length& paddingBottom() const { return surround->padding.bottom(); }
paddingLeft()702     const Length& paddingLeft() const { return surround->padding.left(); }
paddingRight()703     const Length& paddingRight() const { return surround->padding.right(); }
paddingBefore()704     const Length& paddingBefore() const { return surround->padding.before(writingMode()); }
paddingAfter()705     const Length& paddingAfter() const { return surround->padding.after(writingMode()); }
paddingStart()706     const Length& paddingStart() const { return surround->padding.start(writingMode(), direction()); }
paddingEnd()707     const Length& paddingEnd() const { return surround->padding.end(writingMode(), direction()); }
708 
cursor()709     ECursor cursor() const { return static_cast<ECursor>(inherited_flags._cursor_style); }
cursors()710     CursorList* cursors() const { return rareInheritedData->cursorData.get(); }
711 
insideLink()712     EInsideLink insideLink() const { return static_cast<EInsideLink>(inherited_flags._insideLink); }
isLink()713     bool isLink() const { return noninherited_flags.isLink; }
714 
widows()715     short widows() const { return rareInheritedData->widows; }
orphans()716     short orphans() const { return rareInheritedData->orphans; }
hasAutoWidows()717     bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; }
hasAutoOrphans()718     bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; }
pageBreakInside()719     EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninherited_flags.pageBreakInside); }
pageBreakBefore()720     EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninherited_flags.pageBreakBefore); }
pageBreakAfter()721     EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(noninherited_flags.pageBreakAfter); }
722 
723     // CSS3 Getter Methods
724 
outlineOffset()725     int outlineOffset() const
726     {
727         if (m_background->outline().style() == BNONE)
728             return 0;
729         return m_background->outline().offset();
730     }
731 
textShadow()732     ShadowList* textShadow() const { return rareInheritedData->textShadow.get(); }
getTextShadowExtent(LayoutUnit & top,LayoutUnit & right,LayoutUnit & bottom,LayoutUnit & left)733     void getTextShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const { getShadowExtent(textShadow(), top, right, bottom, left); }
getTextShadowHorizontalExtent(LayoutUnit & left,LayoutUnit & right)734     void getTextShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(textShadow(), left, right); }
getTextShadowVerticalExtent(LayoutUnit & top,LayoutUnit & bottom)735     void getTextShadowVerticalExtent(LayoutUnit& top, LayoutUnit& bottom) const { getShadowVerticalExtent(textShadow(), top, bottom); }
getTextShadowInlineDirectionExtent(LayoutUnit & logicalLeft,LayoutUnit & logicalRight)736     void getTextShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(textShadow(), logicalLeft, logicalRight); }
getTextShadowBlockDirectionExtent(LayoutUnit & logicalTop,LayoutUnit & logicalBottom)737     void getTextShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& logicalBottom) { getShadowBlockDirectionExtent(textShadow(), logicalTop, logicalBottom); }
738 
textStrokeWidth()739     float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; }
opacity()740     float opacity() const { return rareNonInheritedData->opacity; }
hasOpacity()741     bool hasOpacity() const { return opacity() < 1.0f; }
appearance()742     ControlPart appearance() const { return static_cast<ControlPart>(rareNonInheritedData->m_appearance); }
743     // aspect ratio convenience method
hasAspectRatio()744     bool hasAspectRatio() const { return rareNonInheritedData->m_hasAspectRatio; }
aspectRatio()745     float aspectRatio() const { return aspectRatioNumerator() / aspectRatioDenominator(); }
aspectRatioDenominator()746     float aspectRatioDenominator() const { return rareNonInheritedData->m_aspectRatioDenominator; }
aspectRatioNumerator()747     float aspectRatioNumerator() const { return rareNonInheritedData->m_aspectRatioNumerator; }
boxAlign()748     EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(rareNonInheritedData->m_deprecatedFlexibleBox->align); }
boxDirection()749     EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(inherited_flags._box_direction); }
boxFlex()750     float boxFlex() const { return rareNonInheritedData->m_deprecatedFlexibleBox->flex; }
boxFlexGroup()751     unsigned boxFlexGroup() const { return rareNonInheritedData->m_deprecatedFlexibleBox->flexGroup; }
boxLines()752     EBoxLines boxLines() const { return static_cast<EBoxLines>(rareNonInheritedData->m_deprecatedFlexibleBox->lines); }
boxOrdinalGroup()753     unsigned boxOrdinalGroup() const { return rareNonInheritedData->m_deprecatedFlexibleBox->ordinalGroup; }
boxOrient()754     EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(rareNonInheritedData->m_deprecatedFlexibleBox->orient); }
boxPack()755     EBoxPack boxPack() const { return static_cast<EBoxPack>(rareNonInheritedData->m_deprecatedFlexibleBox->pack); }
756 
order()757     int order() const { return rareNonInheritedData->m_order; }
callbackSelectors()758     const Vector<String>& callbackSelectors() const { return rareNonInheritedData->m_callbackSelectors; }
flexGrow()759     float flexGrow() const { return rareNonInheritedData->m_flexibleBox->m_flexGrow; }
flexShrink()760     float flexShrink() const { return rareNonInheritedData->m_flexibleBox->m_flexShrink; }
flexBasis()761     const Length& flexBasis() const { return rareNonInheritedData->m_flexibleBox->m_flexBasis; }
alignContent()762     EAlignContent alignContent() const { return static_cast<EAlignContent>(rareNonInheritedData->m_alignContent); }
alignItems()763     ItemPosition alignItems() const { return static_cast<ItemPosition>(rareNonInheritedData->m_alignItems); }
alignItemsOverflowAlignment()764     OverflowAlignment alignItemsOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_alignItemsOverflowAlignment); }
alignSelf()765     ItemPosition alignSelf() const { return static_cast<ItemPosition>(rareNonInheritedData->m_alignSelf); }
alignSelfOverflowAlignment()766     OverflowAlignment alignSelfOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_alignSelfOverflowAlignment); }
flexDirection()767     EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(rareNonInheritedData->m_flexibleBox->m_flexDirection); }
isColumnFlexDirection()768     bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; }
isReverseFlexDirection()769     bool isReverseFlexDirection() const { return flexDirection() == FlowRowReverse || flexDirection() == FlowColumnReverse; }
flexWrap()770     EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(rareNonInheritedData->m_flexibleBox->m_flexWrap); }
justifyContent()771     EJustifyContent justifyContent() const { return static_cast<EJustifyContent>(rareNonInheritedData->m_justifyContent); }
justifyItems()772     ItemPosition justifyItems() const { return static_cast<ItemPosition>(rareNonInheritedData->m_justifyItems); }
justifyItemsOverflowAlignment()773     OverflowAlignment justifyItemsOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_justifyItemsOverflowAlignment); }
justifyItemsPositionType()774     ItemPositionType justifyItemsPositionType() const { return static_cast<ItemPositionType>(rareNonInheritedData->m_justifyItemsPositionType); }
justifySelf()775     ItemPosition justifySelf() const { return static_cast<ItemPosition>(rareNonInheritedData->m_justifySelf); }
justifySelfOverflowAlignment()776     OverflowAlignment justifySelfOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_justifySelfOverflowAlignment); }
777 
gridTemplateColumns()778     const Vector<GridTrackSize>& gridTemplateColumns() const { return rareNonInheritedData->m_grid->m_gridTemplateColumns; }
gridTemplateRows()779     const Vector<GridTrackSize>& gridTemplateRows() const { return rareNonInheritedData->m_grid->m_gridTemplateRows; }
namedGridColumnLines()780     const NamedGridLinesMap& namedGridColumnLines() const { return rareNonInheritedData->m_grid->m_namedGridColumnLines; }
namedGridRowLines()781     const NamedGridLinesMap& namedGridRowLines() const { return rareNonInheritedData->m_grid->m_namedGridRowLines; }
orderedNamedGridColumnLines()782     const OrderedNamedGridLines& orderedNamedGridColumnLines() const { return rareNonInheritedData->m_grid->m_orderedNamedGridColumnLines; }
orderedNamedGridRowLines()783     const OrderedNamedGridLines& orderedNamedGridRowLines() const { return rareNonInheritedData->m_grid->m_orderedNamedGridRowLines; }
namedGridArea()784     const NamedGridAreaMap& namedGridArea() const { return rareNonInheritedData->m_grid->m_namedGridArea; }
namedGridAreaRowCount()785     size_t namedGridAreaRowCount() const { return rareNonInheritedData->m_grid->m_namedGridAreaRowCount; }
namedGridAreaColumnCount()786     size_t namedGridAreaColumnCount() const { return rareNonInheritedData->m_grid->m_namedGridAreaColumnCount; }
gridAutoFlow()787     GridAutoFlow gridAutoFlow() const { return static_cast<GridAutoFlow>(rareNonInheritedData->m_grid->m_gridAutoFlow); }
isGridAutoFlowDirectionRow()788     bool isGridAutoFlowDirectionRow() const { return (rareNonInheritedData->m_grid->m_gridAutoFlow & InternalAutoFlowDirectionRow) == InternalAutoFlowDirectionRow; }
isGridAutoFlowDirectionColumn()789     bool isGridAutoFlowDirectionColumn() const { return (rareNonInheritedData->m_grid->m_gridAutoFlow & InternalAutoFlowDirectionColumn) == InternalAutoFlowDirectionColumn; }
isGridAutoFlowAlgorithmSparse()790     bool isGridAutoFlowAlgorithmSparse() const { return (rareNonInheritedData->m_grid->m_gridAutoFlow & InternalAutoFlowAlgorithmSparse) == InternalAutoFlowAlgorithmSparse; }
isGridAutoFlowAlgorithmDense()791     bool isGridAutoFlowAlgorithmDense() const { return (rareNonInheritedData->m_grid->m_gridAutoFlow & InternalAutoFlowAlgorithmDense) == InternalAutoFlowAlgorithmDense; }
isGridAutoFlowAlgorithmStack()792     bool isGridAutoFlowAlgorithmStack() const { return (rareNonInheritedData->m_grid->m_gridAutoFlow & InternalAutoFlowAlgorithmStack) == InternalAutoFlowAlgorithmStack; }
gridAutoColumns()793     const GridTrackSize& gridAutoColumns() const { return rareNonInheritedData->m_grid->m_gridAutoColumns; }
gridAutoRows()794     const GridTrackSize& gridAutoRows() const { return rareNonInheritedData->m_grid->m_gridAutoRows; }
795 
gridColumnStart()796     const GridPosition& gridColumnStart() const { return rareNonInheritedData->m_gridItem->m_gridColumnStart; }
gridColumnEnd()797     const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_gridItem->m_gridColumnEnd; }
gridRowStart()798     const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gridItem->m_gridRowStart; }
gridRowEnd()799     const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_gridItem->m_gridRowEnd; }
800 
boxShadow()801     ShadowList* boxShadow() const { return rareNonInheritedData->m_boxShadow.get(); }
getBoxShadowExtent(LayoutUnit & top,LayoutUnit & right,LayoutUnit & bottom,LayoutUnit & left)802     void getBoxShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const { getShadowExtent(boxShadow(), top, right, bottom, left); }
getBoxShadowInsetExtent()803     LayoutBoxExtent getBoxShadowInsetExtent() const { return getShadowInsetExtent(boxShadow()); }
getBoxShadowHorizontalExtent(LayoutUnit & left,LayoutUnit & right)804     void getBoxShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(boxShadow(), left, right); }
getBoxShadowVerticalExtent(LayoutUnit & top,LayoutUnit & bottom)805     void getBoxShadowVerticalExtent(LayoutUnit& top, LayoutUnit& bottom) const { getShadowVerticalExtent(boxShadow(), top, bottom); }
getBoxShadowInlineDirectionExtent(LayoutUnit & logicalLeft,LayoutUnit & logicalRight)806     void getBoxShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(boxShadow(), logicalLeft, logicalRight); }
getBoxShadowBlockDirectionExtent(LayoutUnit & logicalTop,LayoutUnit & logicalBottom)807     void getBoxShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& logicalBottom) { getShadowBlockDirectionExtent(boxShadow(), logicalTop, logicalBottom); }
808 
boxDecorationBreak()809     EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecorationBreak(); }
boxReflect()810     StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxReflect.get(); }
reflectionDataEquivalent(const RenderStyle * otherStyle)811     bool reflectionDataEquivalent(const RenderStyle* otherStyle) const { return rareNonInheritedData->reflectionDataEquivalent(*otherStyle->rareNonInheritedData); }
812 
813     // FIXME: reflections should belong to this helper function but they are currently handled
814     // through their self-painting layers. So the rendering code doesn't account for them.
hasVisualOverflowingEffect()815     bool hasVisualOverflowingEffect() const { return boxShadow() || hasBorderImageOutsets() || hasOutline(); }
816 
boxSizing()817     EBoxSizing boxSizing() const { return m_box->boxSizing(); }
marqueeIncrement()818     const Length& marqueeIncrement() const { return rareNonInheritedData->m_marquee->increment; }
marqueeSpeed()819     int marqueeSpeed() const { return rareNonInheritedData->m_marquee->speed; }
marqueeLoopCount()820     int marqueeLoopCount() const { return rareNonInheritedData->m_marquee->loops; }
marqueeBehavior()821     EMarqueeBehavior marqueeBehavior() const { return static_cast<EMarqueeBehavior>(rareNonInheritedData->m_marquee->behavior); }
marqueeDirection()822     EMarqueeDirection marqueeDirection() const { return static_cast<EMarqueeDirection>(rareNonInheritedData->m_marquee->direction); }
userModify()823     EUserModify userModify() const { return static_cast<EUserModify>(rareInheritedData->userModify); }
userDrag()824     EUserDrag userDrag() const { return static_cast<EUserDrag>(rareNonInheritedData->userDrag); }
userSelect()825     EUserSelect userSelect() const { return static_cast<EUserSelect>(rareInheritedData->userSelect); }
textOverflow()826     TextOverflow textOverflow() const { return static_cast<TextOverflow>(rareNonInheritedData->textOverflow); }
marginBeforeCollapse()827     EMarginCollapse marginBeforeCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginBeforeCollapse); }
marginAfterCollapse()828     EMarginCollapse marginAfterCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginAfterCollapse); }
wordBreak()829     EWordBreak wordBreak() const { return static_cast<EWordBreak>(rareInheritedData->wordBreak); }
overflowWrap()830     EOverflowWrap overflowWrap() const { return static_cast<EOverflowWrap>(rareInheritedData->overflowWrap); }
lineBreak()831     LineBreak lineBreak() const { return static_cast<LineBreak>(rareInheritedData->lineBreak); }
highlight()832     const AtomicString& highlight() const { return rareInheritedData->highlight; }
hyphenationString()833     const AtomicString& hyphenationString() const { return rareInheritedData->hyphenationString; }
locale()834     const AtomicString& locale() const { return rareInheritedData->locale; }
borderFit()835     EBorderFit borderFit() const { return static_cast<EBorderFit>(rareNonInheritedData->m_borderFit); }
resize()836     EResize resize() const { return static_cast<EResize>(rareInheritedData->resize); }
hasInlinePaginationAxis()837     bool hasInlinePaginationAxis() const
838     {
839         // If the pagination axis is parallel with the writing mode inline axis, columns may be laid
840         // out along the inline axis, just like for regular multicol. Otherwise, we need to lay out
841         // along the block axis.
842         if (isOverflowPaged())
843             return (overflowY() == OPAGEDX) == isHorizontalWritingMode();
844         return false;
845     }
columnWidth()846     float columnWidth() const { return rareNonInheritedData->m_multiCol->m_width; }
hasAutoColumnWidth()847     bool hasAutoColumnWidth() const { return rareNonInheritedData->m_multiCol->m_autoWidth; }
columnCount()848     unsigned short columnCount() const { return rareNonInheritedData->m_multiCol->m_count; }
hasAutoColumnCount()849     bool hasAutoColumnCount() const { return rareNonInheritedData->m_multiCol->m_autoCount; }
specifiesColumns()850     bool specifiesColumns() const { return !hasAutoColumnCount() || !hasAutoColumnWidth(); }
columnFill()851     ColumnFill columnFill() const { return static_cast<ColumnFill>(rareNonInheritedData->m_multiCol->m_fill); }
columnGap()852     float columnGap() const { return rareNonInheritedData->m_multiCol->m_gap; }
hasNormalColumnGap()853     bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m_normalGap; }
columnRuleStyle()854     EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiCol->m_rule.style(); }
columnRuleWidth()855     unsigned short columnRuleWidth() const { return rareNonInheritedData->m_multiCol->ruleWidth(); }
columnRuleIsTransparent()856     bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiCol->m_rule.isTransparent(); }
columnSpan()857     ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheritedData->m_multiCol->m_columnSpan); }
columnBreakBefore()858     EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakBefore); }
columnBreakInside()859     EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakInside); }
columnBreakAfter()860     EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakAfter); }
hasInlineTransform()861     bool hasInlineTransform() const { return rareNonInheritedData->m_hasInlineTransform; }
transform()862     const TransformOperations& transform() const { return rareNonInheritedData->m_transform->m_operations; }
transformOriginX()863     const Length& transformOriginX() const { return rareNonInheritedData->m_transform->m_x; }
transformOriginY()864     const Length& transformOriginY() const { return rareNonInheritedData->m_transform->m_y; }
transformOriginZ()865     float transformOriginZ() const { return rareNonInheritedData->m_transform->m_z; }
hasTransform()866     bool hasTransform() const { return !rareNonInheritedData->m_transform->m_operations.operations().isEmpty(); }
transformDataEquivalent(const RenderStyle & otherStyle)867     bool transformDataEquivalent(const RenderStyle& otherStyle) const { return rareNonInheritedData->m_transform == otherStyle.rareNonInheritedData->m_transform; }
868 
textEmphasisFill()869     TextEmphasisFill textEmphasisFill() const { return static_cast<TextEmphasisFill>(rareInheritedData->textEmphasisFill); }
870     TextEmphasisMark textEmphasisMark() const;
textEmphasisCustomMark()871     const AtomicString& textEmphasisCustomMark() const { return rareInheritedData->textEmphasisCustomMark; }
textEmphasisPosition()872     TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextEmphasisPosition>(rareInheritedData->textEmphasisPosition); }
873     const AtomicString& textEmphasisMarkString() const;
874 
rubyPosition()875     RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInheritedData->m_rubyPosition); }
876 
textOrientation()877     TextOrientation textOrientation() const { return static_cast<TextOrientation>(rareInheritedData->m_textOrientation); }
878 
objectFit()879     ObjectFit objectFit() const { return static_cast<ObjectFit>(rareNonInheritedData->m_objectFit); }
objectPosition()880     LengthPoint objectPosition() const { return rareNonInheritedData->m_objectPosition; }
881 
882     // Return true if any transform related property (currently transform, transformStyle3D or perspective)
883     // indicates that we are transforming
hasTransformRelatedProperty()884     bool hasTransformRelatedProperty() const { return hasTransform() || preserves3D() || hasPerspective(); }
885 
886     enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin };
887     void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize, ApplyTransformOrigin = IncludeTransformOrigin) const;
888     void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, ApplyTransformOrigin = IncludeTransformOrigin) const;
889 
hasMask()890     bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rareNonInheritedData->m_maskBoxImage.hasImage(); }
891 
textCombine()892     TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInheritedData->m_textCombine); }
hasTextCombine()893     bool hasTextCombine() const { return textCombine() != TextCombineNone; }
894 
tabSize()895     unsigned tabSize() const { return rareInheritedData->m_tabSize; }
896 
897     // End CSS3 Getters
898 
wrapFlow()899     WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedData->m_wrapFlow); }
wrapThrough()900     WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInheritedData->m_wrapThrough); }
901 
902     // Apple-specific property getter methods
pointerEvents()903     EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(inherited_flags._pointerEvents); }
animations()904     const CSSAnimationData* animations() const { return rareNonInheritedData->m_animations.get(); }
transitions()905     const CSSTransitionData* transitions() const { return rareNonInheritedData->m_transitions.get(); }
906 
907     CSSAnimationData& accessAnimations();
908     CSSTransitionData& accessTransitions();
909 
transformStyle3D()910     ETransformStyle3D transformStyle3D() const { return static_cast<ETransformStyle3D>(rareNonInheritedData->m_transformStyle3D); }
preserves3D()911     bool preserves3D() const { return rareNonInheritedData->m_transformStyle3D == TransformStyle3DPreserve3D; }
912 
backfaceVisibility()913     EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfaceVisibility>(rareNonInheritedData->m_backfaceVisibility); }
perspective()914     float perspective() const { return rareNonInheritedData->m_perspective; }
hasPerspective()915     bool hasPerspective() const { return rareNonInheritedData->m_perspective > 0; }
perspectiveOriginX()916     const Length& perspectiveOriginX() const { return rareNonInheritedData->m_perspectiveOriginX; }
perspectiveOriginY()917     const Length& perspectiveOriginY() const { return rareNonInheritedData->m_perspectiveOriginY; }
pageSize()918     const LengthSize& pageSize() const { return rareNonInheritedData->m_pageSize; }
pageSizeType()919     PageSizeType pageSizeType() const { return static_cast<PageSizeType>(rareNonInheritedData->m_pageSizeType); }
920 
hasCurrentOpacityAnimation()921     bool hasCurrentOpacityAnimation() const { return rareNonInheritedData->m_hasCurrentOpacityAnimation; }
hasCurrentTransformAnimation()922     bool hasCurrentTransformAnimation() const { return rareNonInheritedData->m_hasCurrentTransformAnimation; }
hasCurrentFilterAnimation()923     bool hasCurrentFilterAnimation() const { return rareNonInheritedData->m_hasCurrentFilterAnimation; }
shouldCompositeForCurrentAnimations()924     bool shouldCompositeForCurrentAnimations() { return hasCurrentOpacityAnimation() || hasCurrentTransformAnimation() || hasCurrentFilterAnimation(); }
925 
isRunningOpacityAnimationOnCompositor()926     bool isRunningOpacityAnimationOnCompositor() const { return rareNonInheritedData->m_runningOpacityAnimationOnCompositor; }
isRunningTransformAnimationOnCompositor()927     bool isRunningTransformAnimationOnCompositor() const { return rareNonInheritedData->m_runningTransformAnimationOnCompositor; }
isRunningFilterAnimationOnCompositor()928     bool isRunningFilterAnimationOnCompositor() const { return rareNonInheritedData->m_runningFilterAnimationOnCompositor; }
isRunningAnimationOnCompositor()929     bool isRunningAnimationOnCompositor() { return isRunningOpacityAnimationOnCompositor() || isRunningTransformAnimationOnCompositor() || isRunningFilterAnimationOnCompositor(); }
930 
lineBoxContain()931     LineBoxContain lineBoxContain() const { return rareInheritedData->m_lineBoxContain; }
lineClamp()932     const LineClampValue& lineClamp() const { return rareNonInheritedData->lineClamp; }
tapHighlightColor()933     Color tapHighlightColor() const { return rareInheritedData->tapHighlightColor; }
textSecurity()934     ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(rareInheritedData->textSecurity); }
935 
writingMode()936     WritingMode writingMode() const { return static_cast<WritingMode>(inherited_flags.m_writingMode); }
isHorizontalWritingMode()937     bool isHorizontalWritingMode() const { return blink::isHorizontalWritingMode(writingMode()); }
isFlippedLinesWritingMode()938     bool isFlippedLinesWritingMode() const { return blink::isFlippedLinesWritingMode(writingMode()); }
isFlippedBlocksWritingMode()939     bool isFlippedBlocksWritingMode() const { return blink::isFlippedBlocksWritingMode(writingMode()); }
940 
imageRendering()941     EImageRendering imageRendering() const { return static_cast<EImageRendering>(rareInheritedData->m_imageRendering); }
942 
speak()943     ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak); }
944 
mutableFilter()945     FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_filter.access()->m_operations; }
filter()946     const FilterOperations& filter() const { return rareNonInheritedData->m_filter->m_operations; }
hasFilter()947     bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operations.operations().isEmpty(); }
948 
949     WebBlendMode blendMode() const;
950     void setBlendMode(WebBlendMode v);
951     bool hasBlendMode() const;
952 
953     EIsolation isolation() const;
954     void setIsolation(EIsolation v);
955     bool hasIsolation() const;
956 
shouldPlaceBlockDirectionScrollbarOnLogicalLeft()957     bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const { return !isLeftToRightDirection() && isHorizontalWritingMode(); }
958 
touchAction()959     TouchAction touchAction() const { return static_cast<TouchAction>(rareNonInheritedData->m_touchAction); }
touchActionDelay()960     TouchActionDelay touchActionDelay() const { return static_cast<TouchActionDelay>(rareInheritedData->m_touchActionDelay); }
961 
scrollBehavior()962     ScrollBehavior scrollBehavior() const { return static_cast<ScrollBehavior>(rareNonInheritedData->m_scrollBehavior); }
963 
willChangeProperties()964     const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonInheritedData->m_willChange->m_properties; }
willChangeContents()965     bool willChangeContents() const { return rareNonInheritedData->m_willChange->m_contents; }
willChangeScrollPosition()966     bool willChangeScrollPosition() const { return rareNonInheritedData->m_willChange->m_scrollPosition; }
967     bool hasWillChangeCompositingHint() const;
subtreeWillChangeContents()968     bool subtreeWillChangeContents() const { return rareInheritedData->m_subtreeWillChangeContents; }
969 
970 // attribute setter methods
971 
setDisplay(EDisplay v)972     void setDisplay(EDisplay v) { noninherited_flags.effectiveDisplay = v; }
setOriginalDisplay(EDisplay v)973     void setOriginalDisplay(EDisplay v) { noninherited_flags.originalDisplay = v; }
setPosition(EPosition v)974     void setPosition(EPosition v) { noninherited_flags.position = v; }
setFloating(EFloat v)975     void setFloating(EFloat v) { noninherited_flags.floating = v; }
976 
setLeft(const Length & v)977     void setLeft(const Length& v) { SET_VAR(surround, offset.m_left, v); }
setRight(const Length & v)978     void setRight(const Length& v) { SET_VAR(surround, offset.m_right, v); }
setTop(const Length & v)979     void setTop(const Length& v) { SET_VAR(surround, offset.m_top, v); }
setBottom(const Length & v)980     void setBottom(const Length& v) { SET_VAR(surround, offset.m_bottom, v); }
981 
setWidth(const Length & v)982     void setWidth(const Length& v) { SET_VAR(m_box, m_width, v); }
setHeight(const Length & v)983     void setHeight(const Length& v) { SET_VAR(m_box, m_height, v); }
984 
setLogicalWidth(const Length & v)985     void setLogicalWidth(const Length& v)
986     {
987         if (isHorizontalWritingMode()) {
988             SET_VAR(m_box, m_width, v);
989         } else {
990             SET_VAR(m_box, m_height, v);
991         }
992     }
993 
setLogicalHeight(const Length & v)994     void setLogicalHeight(const Length& v)
995     {
996         if (isHorizontalWritingMode()) {
997             SET_VAR(m_box, m_height, v);
998         } else {
999             SET_VAR(m_box, m_width, v);
1000         }
1001     }
1002 
setMinWidth(const Length & v)1003     void setMinWidth(const Length& v) { SET_VAR(m_box, m_minWidth, v); }
setMaxWidth(const Length & v)1004     void setMaxWidth(const Length& v) { SET_VAR(m_box, m_maxWidth, v); }
setMinHeight(const Length & v)1005     void setMinHeight(const Length& v) { SET_VAR(m_box, m_minHeight, v); }
setMaxHeight(const Length & v)1006     void setMaxHeight(const Length& v) { SET_VAR(m_box, m_maxHeight, v); }
1007 
getDraggableRegionMode()1008     DraggableRegionMode getDraggableRegionMode() const { return rareNonInheritedData->m_draggableRegionMode; }
setDraggableRegionMode(DraggableRegionMode v)1009     void setDraggableRegionMode(DraggableRegionMode v) { SET_VAR(rareNonInheritedData, m_draggableRegionMode, v); }
1010 
resetBorder()1011     void resetBorder()
1012     {
1013         resetBorderImage();
1014         resetBorderTop();
1015         resetBorderRight();
1016         resetBorderBottom();
1017         resetBorderLeft();
1018         resetBorderTopLeftRadius();
1019         resetBorderTopRightRadius();
1020         resetBorderBottomLeftRadius();
1021         resetBorderBottomRightRadius();
1022     }
resetBorderTop()1023     void resetBorderTop() { SET_VAR(surround, border.m_top, BorderValue()); }
resetBorderRight()1024     void resetBorderRight() { SET_VAR(surround, border.m_right, BorderValue()); }
resetBorderBottom()1025     void resetBorderBottom() { SET_VAR(surround, border.m_bottom, BorderValue()); }
resetBorderLeft()1026     void resetBorderLeft() { SET_VAR(surround, border.m_left, BorderValue()); }
resetBorderImage()1027     void resetBorderImage() { SET_VAR(surround, border.m_image, NinePieceImage()); }
resetBorderTopLeftRadius()1028     void resetBorderTopLeftRadius() { SET_VAR(surround, border.m_topLeft, initialBorderRadius()); }
resetBorderTopRightRadius()1029     void resetBorderTopRightRadius() { SET_VAR(surround, border.m_topRight, initialBorderRadius()); }
resetBorderBottomLeftRadius()1030     void resetBorderBottomLeftRadius() { SET_VAR(surround, border.m_bottomLeft, initialBorderRadius()); }
resetBorderBottomRightRadius()1031     void resetBorderBottomRightRadius() { SET_VAR(surround, border.m_bottomRight, initialBorderRadius()); }
1032 
setBackgroundColor(const StyleColor & v)1033     void setBackgroundColor(const StyleColor& v) { SET_VAR(m_background, m_color, v); }
1034 
setBackgroundXPosition(const Length & length)1035     void setBackgroundXPosition(const Length& length) { SET_VAR(m_background, m_background.m_xPosition, length); }
setBackgroundYPosition(const Length & length)1036     void setBackgroundYPosition(const Length& length) { SET_VAR(m_background, m_background.m_yPosition, length); }
setBackgroundSize(EFillSizeType b)1037     void setBackgroundSize(EFillSizeType b) { SET_VAR(m_background, m_background.m_sizeType, b); }
setBackgroundSizeLength(const LengthSize & s)1038     void setBackgroundSizeLength(const LengthSize& s) { SET_VAR(m_background, m_background.m_sizeLength, s); }
1039 
setBorderImage(const NinePieceImage & b)1040     void setBorderImage(const NinePieceImage& b) { SET_VAR(surround, border.m_image, b); }
1041     void setBorderImageSource(PassRefPtr<StyleImage>);
1042     void setBorderImageSlices(const LengthBox&);
1043     void setBorderImageWidth(const BorderImageLengthBox&);
1044     void setBorderImageOutset(const BorderImageLengthBox&);
1045 
setBorderTopLeftRadius(const LengthSize & s)1046     void setBorderTopLeftRadius(const LengthSize& s) { SET_VAR(surround, border.m_topLeft, s); }
setBorderTopRightRadius(const LengthSize & s)1047     void setBorderTopRightRadius(const LengthSize& s) { SET_VAR(surround, border.m_topRight, s); }
setBorderBottomLeftRadius(const LengthSize & s)1048     void setBorderBottomLeftRadius(const LengthSize& s) { SET_VAR(surround, border.m_bottomLeft, s); }
setBorderBottomRightRadius(const LengthSize & s)1049     void setBorderBottomRightRadius(const LengthSize& s) { SET_VAR(surround, border.m_bottomRight, s); }
1050 
setBorderRadius(const LengthSize & s)1051     void setBorderRadius(const LengthSize& s)
1052     {
1053         setBorderTopLeftRadius(s);
1054         setBorderTopRightRadius(s);
1055         setBorderBottomLeftRadius(s);
1056         setBorderBottomRightRadius(s);
1057     }
setBorderRadius(const IntSize & s)1058     void setBorderRadius(const IntSize& s)
1059     {
1060         setBorderRadius(LengthSize(Length(s.width(), Fixed), Length(s.height(), Fixed)));
1061     }
1062 
1063     RoundedRect getRoundedBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
1064     RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
1065 
1066     RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect,
1067         int topWidth, int bottomWidth, int leftWidth, int rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
1068 
setBorderLeftWidth(unsigned v)1069     void setBorderLeftWidth(unsigned v) { SET_VAR(surround, border.m_left.m_width, v); }
setBorderLeftStyle(EBorderStyle v)1070     void setBorderLeftStyle(EBorderStyle v) { SET_VAR(surround, border.m_left.m_style, v); }
setBorderLeftColor(const StyleColor & v)1071     void setBorderLeftColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(surround, border.m_left, v); }
setBorderRightWidth(unsigned v)1072     void setBorderRightWidth(unsigned v) { SET_VAR(surround, border.m_right.m_width, v); }
setBorderRightStyle(EBorderStyle v)1073     void setBorderRightStyle(EBorderStyle v) { SET_VAR(surround, border.m_right.m_style, v); }
setBorderRightColor(const StyleColor & v)1074     void setBorderRightColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(surround, border.m_right, v); }
setBorderTopWidth(unsigned v)1075     void setBorderTopWidth(unsigned v) { SET_VAR(surround, border.m_top.m_width, v); }
setBorderTopStyle(EBorderStyle v)1076     void setBorderTopStyle(EBorderStyle v) { SET_VAR(surround, border.m_top.m_style, v); }
setBorderTopColor(const StyleColor & v)1077     void setBorderTopColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(surround, border.m_top, v); }
setBorderBottomWidth(unsigned v)1078     void setBorderBottomWidth(unsigned v) { SET_VAR(surround, border.m_bottom.m_width, v); }
setBorderBottomStyle(EBorderStyle v)1079     void setBorderBottomStyle(EBorderStyle v) { SET_VAR(surround, border.m_bottom.m_style, v); }
setBorderBottomColor(const StyleColor & v)1080     void setBorderBottomColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(surround, border.m_bottom, v); }
1081 
setOutlineWidth(unsigned short v)1082     void setOutlineWidth(unsigned short v) { SET_VAR(m_background, m_outline.m_width, v); }
setOutlineStyleIsAuto(OutlineIsAuto isAuto)1083     void setOutlineStyleIsAuto(OutlineIsAuto isAuto) { SET_VAR(m_background, m_outline.m_isAuto, isAuto); }
setOutlineStyle(EBorderStyle v)1084     void setOutlineStyle(EBorderStyle v) { SET_VAR(m_background, m_outline.m_style, v); }
setOutlineColor(const StyleColor & v)1085     void setOutlineColor(const StyleColor& v) { SET_BORDERVALUE_COLOR(m_background, m_outline, v); }
isOutlineEquivalent(const RenderStyle * otherStyle)1086     bool isOutlineEquivalent(const RenderStyle* otherStyle) const
1087     {
1088         // No other style, so we don't have an outline then we consider them to be the same.
1089         if (!otherStyle)
1090             return !hasOutline();
1091         return m_background->outline().visuallyEqual(otherStyle->m_background->outline());
1092     }
setOutlineFromStyle(const RenderStyle & o)1093     void setOutlineFromStyle(const RenderStyle& o)
1094     {
1095         ASSERT(!isOutlineEquivalent(&o));
1096         m_background.access()->m_outline = o.m_background->m_outline;
1097     }
1098 
setOverflowX(EOverflow v)1099     void setOverflowX(EOverflow v) { noninherited_flags.overflowX = v; }
setOverflowY(EOverflow v)1100     void setOverflowY(EOverflow v) { noninherited_flags.overflowY = v; }
setVisibility(EVisibility v)1101     void setVisibility(EVisibility v) { inherited_flags._visibility = v; }
setVerticalAlign(EVerticalAlign v)1102     void setVerticalAlign(EVerticalAlign v) { noninherited_flags.verticalAlign = v; }
setVerticalAlignLength(const Length & length)1103     void setVerticalAlignLength(const Length& length) { setVerticalAlign(LENGTH); SET_VAR(m_box, m_verticalAlign, length); }
1104 
setHasAutoClip()1105     void setHasAutoClip() { SET_VAR(visual, hasAutoClip, true); SET_VAR(visual, clip, RenderStyle::initialClip()); }
setClip(const LengthBox & box)1106     void setClip(const LengthBox& box) { SET_VAR(visual, hasAutoClip, false); SET_VAR(visual, clip, box); }
1107 
setUnicodeBidi(EUnicodeBidi b)1108     void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags.unicodeBidi = b; }
1109 
setClear(EClear v)1110     void setClear(EClear v) { noninherited_flags.clear = v; }
setTableLayout(ETableLayout v)1111     void setTableLayout(ETableLayout v) { noninherited_flags.tableLayout = v; }
1112 
1113     bool setFontDescription(const FontDescription&);
1114     // Only used for blending font sizes when animating and for text autosizing.
1115     void setFontSize(float);
1116     void setFontStretch(FontStretch);
1117     void setFontWeight(FontWeight);
1118 
setTextAutosizingMultiplier(float v)1119     void setTextAutosizingMultiplier(float v)
1120     {
1121         SET_VAR(inherited, textAutosizingMultiplier, v);
1122         setFontSize(fontDescription().specifiedSize());
1123     }
1124 
1125     void setColor(const Color&);
setTextIndent(const Length & v)1126     void setTextIndent(const Length& v) { SET_VAR(rareInheritedData, indent, v); }
setTextIndentLine(TextIndentLine v)1127     void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_textIndentLine, v); }
setTextIndentType(TextIndentType v)1128     void setTextIndentType(TextIndentType v) { SET_VAR(rareInheritedData, m_textIndentType, v); }
setTextAlign(ETextAlign v)1129     void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; }
setTextAlignLast(TextAlignLast v)1130     void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAlignLast, v); }
setTextJustify(TextJustify v)1131     void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustify, v); }
setTextTransform(ETextTransform v)1132     void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; }
1133     void applyTextDecorations();
1134     void clearAppliedTextDecorations();
setTextDecoration(TextDecoration v)1135     void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v); }
setTextUnderlinePosition(TextUnderlinePosition v)1136     void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInheritedData, m_textUnderlinePosition, v); }
setTextDecorationStyle(TextDecorationStyle v)1137     void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInheritedData, m_textDecorationStyle, v); }
setDirection(TextDirection v)1138     void setDirection(TextDirection v) { inherited_flags._direction = v; }
1139     void setLineHeight(const Length& specifiedLineHeight);
1140     bool setZoom(float);
1141     bool setEffectiveZoom(float);
1142 
setImageRendering(EImageRendering v)1143     void setImageRendering(EImageRendering v) { SET_VAR(rareInheritedData, m_imageRendering, v); }
1144 
setWhiteSpace(EWhiteSpace v)1145     void setWhiteSpace(EWhiteSpace v) { inherited_flags._white_space = v; }
1146 
1147     // FIXME: Remove these two and replace them with respective FontBuilder calls.
1148     void setWordSpacing(float);
1149     void setLetterSpacing(float);
1150 
adjustBackgroundLayers()1151     void adjustBackgroundLayers()
1152     {
1153         if (backgroundLayers().next()) {
1154             accessBackgroundLayers().cullEmptyLayers();
1155             accessBackgroundLayers().fillUnsetProperties();
1156         }
1157     }
1158 
adjustMaskLayers()1159     void adjustMaskLayers()
1160     {
1161         if (maskLayers().next()) {
1162             accessMaskLayers().cullEmptyLayers();
1163             accessMaskLayers().fillUnsetProperties();
1164         }
1165     }
1166 
setMaskImage(PassRefPtr<StyleImage> v)1167     void setMaskImage(PassRefPtr<StyleImage> v) { rareNonInheritedData.access()->m_mask.setImage(v); }
1168 
setMaskBoxImage(const NinePieceImage & b)1169     void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(rareNonInheritedData, m_maskBoxImage, b); }
setMaskBoxImageSource(PassRefPtr<StyleImage> v)1170     void setMaskBoxImageSource(PassRefPtr<StyleImage> v) { rareNonInheritedData.access()->m_maskBoxImage.setImage(v); }
setMaskBoxImageSlices(const LengthBox & slices)1171     void setMaskBoxImageSlices(const LengthBox& slices)
1172     {
1173         rareNonInheritedData.access()->m_maskBoxImage.setImageSlices(slices);
1174     }
setMaskBoxImageSlicesFill(bool fill)1175     void setMaskBoxImageSlicesFill(bool fill)
1176     {
1177         rareNonInheritedData.access()->m_maskBoxImage.setFill(fill);
1178     }
setMaskBoxImageWidth(const BorderImageLengthBox & slices)1179     void setMaskBoxImageWidth(const BorderImageLengthBox& slices)
1180     {
1181         rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices);
1182     }
setMaskBoxImageOutset(const BorderImageLengthBox & outset)1183     void setMaskBoxImageOutset(const BorderImageLengthBox& outset)
1184     {
1185         rareNonInheritedData.access()->m_maskBoxImage.setOutset(outset);
1186     }
setMaskXPosition(const Length & length)1187     void setMaskXPosition(const Length& length) { SET_VAR(rareNonInheritedData, m_mask.m_xPosition, length); }
setMaskYPosition(const Length & length)1188     void setMaskYPosition(const Length& length) { SET_VAR(rareNonInheritedData, m_mask.m_yPosition, length); }
setMaskSize(const LengthSize & s)1189     void setMaskSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_mask.m_sizeLength, s); }
1190 
setBorderCollapse(EBorderCollapse collapse)1191     void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_collapse = collapse; }
1192     void setHorizontalBorderSpacing(short);
1193     void setVerticalBorderSpacing(short);
setEmptyCells(EEmptyCell v)1194     void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; }
setCaptionSide(ECaptionSide v)1195     void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; }
1196 
setHasAspectRatio(bool b)1197     void setHasAspectRatio(bool b) { SET_VAR(rareNonInheritedData, m_hasAspectRatio, b); }
setAspectRatioDenominator(float v)1198     void setAspectRatioDenominator(float v) { SET_VAR(rareNonInheritedData, m_aspectRatioDenominator, v); }
setAspectRatioNumerator(float v)1199     void setAspectRatioNumerator(float v) { SET_VAR(rareNonInheritedData, m_aspectRatioNumerator, v); }
1200 
setListStyleType(EListStyleType v)1201     void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; }
1202     void setListStyleImage(PassRefPtr<StyleImage>);
setListStylePosition(EListStylePosition v)1203     void setListStylePosition(EListStylePosition v) { inherited_flags._list_style_position = v; }
1204 
setMarginTop(const Length & v)1205     void setMarginTop(const Length& v) { SET_VAR(surround, margin.m_top, v); }
setMarginBottom(const Length & v)1206     void setMarginBottom(const Length& v) { SET_VAR(surround, margin.m_bottom, v); }
setMarginLeft(const Length & v)1207     void setMarginLeft(const Length& v) { SET_VAR(surround, margin.m_left, v); }
setMarginRight(const Length & v)1208     void setMarginRight(const Length& v) { SET_VAR(surround, margin.m_right, v); }
1209     void setMarginStart(const Length&);
1210     void setMarginEnd(const Length&);
1211 
resetPadding()1212     void resetPadding() { SET_VAR(surround, padding, LengthBox(Auto)); }
setPaddingBox(const LengthBox & b)1213     void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b); }
setPaddingTop(const Length & v)1214     void setPaddingTop(const Length& v) { SET_VAR(surround, padding.m_top, v); }
setPaddingBottom(const Length & v)1215     void setPaddingBottom(const Length& v) { SET_VAR(surround, padding.m_bottom, v); }
setPaddingLeft(const Length & v)1216     void setPaddingLeft(const Length& v) { SET_VAR(surround, padding.m_left, v); }
setPaddingRight(const Length & v)1217     void setPaddingRight(const Length& v) { SET_VAR(surround, padding.m_right, v); }
1218 
setCursor(ECursor c)1219     void setCursor(ECursor c) { inherited_flags._cursor_style = c; }
1220     void addCursor(PassRefPtr<StyleImage>, const IntPoint& hotSpot = IntPoint());
1221     void setCursorList(PassRefPtr<CursorList>);
1222     void clearCursorList();
1223 
setInsideLink(EInsideLink insideLink)1224     void setInsideLink(EInsideLink insideLink) { inherited_flags._insideLink = insideLink; }
setIsLink(bool b)1225     void setIsLink(bool b) { noninherited_flags.isLink = b; }
1226 
printColorAdjust()1227     PrintColorAdjust printColorAdjust() const { return static_cast<PrintColorAdjust>(inherited_flags.m_printColorAdjust); }
setPrintColorAdjust(PrintColorAdjust value)1228     void setPrintColorAdjust(PrintColorAdjust value) { inherited_flags.m_printColorAdjust = value; }
1229 
hasAutoZIndex()1230     bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); }
setHasAutoZIndex()1231     void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_box, m_zIndex, 0); }
zIndex()1232     int zIndex() const { return m_box->zIndex(); }
setZIndex(int v)1233     void setZIndex(int v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR(m_box, m_zIndex, v); }
1234 
setHasAutoWidows()1235     void setHasAutoWidows() { SET_VAR(rareInheritedData, m_hasAutoWidows, true); SET_VAR(rareInheritedData, widows, initialWidows()); }
setWidows(short w)1236     void setWidows(short w) { SET_VAR(rareInheritedData, m_hasAutoWidows, false); SET_VAR(rareInheritedData, widows, w); }
1237 
setHasAutoOrphans()1238     void setHasAutoOrphans() { SET_VAR(rareInheritedData, m_hasAutoOrphans, true); SET_VAR(rareInheritedData, orphans, initialOrphans()); }
setOrphans(short o)1239     void setOrphans(short o) { SET_VAR(rareInheritedData, m_hasAutoOrphans, false); SET_VAR(rareInheritedData, orphans, o); }
1240 
1241     // For valid values of page-break-inside see http://www.w3.org/TR/CSS21/page.html#page-break-props
setPageBreakInside(EPageBreak b)1242     void setPageBreakInside(EPageBreak b) { ASSERT(b == PBAUTO || b == PBAVOID); noninherited_flags.pageBreakInside = b; }
setPageBreakBefore(EPageBreak b)1243     void setPageBreakBefore(EPageBreak b) { noninherited_flags.pageBreakBefore = b; }
setPageBreakAfter(EPageBreak b)1244     void setPageBreakAfter(EPageBreak b) { noninherited_flags.pageBreakAfter = b; }
1245 
1246     // CSS3 Setters
setOutlineOffset(int v)1247     void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v); }
1248     void setTextShadow(PassRefPtr<ShadowList>);
setTextStrokeColor(const StyleColor & c)1249     void setTextStrokeColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInheritedData, textStrokeColor, setTextStrokeColor, c); }
setTextStrokeWidth(float w)1250     void setTextStrokeWidth(float w) { SET_VAR(rareInheritedData, textStrokeWidth, w); }
setTextFillColor(const StyleColor & c)1251     void setTextFillColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInheritedData, textFillColor, setTextFillColor, c); }
setOpacity(float f)1252     void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(rareNonInheritedData, opacity, v); }
setAppearance(ControlPart a)1253     void setAppearance(ControlPart a) { SET_VAR(rareNonInheritedData, m_appearance, a); }
1254     // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/#alignment
setBoxAlign(EBoxAlignment a)1255     void setBoxAlign(EBoxAlignment a) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, align, a); }
setBoxDecorationBreak(EBoxDecorationBreak b)1256     void setBoxDecorationBreak(EBoxDecorationBreak b) { SET_VAR(m_box, m_boxDecorationBreak, b); }
setBoxDirection(EBoxDirection d)1257     void setBoxDirection(EBoxDirection d) { inherited_flags._box_direction = d; }
setBoxFlex(float f)1258     void setBoxFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, flex, f); }
setBoxFlexGroup(unsigned fg)1259     void setBoxFlexGroup(unsigned fg) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, flexGroup, fg); }
setBoxLines(EBoxLines l)1260     void setBoxLines(EBoxLines l) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, lines, l); }
setBoxOrdinalGroup(unsigned og)1261     void setBoxOrdinalGroup(unsigned og) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, ordinalGroup, og); }
setBoxOrient(EBoxOrient o)1262     void setBoxOrient(EBoxOrient o) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, orient, o); }
setBoxPack(EBoxPack p)1263     void setBoxPack(EBoxPack p) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, pack, p); }
1264     void setBoxShadow(PassRefPtr<ShadowList>);
setBoxReflect(PassRefPtr<StyleReflection> reflect)1265     void setBoxReflect(PassRefPtr<StyleReflection> reflect) { if (rareNonInheritedData->m_boxReflect != reflect) rareNonInheritedData.access()->m_boxReflect = reflect; }
setBoxSizing(EBoxSizing s)1266     void setBoxSizing(EBoxSizing s) { SET_VAR(m_box, m_boxSizing, s); }
setFlexGrow(float f)1267     void setFlexGrow(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexGrow, f); }
setFlexShrink(float f)1268     void setFlexShrink(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexShrink, f); }
setFlexBasis(const Length & length)1269     void setFlexBasis(const Length& length) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexBasis, length); }
1270     // We restrict the smallest value to int min + 2 because we use int min and int min + 1 as special values in a hash set.
setOrder(int o)1271     void setOrder(int o) { SET_VAR(rareNonInheritedData, m_order, max(std::numeric_limits<int>::min() + 2, o)); }
1272     void addCallbackSelector(const String& selector);
setAlignContent(EAlignContent p)1273     void setAlignContent(EAlignContent p) { SET_VAR(rareNonInheritedData, m_alignContent, p); }
setAlignItems(ItemPosition a)1274     void setAlignItems(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignItems, a); }
setAlignItemsOverflowAlignment(OverflowAlignment overflowAlignment)1275     void setAlignItemsOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_alignItemsOverflowAlignment, overflowAlignment); }
setAlignSelf(ItemPosition a)1276     void setAlignSelf(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignSelf, a); }
setAlignSelfOverflowAlignment(OverflowAlignment overflowAlignment)1277     void setAlignSelfOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_alignSelfOverflowAlignment, overflowAlignment); }
setFlexDirection(EFlexDirection direction)1278     void setFlexDirection(EFlexDirection direction) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexDirection, direction); }
setFlexWrap(EFlexWrap w)1279     void setFlexWrap(EFlexWrap w) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexWrap, w); }
setJustifyContent(EJustifyContent p)1280     void setJustifyContent(EJustifyContent p) { SET_VAR(rareNonInheritedData, m_justifyContent, p); }
setJustifyItems(ItemPosition justifyItems)1281     void setJustifyItems(ItemPosition justifyItems) { SET_VAR(rareNonInheritedData, m_justifyItems, justifyItems); }
setJustifyItemsOverflowAlignment(OverflowAlignment overflowAlignment)1282     void setJustifyItemsOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_justifyItemsOverflowAlignment, overflowAlignment); }
setJustifyItemsPositionType(ItemPositionType positionType)1283     void setJustifyItemsPositionType(ItemPositionType positionType) { SET_VAR(rareNonInheritedData, m_justifyItemsPositionType, positionType); }
setJustifySelf(ItemPosition justifySelf)1284     void setJustifySelf(ItemPosition justifySelf) { SET_VAR(rareNonInheritedData, m_justifySelf, justifySelf); }
setJustifySelfOverflowAlignment(OverflowAlignment overflowAlignment)1285     void setJustifySelfOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_justifySelfOverflowAlignment, overflowAlignment); }
setGridAutoColumns(const GridTrackSize & length)1286     void setGridAutoColumns(const GridTrackSize& length) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridAutoColumns, length); }
setGridAutoRows(const GridTrackSize & length)1287     void setGridAutoRows(const GridTrackSize& length) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridAutoRows, length); }
setGridTemplateColumns(const Vector<GridTrackSize> & lengths)1288     void setGridTemplateColumns(const Vector<GridTrackSize>& lengths) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridTemplateColumns, lengths); }
setGridTemplateRows(const Vector<GridTrackSize> & lengths)1289     void setGridTemplateRows(const Vector<GridTrackSize>& lengths) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridTemplateRows, lengths); }
setNamedGridColumnLines(const NamedGridLinesMap & namedGridColumnLines)1290     void setNamedGridColumnLines(const NamedGridLinesMap& namedGridColumnLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridColumnLines, namedGridColumnLines); }
setNamedGridRowLines(const NamedGridLinesMap & namedGridRowLines)1291     void setNamedGridRowLines(const NamedGridLinesMap& namedGridRowLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridRowLines, namedGridRowLines); }
setOrderedNamedGridColumnLines(const OrderedNamedGridLines & orderedNamedGridColumnLines)1292     void setOrderedNamedGridColumnLines(const OrderedNamedGridLines& orderedNamedGridColumnLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_orderedNamedGridColumnLines, orderedNamedGridColumnLines); }
setOrderedNamedGridRowLines(const OrderedNamedGridLines & orderedNamedGridRowLines)1293     void setOrderedNamedGridRowLines(const OrderedNamedGridLines& orderedNamedGridRowLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_orderedNamedGridRowLines, orderedNamedGridRowLines); }
setNamedGridArea(const NamedGridAreaMap & namedGridArea)1294     void setNamedGridArea(const NamedGridAreaMap& namedGridArea) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridArea, namedGridArea); }
setNamedGridAreaRowCount(size_t rowCount)1295     void setNamedGridAreaRowCount(size_t rowCount) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridAreaRowCount, rowCount); }
setNamedGridAreaColumnCount(size_t columnCount)1296     void setNamedGridAreaColumnCount(size_t columnCount) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridAreaColumnCount, columnCount); }
setGridAutoFlow(GridAutoFlow flow)1297     void setGridAutoFlow(GridAutoFlow flow) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridAutoFlow, flow); }
1298 
setGridColumnStart(const GridPosition & columnStartPosition)1299     void setGridColumnStart(const GridPosition& columnStartPosition) { SET_VAR(rareNonInheritedData.access()->m_gridItem, m_gridColumnStart, columnStartPosition); }
setGridColumnEnd(const GridPosition & columnEndPosition)1300     void setGridColumnEnd(const GridPosition& columnEndPosition) { SET_VAR(rareNonInheritedData.access()->m_gridItem, m_gridColumnEnd, columnEndPosition); }
setGridRowStart(const GridPosition & rowStartPosition)1301     void setGridRowStart(const GridPosition& rowStartPosition) { SET_VAR(rareNonInheritedData.access()->m_gridItem, m_gridRowStart, rowStartPosition); }
setGridRowEnd(const GridPosition & rowEndPosition)1302     void setGridRowEnd(const GridPosition& rowEndPosition) { SET_VAR(rareNonInheritedData.access()->m_gridItem, m_gridRowEnd, rowEndPosition); }
1303 
setMarqueeIncrement(const Length & f)1304     void setMarqueeIncrement(const Length& f) { SET_VAR(rareNonInheritedData.access()->m_marquee, increment, f); }
setMarqueeSpeed(int f)1305     void setMarqueeSpeed(int f) { SET_VAR(rareNonInheritedData.access()->m_marquee, speed, f); }
setMarqueeDirection(EMarqueeDirection d)1306     void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(rareNonInheritedData.access()->m_marquee, direction, d); }
setMarqueeBehavior(EMarqueeBehavior b)1307     void setMarqueeBehavior(EMarqueeBehavior b) { SET_VAR(rareNonInheritedData.access()->m_marquee, behavior, b); }
setMarqueeLoopCount(int i)1308     void setMarqueeLoopCount(int i) { SET_VAR(rareNonInheritedData.access()->m_marquee, loops, i); }
setUserModify(EUserModify u)1309     void setUserModify(EUserModify u) { SET_VAR(rareInheritedData, userModify, u); }
setUserDrag(EUserDrag d)1310     void setUserDrag(EUserDrag d) { SET_VAR(rareNonInheritedData, userDrag, d); }
setUserSelect(EUserSelect s)1311     void setUserSelect(EUserSelect s) { SET_VAR(rareInheritedData, userSelect, s); }
setTextOverflow(TextOverflow overflow)1312     void setTextOverflow(TextOverflow overflow) { SET_VAR(rareNonInheritedData, textOverflow, overflow); }
setMarginBeforeCollapse(EMarginCollapse c)1313     void setMarginBeforeCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginBeforeCollapse, c); }
setMarginAfterCollapse(EMarginCollapse c)1314     void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginAfterCollapse, c); }
setWordBreak(EWordBreak b)1315     void setWordBreak(EWordBreak b) { SET_VAR(rareInheritedData, wordBreak, b); }
setOverflowWrap(EOverflowWrap b)1316     void setOverflowWrap(EOverflowWrap b) { SET_VAR(rareInheritedData, overflowWrap, b); }
setLineBreak(LineBreak b)1317     void setLineBreak(LineBreak b) { SET_VAR(rareInheritedData, lineBreak, b); }
setHighlight(const AtomicString & h)1318     void setHighlight(const AtomicString& h) { SET_VAR(rareInheritedData, highlight, h); }
setHyphens(Hyphens h)1319     void setHyphens(Hyphens h) { SET_VAR(rareInheritedData, hyphens, h); }
setHyphenationString(const AtomicString & h)1320     void setHyphenationString(const AtomicString& h) { SET_VAR(rareInheritedData, hyphenationString, h); }
setLocale(const AtomicString & locale)1321     void setLocale(const AtomicString& locale) { SET_VAR(rareInheritedData, locale, locale); }
setBorderFit(EBorderFit b)1322     void setBorderFit(EBorderFit b) { SET_VAR(rareNonInheritedData, m_borderFit, b); }
setResize(EResize r)1323     void setResize(EResize r) { SET_VAR(rareInheritedData, resize, r); }
setColumnWidth(float f)1324     void setColumnWidth(float f) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_autoWidth, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_width, f); }
setHasAutoColumnWidth()1325     void setHasAutoColumnWidth() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_autoWidth, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_width, 0); }
setColumnCount(unsigned short c)1326     void setColumnCount(unsigned short c) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_autoCount, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_count, c); }
setHasAutoColumnCount()1327     void setHasAutoColumnCount() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_autoCount, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_count, 0); }
setColumnFill(ColumnFill columnFill)1328     void setColumnFill(ColumnFill columnFill) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_fill, columnFill); }
setColumnGap(float f)1329     void setColumnGap(float f) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_normalGap, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_gap, f); }
setHasNormalColumnGap()1330     void setHasNormalColumnGap() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_normalGap, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_gap, 0); }
setColumnRuleColor(const StyleColor & c)1331     void setColumnRuleColor(const StyleColor& c) { SET_BORDERVALUE_COLOR(rareNonInheritedData.access()->m_multiCol, m_rule, c); }
setColumnRuleStyle(EBorderStyle b)1332     void setColumnRuleStyle(EBorderStyle b) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule.m_style, b); }
setColumnRuleWidth(unsigned short w)1333     void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule.m_width, w); }
resetColumnRule()1334     void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()); }
setColumnSpan(ColumnSpan columnSpan)1335     void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_columnSpan, columnSpan); }
setColumnBreakBefore(EPageBreak p)1336     void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakBefore, p); }
1337     // For valid values of column-break-inside see http://www.w3.org/TR/css3-multicol/#break-before-break-after-break-inside
setColumnBreakInside(EPageBreak p)1338     void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); }
setColumnBreakAfter(EPageBreak p)1339     void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakAfter, p); }
inheritColumnPropertiesFrom(RenderStyle * parent)1340     void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData.access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; }
setHasInlineTransform(bool b)1341     void setHasInlineTransform(bool b) { SET_VAR(rareNonInheritedData, m_hasInlineTransform, b); }
setTransform(const TransformOperations & ops)1342     void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInheritedData.access()->m_transform, m_operations, ops); }
setTransformOriginX(const Length & l)1343     void setTransformOriginX(const Length& l) { SET_VAR(rareNonInheritedData.access()->m_transform, m_x, l); }
setTransformOriginY(const Length & l)1344     void setTransformOriginY(const Length& l) { SET_VAR(rareNonInheritedData.access()->m_transform, m_y, l); }
setTransformOriginZ(float f)1345     void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m_transform, m_z, f); }
setSpeak(ESpeak s)1346     void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); }
setTextCombine(TextCombine v)1347     void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCombine, v); }
setTextDecorationColor(const StyleColor & c)1348     void setTextDecorationColor(const StyleColor& c) { SET_VAR(rareNonInheritedData, m_textDecorationColor, c); }
setTextEmphasisColor(const StyleColor & c)1349     void setTextEmphasisColor(const StyleColor& c) { SET_VAR_WITH_SETTER(rareInheritedData, textEmphasisColor, setTextEmphasisColor, c); }
setTextEmphasisFill(TextEmphasisFill fill)1350     void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(rareInheritedData, textEmphasisFill, fill); }
setTextEmphasisMark(TextEmphasisMark mark)1351     void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(rareInheritedData, textEmphasisMark, mark); }
setTextEmphasisCustomMark(const AtomicString & mark)1352     void setTextEmphasisCustomMark(const AtomicString& mark) { SET_VAR(rareInheritedData, textEmphasisCustomMark, mark); }
setTextEmphasisPosition(TextEmphasisPosition position)1353     void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(rareInheritedData, textEmphasisPosition, position); }
1354     bool setTextOrientation(TextOrientation);
1355 
setObjectFit(ObjectFit f)1356     void setObjectFit(ObjectFit f) { SET_VAR(rareNonInheritedData, m_objectFit, f); }
setObjectPosition(LengthPoint position)1357     void setObjectPosition(LengthPoint position) { SET_VAR(rareNonInheritedData, m_objectPosition, position); }
1358 
setRubyPosition(RubyPosition position)1359     void setRubyPosition(RubyPosition position) { SET_VAR(rareInheritedData, m_rubyPosition, position); }
1360 
setFilter(const FilterOperations & ops)1361     void setFilter(const FilterOperations& ops) { SET_VAR(rareNonInheritedData.access()->m_filter, m_operations, ops); }
1362 
setTabSize(unsigned size)1363     void setTabSize(unsigned size) { SET_VAR(rareInheritedData, m_tabSize, size); }
1364 
1365     // End CSS3 Setters
1366 
setWrapFlow(WrapFlow wrapFlow)1367     void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(rareNonInheritedData, m_wrapFlow, wrapFlow); }
setWrapThrough(WrapThrough wrapThrough)1368     void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(rareNonInheritedData, m_wrapThrough, wrapThrough); }
1369 
1370     // Apple-specific property setters
setPointerEvents(EPointerEvents p)1371     void setPointerEvents(EPointerEvents p) { inherited_flags._pointerEvents = p; }
1372 
clearAnimations()1373     void clearAnimations()
1374     {
1375         rareNonInheritedData.access()->m_animations.clear();
1376     }
1377 
clearTransitions()1378     void clearTransitions()
1379     {
1380         rareNonInheritedData.access()->m_transitions.clear();
1381     }
1382 
setTransformStyle3D(ETransformStyle3D b)1383     void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(rareNonInheritedData, m_transformStyle3D, b); }
setBackfaceVisibility(EBackfaceVisibility b)1384     void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(rareNonInheritedData, m_backfaceVisibility, b); }
setPerspective(float p)1385     void setPerspective(float p) { SET_VAR(rareNonInheritedData, m_perspective, p); }
setPerspectiveOriginX(const Length & l)1386     void setPerspectiveOriginX(const Length& l) { SET_VAR(rareNonInheritedData, m_perspectiveOriginX, l); }
setPerspectiveOriginY(const Length & l)1387     void setPerspectiveOriginY(const Length& l) { SET_VAR(rareNonInheritedData, m_perspectiveOriginY, l); }
setPageSize(const LengthSize & s)1388     void setPageSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_pageSize, s); }
setPageSizeType(PageSizeType t)1389     void setPageSizeType(PageSizeType t) { SET_VAR(rareNonInheritedData, m_pageSizeType, t); }
resetPageSizeType()1390     void resetPageSizeType() { SET_VAR(rareNonInheritedData, m_pageSizeType, PAGE_SIZE_AUTO); }
1391 
1392     void setHasCurrentOpacityAnimation(bool b = true) { SET_VAR(rareNonInheritedData, m_hasCurrentOpacityAnimation, b); }
1393     void setHasCurrentTransformAnimation(bool b = true) { SET_VAR(rareNonInheritedData, m_hasCurrentTransformAnimation, b); }
1394     void setHasCurrentFilterAnimation(bool b = true) { SET_VAR(rareNonInheritedData, m_hasCurrentFilterAnimation, b); }
1395 
1396     void setIsRunningOpacityAnimationOnCompositor(bool b = true) { SET_VAR(rareNonInheritedData, m_runningOpacityAnimationOnCompositor, b); }
1397     void setIsRunningTransformAnimationOnCompositor(bool b = true) { SET_VAR(rareNonInheritedData, m_runningTransformAnimationOnCompositor, b); }
1398     void setIsRunningFilterAnimationOnCompositor(bool b = true) { SET_VAR(rareNonInheritedData, m_runningFilterAnimationOnCompositor, b); }
1399 
setLineBoxContain(LineBoxContain c)1400     void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_lineBoxContain, c); }
setLineClamp(LineClampValue c)1401     void setLineClamp(LineClampValue c) { SET_VAR(rareNonInheritedData, lineClamp, c); }
setTapHighlightColor(const Color & c)1402     void setTapHighlightColor(const Color& c) { SET_VAR(rareInheritedData, tapHighlightColor, c); }
setTextSecurity(ETextSecurity aTextSecurity)1403     void setTextSecurity(ETextSecurity aTextSecurity) { SET_VAR(rareInheritedData, textSecurity, aTextSecurity); }
setTouchAction(TouchAction t)1404     void setTouchAction(TouchAction t) { SET_VAR(rareNonInheritedData, m_touchAction, t); }
setTouchActionDelay(TouchActionDelay t)1405     void setTouchActionDelay(TouchActionDelay t) { SET_VAR(rareInheritedData, m_touchActionDelay, t); }
1406 
setScrollBehavior(ScrollBehavior b)1407     void setScrollBehavior(ScrollBehavior b) { SET_VAR(rareNonInheritedData, m_scrollBehavior, b); }
1408 
setWillChangeProperties(const Vector<CSSPropertyID> & properties)1409     void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_VAR(rareNonInheritedData.access()->m_willChange, m_properties, properties); }
setWillChangeContents(bool b)1410     void setWillChangeContents(bool b) { SET_VAR(rareNonInheritedData.access()->m_willChange, m_contents, b); }
setWillChangeScrollPosition(bool b)1411     void setWillChangeScrollPosition(bool b) { SET_VAR(rareNonInheritedData.access()->m_willChange, m_scrollPosition, b); }
setSubtreeWillChangeContents(bool b)1412     void setSubtreeWillChangeContents(bool b) { SET_VAR(rareInheritedData, m_subtreeWillChangeContents, b); }
1413 
requiresAcceleratedCompositingForExternalReasons(bool b)1414     bool requiresAcceleratedCompositingForExternalReasons(bool b) { return rareNonInheritedData->m_requiresAcceleratedCompositingForExternalReasons; }
setRequiresAcceleratedCompositingForExternalReasons(bool b)1415     void setRequiresAcceleratedCompositingForExternalReasons(bool b) { SET_VAR(rareNonInheritedData, m_requiresAcceleratedCompositingForExternalReasons, b); }
1416 
svgStyle()1417     const SVGRenderStyle& svgStyle() const { return *m_svgStyle.get(); }
accessSVGStyle()1418     SVGRenderStyle& accessSVGStyle() { return *m_svgStyle.access(); }
1419 
fillPaintType()1420     const SVGPaintType& fillPaintType() const { return svgStyle().fillPaintType(); }
fillPaintColor()1421     Color fillPaintColor() const { return svgStyle().fillPaintColor(); }
fillOpacity()1422     float fillOpacity() const { return svgStyle().fillOpacity(); }
setFillOpacity(float f)1423     void setFillOpacity(float f) { accessSVGStyle().setFillOpacity(f); }
1424 
strokePaintType()1425     const SVGPaintType& strokePaintType() const { return svgStyle().strokePaintType(); }
strokePaintColor()1426     Color strokePaintColor() const { return svgStyle().strokePaintColor(); }
strokeOpacity()1427     float strokeOpacity() const { return svgStyle().strokeOpacity(); }
setStrokeOpacity(float f)1428     void setStrokeOpacity(float f) { accessSVGStyle().setStrokeOpacity(f); }
strokeWidth()1429     SVGLength* strokeWidth() const { return svgStyle().strokeWidth(); }
setStrokeWidth(PassRefPtr<SVGLength> w)1430     void setStrokeWidth(PassRefPtr<SVGLength> w) { accessSVGStyle().setStrokeWidth(w); }
strokeDashArray()1431     SVGLengthList* strokeDashArray() const { return svgStyle().strokeDashArray(); }
setStrokeDashArray(PassRefPtr<SVGLengthList> array)1432     void setStrokeDashArray(PassRefPtr<SVGLengthList> array) { accessSVGStyle().setStrokeDashArray(array); }
strokeDashOffset()1433     SVGLength* strokeDashOffset() const { return svgStyle().strokeDashOffset(); }
setStrokeDashOffset(PassRefPtr<SVGLength> d)1434     void setStrokeDashOffset(PassRefPtr<SVGLength> d) { accessSVGStyle().setStrokeDashOffset(d); }
strokeMiterLimit()1435     float strokeMiterLimit() const { return svgStyle().strokeMiterLimit(); }
setStrokeMiterLimit(float f)1436     void setStrokeMiterLimit(float f) { accessSVGStyle().setStrokeMiterLimit(f); }
1437 
floodOpacity()1438     float floodOpacity() const { return svgStyle().floodOpacity(); }
setFloodOpacity(float f)1439     void setFloodOpacity(float f) { accessSVGStyle().setFloodOpacity(f); }
1440 
stopOpacity()1441     float stopOpacity() const { return svgStyle().stopOpacity(); }
setStopOpacity(float f)1442     void setStopOpacity(float f) { accessSVGStyle().setStopOpacity(f); }
1443 
setStopColor(const Color & c)1444     void setStopColor(const Color& c) { accessSVGStyle().setStopColor(c); }
setFloodColor(const Color & c)1445     void setFloodColor(const Color& c) { accessSVGStyle().setFloodColor(c); }
setLightingColor(const Color & c)1446     void setLightingColor(const Color& c) { accessSVGStyle().setLightingColor(c); }
1447 
baselineShiftValue()1448     SVGLength* baselineShiftValue() const { return svgStyle().baselineShiftValue(); }
setBaselineShiftValue(PassRefPtr<SVGLength> s)1449     void setBaselineShiftValue(PassRefPtr<SVGLength> s) { accessSVGStyle().setBaselineShiftValue(s); }
1450 
setShapeOutside(PassRefPtr<ShapeValue> value)1451     void setShapeOutside(PassRefPtr<ShapeValue> value)
1452     {
1453         if (rareNonInheritedData->m_shapeOutside == value)
1454             return;
1455         rareNonInheritedData.access()->m_shapeOutside = value;
1456     }
shapeOutside()1457     ShapeValue* shapeOutside() const { return rareNonInheritedData->m_shapeOutside.get(); }
1458 
initialShapeOutside()1459     static ShapeValue* initialShapeOutside() { return 0; }
1460 
setClipPath(PassRefPtr<ClipPathOperation> operation)1461     void setClipPath(PassRefPtr<ClipPathOperation> operation)
1462     {
1463         if (rareNonInheritedData->m_clipPath != operation)
1464             rareNonInheritedData.access()->m_clipPath = operation;
1465     }
clipPath()1466     ClipPathOperation* clipPath() const { return rareNonInheritedData->m_clipPath.get(); }
1467 
initialClipPath()1468     static ClipPathOperation* initialClipPath() { return 0; }
1469 
shapeMargin()1470     const Length& shapeMargin() const { return rareNonInheritedData->m_shapeMargin; }
setShapeMargin(const Length & shapeMargin)1471     void setShapeMargin(const Length& shapeMargin) { SET_VAR(rareNonInheritedData, m_shapeMargin, shapeMargin); }
initialShapeMargin()1472     static Length initialShapeMargin() { return Length(0, Fixed); }
1473 
shapeImageThreshold()1474     float shapeImageThreshold() const { return rareNonInheritedData->m_shapeImageThreshold; }
setShapeImageThreshold(float shapeImageThreshold)1475     void setShapeImageThreshold(float shapeImageThreshold)
1476     {
1477         float clampedShapeImageThreshold = clampTo<float>(shapeImageThreshold, 0, 1);
1478         SET_VAR(rareNonInheritedData, m_shapeImageThreshold, clampedShapeImageThreshold);
1479     }
initialShapeImageThreshold()1480     static float initialShapeImageThreshold() { return 0; }
1481 
hasContent()1482     bool hasContent() const { return contentData(); }
contentData()1483     const ContentData* contentData() const { return rareNonInheritedData->m_content.get(); }
contentDataEquivalent(const RenderStyle * otherStyle)1484     bool contentDataEquivalent(const RenderStyle* otherStyle) const { return const_cast<RenderStyle*>(this)->rareNonInheritedData->contentDataEquivalent(*const_cast<RenderStyle*>(otherStyle)->rareNonInheritedData); }
1485     void clearContent();
1486     void setContent(const String&, bool add = false);
1487     void setContent(PassRefPtr<StyleImage>, bool add = false);
1488     void setContent(PassOwnPtr<CounterContent>, bool add = false);
1489     void setContent(QuoteType, bool add = false);
1490 
1491     const CounterDirectiveMap* counterDirectives() const;
1492     CounterDirectiveMap& accessCounterDirectives();
1493     const CounterDirectives getCounterDirectives(const AtomicString& identifier) const;
1494 
quotes()1495     QuotesData* quotes() const { return rareInheritedData->quotes.get(); }
1496     void setQuotes(PassRefPtr<QuotesData>);
1497 
1498     const AtomicString& hyphenString() const;
1499 
1500     bool inheritedNotEqual(const RenderStyle*) const;
1501     bool inheritedDataShared(const RenderStyle*) const;
1502 
isDisplayReplacedType()1503     bool isDisplayReplacedType() const { return isDisplayReplacedType(display()); }
isDisplayInlineType()1504     bool isDisplayInlineType() const { return isDisplayInlineType(display()); }
isOriginalDisplayInlineType()1505     bool isOriginalDisplayInlineType() const { return isDisplayInlineType(originalDisplay()); }
isDisplayFlexibleOrGridBox()1506     bool isDisplayFlexibleOrGridBox() const { return isDisplayFlexibleBox(display()) || isDisplayGridBox(display()); }
1507 
1508 
setWritingMode(WritingMode v)1509     bool setWritingMode(WritingMode v)
1510     {
1511         if (v == writingMode())
1512             return false;
1513 
1514         inherited_flags.m_writingMode = v;
1515         return true;
1516     }
1517 
1518     // A unique style is one that has matches something that makes it impossible to share.
unique()1519     bool unique() const { return noninherited_flags.unique; }
setUnique()1520     void setUnique() { noninherited_flags.unique = true; }
1521 
1522     bool isSharable() const;
1523 
emptyState()1524     bool emptyState() const { return noninherited_flags.emptyState; }
setEmptyState(bool b)1525     void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b; }
firstChildState()1526     bool firstChildState() const { return noninherited_flags.firstChildState; }
setFirstChildState()1527     void setFirstChildState() { setUnique(); noninherited_flags.firstChildState = true; }
lastChildState()1528     bool lastChildState() const { return noninherited_flags.lastChildState; }
setLastChildState()1529     void setLastChildState() { setUnique(); noninherited_flags.lastChildState = true; }
1530 
1531     StyleColor visitedDependentDecorationStyleColor() const;
1532     Color visitedDependentDecorationColor() const;
1533     Color visitedDependentColor(int colorProperty) const;
1534 
setHasExplicitlyInheritedProperties()1535     void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInheritance = true; }
hasExplicitlyInheritedProperties()1536     bool hasExplicitlyInheritedProperties() const { return noninherited_flags.explicitInheritance; }
1537 
hasBoxDecorations()1538     bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter(); }
1539 
1540     bool borderObscuresBackground() const;
1541     void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
1542 
1543     // Initial values for all the properties
initialBorderCollapse()1544     static EBorderCollapse initialBorderCollapse() { return BSEPARATE; }
initialBorderStyle()1545     static EBorderStyle initialBorderStyle() { return BNONE; }
initialOutlineStyleIsAuto()1546     static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; }
initialNinePieceImage()1547     static NinePieceImage initialNinePieceImage() { return NinePieceImage(); }
initialBorderRadius()1548     static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed), Length(0, Fixed)); }
initialCaptionSide()1549     static ECaptionSide initialCaptionSide() { return CAPTOP; }
initialClear()1550     static EClear initialClear() { return CNONE; }
initialClip()1551     static LengthBox initialClip() { return LengthBox(); }
initialDirection()1552     static TextDirection initialDirection() { return LTR; }
initialWritingMode()1553     static WritingMode initialWritingMode() { return TopToBottomWritingMode; }
initialTextCombine()1554     static TextCombine initialTextCombine() { return TextCombineNone; }
initialTextOrientation()1555     static TextOrientation initialTextOrientation() { return TextOrientationVerticalRight; }
initialObjectFit()1556     static ObjectFit initialObjectFit() { return ObjectFitFill; }
initialObjectPosition()1557     static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); }
initialDisplay()1558     static EDisplay initialDisplay() { return INLINE; }
initialEmptyCells()1559     static EEmptyCell initialEmptyCells() { return SHOW; }
initialFloating()1560     static EFloat initialFloating() { return NoFloat; }
initialListStylePosition()1561     static EListStylePosition initialListStylePosition() { return OUTSIDE; }
initialListStyleType()1562     static EListStyleType initialListStyleType() { return Disc; }
initialOverflowX()1563     static EOverflow initialOverflowX() { return OVISIBLE; }
initialOverflowY()1564     static EOverflow initialOverflowY() { return OVISIBLE; }
initialPageBreak()1565     static EPageBreak initialPageBreak() { return PBAUTO; }
initialPosition()1566     static EPosition initialPosition() { return StaticPosition; }
initialTableLayout()1567     static ETableLayout initialTableLayout() { return TAUTO; }
initialUnicodeBidi()1568     static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }
initialTextTransform()1569     static ETextTransform initialTextTransform() { return TTNONE; }
initialVisibility()1570     static EVisibility initialVisibility() { return VISIBLE; }
initialWhiteSpace()1571     static EWhiteSpace initialWhiteSpace() { return NORMAL; }
initialHorizontalBorderSpacing()1572     static short initialHorizontalBorderSpacing() { return 0; }
initialVerticalBorderSpacing()1573     static short initialVerticalBorderSpacing() { return 0; }
initialCursor()1574     static ECursor initialCursor() { return CURSOR_AUTO; }
initialColor()1575     static Color initialColor() { return Color::black; }
initialListStyleImage()1576     static StyleImage* initialListStyleImage() { return 0; }
initialBorderWidth()1577     static unsigned initialBorderWidth() { return 3; }
initialColumnRuleWidth()1578     static unsigned short initialColumnRuleWidth() { return 3; }
initialOutlineWidth()1579     static unsigned short initialOutlineWidth() { return 3; }
initialLetterWordSpacing()1580     static float initialLetterWordSpacing() { return 0.0f; }
initialSize()1581     static Length initialSize() { return Length(); }
initialMinSize()1582     static Length initialMinSize() { return Length(Fixed); }
initialMaxSize()1583     static Length initialMaxSize() { return Length(MaxSizeNone); }
initialOffset()1584     static Length initialOffset() { return Length(); }
initialMargin()1585     static Length initialMargin() { return Length(Fixed); }
initialPadding()1586     static Length initialPadding() { return Length(Fixed); }
initialTextIndent()1587     static Length initialTextIndent() { return Length(Fixed); }
initialTextIndentLine()1588     static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; }
initialTextIndentType()1589     static TextIndentType initialTextIndentType() { return TextIndentNormal; }
initialVerticalAlign()1590     static EVerticalAlign initialVerticalAlign() { return BASELINE; }
initialWidows()1591     static short initialWidows() { return 2; }
initialOrphans()1592     static short initialOrphans() { return 2; }
initialLineHeight()1593     static Length initialLineHeight() { return Length(-100.0, Percent); }
initialTextAlign()1594     static ETextAlign initialTextAlign() { return TASTART; }
initialTextAlignLast()1595     static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; }
initialTextJustify()1596     static TextJustify initialTextJustify() { return TextJustifyAuto; }
initialTextDecoration()1597     static TextDecoration initialTextDecoration() { return TextDecorationNone; }
initialTextUnderlinePosition()1598     static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnderlinePositionAuto; }
initialTextDecorationStyle()1599     static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyleSolid; }
initialZoom()1600     static float initialZoom() { return 1.0f; }
initialOutlineOffset()1601     static int initialOutlineOffset() { return 0; }
initialOpacity()1602     static float initialOpacity() { return 1.0f; }
initialBoxAlign()1603     static EBoxAlignment initialBoxAlign() { return BSTRETCH; }
initialBoxDecorationBreak()1604     static EBoxDecorationBreak initialBoxDecorationBreak() { return DSLICE; }
initialBoxDirection()1605     static EBoxDirection initialBoxDirection() { return BNORMAL; }
initialBoxLines()1606     static EBoxLines initialBoxLines() { return SINGLE; }
initialBoxOrient()1607     static EBoxOrient initialBoxOrient() { return HORIZONTAL; }
initialBoxPack()1608     static EBoxPack initialBoxPack() { return Start; }
initialBoxFlex()1609     static float initialBoxFlex() { return 0.0f; }
initialBoxFlexGroup()1610     static unsigned initialBoxFlexGroup() { return 1; }
initialBoxOrdinalGroup()1611     static unsigned initialBoxOrdinalGroup() { return 1; }
initialBoxSizing()1612     static EBoxSizing initialBoxSizing() { return CONTENT_BOX; }
initialBoxReflect()1613     static StyleReflection* initialBoxReflect() { return 0; }
initialFlexGrow()1614     static float initialFlexGrow() { return 0; }
initialFlexShrink()1615     static float initialFlexShrink() { return 1; }
initialFlexBasis()1616     static Length initialFlexBasis() { return Length(Auto); }
initialOrder()1617     static int initialOrder() { return 0; }
initialAlignContent()1618     static EAlignContent initialAlignContent() { return AlignContentStretch; }
initialAlignItems()1619     static ItemPosition initialAlignItems() { return ItemPositionAuto; }
initialAlignItemsOverflowAlignment()1620     static OverflowAlignment initialAlignItemsOverflowAlignment() { return OverflowAlignmentDefault; }
initialAlignSelf()1621     static ItemPosition initialAlignSelf() { return ItemPositionAuto; }
initialAlignSelfOverflowAlignment()1622     static OverflowAlignment initialAlignSelfOverflowAlignment() { return OverflowAlignmentDefault; }
initialFlexDirection()1623     static EFlexDirection initialFlexDirection() { return FlowRow; }
initialFlexWrap()1624     static EFlexWrap initialFlexWrap() { return FlexNoWrap; }
initialJustifyContent()1625     static EJustifyContent initialJustifyContent() { return JustifyFlexStart; }
initialJustifyItems()1626     static ItemPosition initialJustifyItems() { return ItemPositionAuto; }
initialJustifyItemsOverflowAlignment()1627     static OverflowAlignment initialJustifyItemsOverflowAlignment() { return OverflowAlignmentDefault; }
initialJustifyItemsPositionType()1628     static ItemPositionType initialJustifyItemsPositionType() { return NonLegacyPosition; }
initialJustifySelf()1629     static ItemPosition initialJustifySelf() { return ItemPositionAuto; }
initialJustifySelfOverflowAlignment()1630     static OverflowAlignment initialJustifySelfOverflowAlignment() { return OverflowAlignmentDefault; }
initialMarqueeLoopCount()1631     static int initialMarqueeLoopCount() { return -1; }
initialMarqueeSpeed()1632     static int initialMarqueeSpeed() { return 85; }
initialMarqueeIncrement()1633     static Length initialMarqueeIncrement() { return Length(6, Fixed); }
initialMarqueeBehavior()1634     static EMarqueeBehavior initialMarqueeBehavior() { return MSCROLL; }
initialMarqueeDirection()1635     static EMarqueeDirection initialMarqueeDirection() { return MAUTO; }
initialUserModify()1636     static EUserModify initialUserModify() { return READ_ONLY; }
initialUserDrag()1637     static EUserDrag initialUserDrag() { return DRAG_AUTO; }
initialUserSelect()1638     static EUserSelect initialUserSelect() { return SELECT_TEXT; }
initialTextOverflow()1639     static TextOverflow initialTextOverflow() { return TextOverflowClip; }
initialMarginBeforeCollapse()1640     static EMarginCollapse initialMarginBeforeCollapse() { return MCOLLAPSE; }
initialMarginAfterCollapse()1641     static EMarginCollapse initialMarginAfterCollapse() { return MCOLLAPSE; }
initialWordBreak()1642     static EWordBreak initialWordBreak() { return NormalWordBreak; }
initialOverflowWrap()1643     static EOverflowWrap initialOverflowWrap() { return NormalOverflowWrap; }
initialLineBreak()1644     static LineBreak initialLineBreak() { return LineBreakAuto; }
initialHighlight()1645     static const AtomicString& initialHighlight() { return nullAtom; }
initialSpeak()1646     static ESpeak initialSpeak() { return SpeakNormal; }
initialHyphenationString()1647     static const AtomicString& initialHyphenationString() { return nullAtom; }
initialLocale()1648     static const AtomicString& initialLocale() { return nullAtom; }
initialBorderFit()1649     static EBorderFit initialBorderFit() { return BorderFitBorder; }
initialResize()1650     static EResize initialResize() { return RESIZE_NONE; }
initialAppearance()1651     static ControlPart initialAppearance() { return NoControlPart; }
initialHasAspectRatio()1652     static bool initialHasAspectRatio() { return false; }
initialAspectRatioDenominator()1653     static float initialAspectRatioDenominator() { return 1; }
initialAspectRatioNumerator()1654     static float initialAspectRatioNumerator() { return 1; }
initialRTLOrdering()1655     static Order initialRTLOrdering() { return LogicalOrder; }
initialTextStrokeWidth()1656     static float initialTextStrokeWidth() { return 0; }
initialColumnCount()1657     static unsigned short initialColumnCount() { return 1; }
initialColumnFill()1658     static ColumnFill initialColumnFill() { return ColumnFillBalance; }
initialColumnSpan()1659     static ColumnSpan initialColumnSpan() { return ColumnSpanNone; }
initialTransform()1660     static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(TransformOperations, ops, ()); return ops; }
initialTransformOriginX()1661     static Length initialTransformOriginX() { return Length(50.0, Percent); }
initialTransformOriginY()1662     static Length initialTransformOriginY() { return Length(50.0, Percent); }
initialPointerEvents()1663     static EPointerEvents initialPointerEvents() { return PE_AUTO; }
initialTransformOriginZ()1664     static float initialTransformOriginZ() { return 0; }
initialTransformStyle3D()1665     static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3DFlat; }
initialBackfaceVisibility()1666     static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisibilityVisible; }
initialPerspective()1667     static float initialPerspective() { return 0; }
initialPerspectiveOriginX()1668     static Length initialPerspectiveOriginX() { return Length(50.0, Percent); }
initialPerspectiveOriginY()1669     static Length initialPerspectiveOriginY() { return Length(50.0, Percent); }
initialBackgroundColor()1670     static Color initialBackgroundColor() { return Color::transparent; }
initialTextEmphasisFill()1671     static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillFilled; }
initialTextEmphasisMark()1672     static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkNone; }
initialTextEmphasisCustomMark()1673     static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom; }
initialTextEmphasisPosition()1674     static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmphasisPositionOver; }
initialRubyPosition()1675     static RubyPosition initialRubyPosition() { return RubyPositionBefore; }
initialLineBoxContain()1676     static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock | LineBoxContainInline | LineBoxContainReplaced; }
initialImageOrientation()1677     static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft; }
initialImageRendering()1678     static EImageRendering initialImageRendering() { return ImageRenderingAuto; }
initialImageResolutionSource()1679     static ImageResolutionSource initialImageResolutionSource() { return ImageResolutionSpecified; }
initialImageResolutionSnap()1680     static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolutionNoSnap; }
initialImageResolution()1681     static float initialImageResolution() { return 1; }
initialBorderImageSource()1682     static StyleImage* initialBorderImageSource() { return 0; }
initialMaskBoxImageSource()1683     static StyleImage* initialMaskBoxImageSource() { return 0; }
initialPrintColorAdjust()1684     static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; }
initialTouchAction()1685     static TouchAction initialTouchAction() { return TouchActionAuto; }
initialTouchActionDelay()1686     static TouchActionDelay initialTouchActionDelay() { return TouchActionDelayScript; }
initialBoxShadow()1687     static ShadowList* initialBoxShadow() { return 0; }
initialTextShadow()1688     static ShadowList* initialTextShadow() { return 0; }
initialScrollBehavior()1689     static ScrollBehavior initialScrollBehavior() { return ScrollBehaviorInstant; }
1690 
1691     // The initial value is 'none' for grid tracks.
initialGridTemplateColumns()1692     static Vector<GridTrackSize> initialGridTemplateColumns() { return Vector<GridTrackSize>(); }
initialGridTemplateRows()1693     static Vector<GridTrackSize> initialGridTemplateRows() { return Vector<GridTrackSize>(); }
1694 
initialGridAutoFlow()1695     static GridAutoFlow initialGridAutoFlow() { return AutoFlowRow; }
1696 
initialGridAutoColumns()1697     static GridTrackSize initialGridAutoColumns() { return GridTrackSize(Length(Auto)); }
initialGridAutoRows()1698     static GridTrackSize initialGridAutoRows() { return GridTrackSize(Length(Auto)); }
1699 
initialNamedGridColumnLines()1700     static NamedGridLinesMap initialNamedGridColumnLines() { return NamedGridLinesMap(); }
initialNamedGridRowLines()1701     static NamedGridLinesMap initialNamedGridRowLines() { return NamedGridLinesMap(); }
1702 
initialOrderedNamedGridColumnLines()1703     static OrderedNamedGridLines initialOrderedNamedGridColumnLines() { return OrderedNamedGridLines(); }
initialOrderedNamedGridRowLines()1704     static OrderedNamedGridLines initialOrderedNamedGridRowLines() { return OrderedNamedGridLines(); }
1705 
initialNamedGridArea()1706     static NamedGridAreaMap initialNamedGridArea() { return NamedGridAreaMap(); }
initialNamedGridAreaCount()1707     static size_t initialNamedGridAreaCount() { return 0; }
1708 
1709     // 'auto' is the default.
initialGridColumnStart()1710     static GridPosition initialGridColumnStart() { return GridPosition(); }
initialGridColumnEnd()1711     static GridPosition initialGridColumnEnd() { return GridPosition(); }
initialGridRowStart()1712     static GridPosition initialGridRowStart() { return GridPosition(); }
initialGridRowEnd()1713     static GridPosition initialGridRowEnd() { return GridPosition(); }
1714 
initialTabSize()1715     static unsigned initialTabSize() { return 8; }
1716 
initialWrapFlow()1717     static WrapFlow initialWrapFlow() { return WrapFlowAuto; }
initialWrapThrough()1718     static WrapThrough initialWrapThrough() { return WrapThroughWrap; }
1719 
initialQuotes()1720     static QuotesData* initialQuotes() { return 0; }
1721 
1722     // Keep these at the end.
1723     // FIXME: Why? Seems these should all be one big sorted list.
initialLineClamp()1724     static LineClampValue initialLineClamp() { return LineClampValue(); }
initialTextSecurity()1725     static ETextSecurity initialTextSecurity() { return TSNONE; }
1726     static Color initialTapHighlightColor();
initialFilter()1727     static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterOperations, ops, ()); return ops; }
initialBlendMode()1728     static WebBlendMode initialBlendMode() { return WebBlendModeNormal; }
initialIsolation()1729     static EIsolation initialIsolation() { return IsolationAuto; }
1730 private:
1731     void setVisitedLinkColor(const Color&);
setVisitedLinkBackgroundColor(const StyleColor & v)1732     void setVisitedLinkBackgroundColor(const StyleColor& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBackgroundColor, v); }
setVisitedLinkBorderLeftColor(const StyleColor & v)1733     void setVisitedLinkBorderLeftColor(const StyleColor& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderLeftColor, v); }
setVisitedLinkBorderRightColor(const StyleColor & v)1734     void setVisitedLinkBorderRightColor(const StyleColor& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderRightColor, v); }
setVisitedLinkBorderBottomColor(const StyleColor & v)1735     void setVisitedLinkBorderBottomColor(const StyleColor& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderBottomColor, v); }
setVisitedLinkBorderTopColor(const StyleColor & v)1736     void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderTopColor, v); }
setVisitedLinkOutlineColor(const StyleColor & v)1737     void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(rareNonInheritedData, m_visitedLinkOutlineColor, v); }
setVisitedLinkColumnRuleColor(const StyleColor & v)1738     void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_visitedLinkColumnRuleColor, v); }
setVisitedLinkTextDecorationColor(const StyleColor & v)1739     void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(rareNonInheritedData, m_visitedLinkTextDecorationColor, v); }
setVisitedLinkTextEmphasisColor(const StyleColor & v)1740     void setVisitedLinkTextEmphasisColor(const StyleColor& v) { SET_VAR_WITH_SETTER(rareInheritedData, visitedLinkTextEmphasisColor, setVisitedLinkTextEmphasisColor, v); }
setVisitedLinkTextFillColor(const StyleColor & v)1741     void setVisitedLinkTextFillColor(const StyleColor& v) { SET_VAR_WITH_SETTER(rareInheritedData, visitedLinkTextFillColor, setVisitedLinkTextFillColor, v); }
setVisitedLinkTextStrokeColor(const StyleColor & v)1742     void setVisitedLinkTextStrokeColor(const StyleColor& v) { SET_VAR_WITH_SETTER(rareInheritedData, visitedLinkTextStrokeColor, setVisitedLinkTextStrokeColor, v); }
1743 
inheritUnicodeBidiFrom(const RenderStyle * parent)1744     void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags.unicodeBidi = parent->noninherited_flags.unicodeBidi; }
1745     void getShadowExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const;
1746     LayoutBoxExtent getShadowInsetExtent(const ShadowList*) const;
1747     void getShadowHorizontalExtent(const ShadowList*, LayoutUnit& left, LayoutUnit& right) const;
1748     void getShadowVerticalExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& bottom) const;
getShadowInlineDirectionExtent(const ShadowList * shadow,LayoutUnit & logicalLeft,LayoutUnit & logicalRight)1749     void getShadowInlineDirectionExtent(const ShadowList* shadow, LayoutUnit& logicalLeft, LayoutUnit& logicalRight) const
1750     {
1751         return isHorizontalWritingMode() ? getShadowHorizontalExtent(shadow, logicalLeft, logicalRight) : getShadowVerticalExtent(shadow, logicalLeft, logicalRight);
1752     }
getShadowBlockDirectionExtent(const ShadowList * shadow,LayoutUnit & logicalTop,LayoutUnit & logicalBottom)1753     void getShadowBlockDirectionExtent(const ShadowList* shadow, LayoutUnit& logicalTop, LayoutUnit& logicalBottom) const
1754     {
1755         return isHorizontalWritingMode() ? getShadowVerticalExtent(shadow, logicalTop, logicalBottom) : getShadowHorizontalExtent(shadow, logicalTop, logicalBottom);
1756     }
1757 
isDisplayFlexibleBox(EDisplay display)1758     bool isDisplayFlexibleBox(EDisplay display) const
1759     {
1760         return display == FLEX || display == INLINE_FLEX;
1761     }
1762 
isDisplayGridBox(EDisplay display)1763     bool isDisplayGridBox(EDisplay display) const
1764     {
1765         return display == GRID || display == INLINE_GRID;
1766     }
1767 
isDisplayReplacedType(EDisplay display)1768     bool isDisplayReplacedType(EDisplay display) const
1769     {
1770         return display == INLINE_BLOCK || display == INLINE_BOX || display == INLINE_FLEX
1771             || display == INLINE_TABLE || display == INLINE_GRID;
1772     }
1773 
isDisplayInlineType(EDisplay display)1774     bool isDisplayInlineType(EDisplay display) const
1775     {
1776         return display == INLINE || isDisplayReplacedType(display);
1777     }
1778 
1779     // Color accessors are all private to make sure callers use visitedDependentColor instead to access them.
borderLeftColor()1780     StyleColor borderLeftColor() const { return surround->border.left().color(); }
borderRightColor()1781     StyleColor borderRightColor() const { return surround->border.right().color(); }
borderTopColor()1782     StyleColor borderTopColor() const { return surround->border.top().color(); }
borderBottomColor()1783     StyleColor borderBottomColor() const { return surround->border.bottom().color(); }
backgroundColor()1784     StyleColor backgroundColor() const { return m_background->color(); }
1785     Color color() const;
columnRuleColor()1786     StyleColor columnRuleColor() const { return rareNonInheritedData->m_multiCol->m_rule.color(); }
outlineColor()1787     StyleColor outlineColor() const { return m_background->outline().color(); }
textEmphasisColor()1788     StyleColor textEmphasisColor() const { return rareInheritedData->textEmphasisColor(); }
textFillColor()1789     StyleColor textFillColor() const { return rareInheritedData->textFillColor(); }
textStrokeColor()1790     StyleColor textStrokeColor() const { return rareInheritedData->textStrokeColor(); }
1791     Color visitedLinkColor() const;
visitedLinkBackgroundColor()1792     StyleColor visitedLinkBackgroundColor() const { return rareNonInheritedData->m_visitedLinkBackgroundColor; }
visitedLinkBorderLeftColor()1793     StyleColor visitedLinkBorderLeftColor() const { return rareNonInheritedData->m_visitedLinkBorderLeftColor; }
visitedLinkBorderRightColor()1794     StyleColor visitedLinkBorderRightColor() const { return rareNonInheritedData->m_visitedLinkBorderRightColor; }
visitedLinkBorderBottomColor()1795     StyleColor visitedLinkBorderBottomColor() const { return rareNonInheritedData->m_visitedLinkBorderBottomColor; }
visitedLinkBorderTopColor()1796     StyleColor visitedLinkBorderTopColor() const { return rareNonInheritedData->m_visitedLinkBorderTopColor; }
visitedLinkOutlineColor()1797     StyleColor visitedLinkOutlineColor() const { return rareNonInheritedData->m_visitedLinkOutlineColor; }
visitedLinkColumnRuleColor()1798     StyleColor visitedLinkColumnRuleColor() const { return rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor; }
textDecorationColor()1799     StyleColor textDecorationColor() const { return rareNonInheritedData->m_textDecorationColor; }
visitedLinkTextDecorationColor()1800     StyleColor visitedLinkTextDecorationColor() const { return rareNonInheritedData->m_visitedLinkTextDecorationColor; }
visitedLinkTextEmphasisColor()1801     StyleColor visitedLinkTextEmphasisColor() const { return rareInheritedData->visitedLinkTextEmphasisColor(); }
visitedLinkTextFillColor()1802     StyleColor visitedLinkTextFillColor() const { return rareInheritedData->visitedLinkTextFillColor(); }
visitedLinkTextStrokeColor()1803     StyleColor visitedLinkTextStrokeColor() const { return rareInheritedData->visitedLinkTextStrokeColor(); }
1804 
1805     Color colorIncludingFallback(int colorProperty, bool visitedLink) const;
1806 
stopColor()1807     Color stopColor() const { return svgStyle().stopColor(); }
floodColor()1808     Color floodColor() const { return svgStyle().floodColor(); }
lightingColor()1809     Color lightingColor() const { return svgStyle().lightingColor(); }
1810 
1811     void appendContent(PassOwnPtr<ContentData>);
1812     void addAppliedTextDecoration(const AppliedTextDecoration&);
1813 
1814     bool diffNeedsFullLayoutAndPaintInvalidation(const RenderStyle& other) const;
1815     bool diffNeedsFullLayout(const RenderStyle& other) const;
1816     bool diffNeedsPaintInvalidationLayer(const RenderStyle& other) const;
1817     bool diffNeedsPaintInvalidationObject(const RenderStyle& other) const;
1818     void updatePropertySpecificDifferences(const RenderStyle& other, StyleDifference&) const;
1819 };
1820 
1821 // FIXME: Reduce/remove the dependency on zoom adjusted int values.
1822 // The float or LayoutUnit versions of layout values should be used.
adjustForAbsoluteZoom(int value,float zoomFactor)1823 inline int adjustForAbsoluteZoom(int value, float zoomFactor)
1824 {
1825     if (zoomFactor == 1)
1826         return value;
1827     // Needed because computeLengthInt truncates (rather than rounds) when scaling up.
1828     float fvalue = value;
1829     if (zoomFactor > 1) {
1830         if (value < 0)
1831             fvalue -= 0.5f;
1832         else
1833             fvalue += 0.5f;
1834     }
1835 
1836     return roundForImpreciseConversion<int>(fvalue / zoomFactor);
1837 }
1838 
adjustForAbsoluteZoom(int value,const RenderStyle * style)1839 inline int adjustForAbsoluteZoom(int value, const RenderStyle* style)
1840 {
1841     return adjustForAbsoluteZoom(value, style->effectiveZoom());
1842 }
1843 
adjustFloatForAbsoluteZoom(float value,const RenderStyle & style)1844 inline float adjustFloatForAbsoluteZoom(float value, const RenderStyle& style)
1845 {
1846     return value / style.effectiveZoom();
1847 }
1848 
adjustDoubleForAbsoluteZoom(double value,const RenderStyle & style)1849 inline double adjustDoubleForAbsoluteZoom(double value, const RenderStyle& style)
1850 {
1851     return value / style.effectiveZoom();
1852 }
1853 
adjustLayoutUnitForAbsoluteZoom(LayoutUnit value,const RenderStyle & style)1854 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, const RenderStyle& style)
1855 {
1856     return value / style.effectiveZoom();
1857 }
1858 
1859 // Since we don't currently persist fractional scroll offsets (crbug.com/414283),
1860 // we should round our return value to reflect the actual precision we have under
1861 // the range of typical zoom values. This avoids surprising issues with scroll
1862 // values not quite round-tripping exactly.
adjustScrollForAbsoluteZoom(int scrollOffset,float zoomFactor)1863 inline double adjustScrollForAbsoluteZoom(int scrollOffset, float zoomFactor)
1864 {
1865     double result = scrollOffset / zoomFactor;
1866     const double kScale = 10000; // 4 decimal places of accuracy
1867     return round(result * kScale) / kScale;
1868 }
1869 
adjustScrollForAbsoluteZoom(int scrollOffset,const RenderStyle & style)1870 inline double adjustScrollForAbsoluteZoom(int scrollOffset, const RenderStyle& style)
1871 {
1872     return adjustScrollForAbsoluteZoom(scrollOffset, style.effectiveZoom());
1873 }
1874 
setZoom(float f)1875 inline bool RenderStyle::setZoom(float f)
1876 {
1877     if (compareEqual(visual->m_zoom, f))
1878         return false;
1879     visual.access()->m_zoom = f;
1880     setEffectiveZoom(effectiveZoom() * zoom());
1881     return true;
1882 }
1883 
setEffectiveZoom(float f)1884 inline bool RenderStyle::setEffectiveZoom(float f)
1885 {
1886     if (compareEqual(rareInheritedData->m_effectiveZoom, f))
1887         return false;
1888     rareInheritedData.access()->m_effectiveZoom = f;
1889     return true;
1890 }
1891 
isSharable()1892 inline bool RenderStyle::isSharable() const
1893 {
1894     if (unique())
1895         return false;
1896     if (hasUniquePseudoStyle())
1897         return false;
1898     return true;
1899 }
1900 
setTextOrientation(TextOrientation textOrientation)1901 inline bool RenderStyle::setTextOrientation(TextOrientation textOrientation)
1902 {
1903     if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))
1904         return false;
1905 
1906     rareInheritedData.access()->m_textOrientation = textOrientation;
1907     return true;
1908 }
1909 
hasAnyPublicPseudoStyles()1910 inline bool RenderStyle::hasAnyPublicPseudoStyles() const
1911 {
1912     return PUBLIC_PSEUDOID_MASK & noninherited_flags.pseudoBits;
1913 }
1914 
hasPseudoStyle(PseudoId pseudo)1915 inline bool RenderStyle::hasPseudoStyle(PseudoId pseudo) const
1916 {
1917     ASSERT(pseudo > NOPSEUDO);
1918     ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
1919     return (1 << (pseudo - 1)) & noninherited_flags.pseudoBits;
1920 }
1921 
setHasPseudoStyle(PseudoId pseudo)1922 inline void RenderStyle::setHasPseudoStyle(PseudoId pseudo)
1923 {
1924     ASSERT(pseudo > NOPSEUDO);
1925     ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
1926     noninherited_flags.pseudoBits |= 1 << (pseudo - 1);
1927 }
1928 
hasPseudoElementStyle()1929 inline bool RenderStyle::hasPseudoElementStyle() const
1930 {
1931     return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1932 }
1933 
1934 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect::Radii&);
1935 
1936 } // namespace blink
1937 
1938 #endif // RenderStyle_h
1939