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