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