1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22 *
23 */
24
25 #ifndef RenderStyle_h
26 #define RenderStyle_h
27
28 #include "core/CSSPropertyNames.h"
29 #include "core/animation/css/CSSAnimationData.h"
30 #include "core/animation/css/CSSTransitionData.h"
31 #include "core/css/CSSLineBoxContainValue.h"
32 #include "core/css/CSSPrimitiveValue.h"
33 #include "core/rendering/style/BorderValue.h"
34 #include "core/rendering/style/CounterDirectives.h"
35 #include "core/rendering/style/DataRef.h"
36 #include "core/rendering/style/LineClampValue.h"
37 #include "core/rendering/style/NinePieceImage.h"
38 #include "core/rendering/style/OutlineValue.h"
39 #include "core/rendering/style/RenderStyleConstants.h"
40 #include "core/rendering/style/SVGRenderStyle.h"
41 #include "core/rendering/style/ShapeValue.h"
42 #include "core/rendering/style/StyleBackgroundData.h"
43 #include "core/rendering/style/StyleBoxData.h"
44 #include "core/rendering/style/StyleDeprecatedFlexibleBoxData.h"
45 #include "core/rendering/style/StyleDifference.h"
46 #include "core/rendering/style/StyleFilterData.h"
47 #include "core/rendering/style/StyleFlexibleBoxData.h"
48 #include "core/rendering/style/StyleGridData.h"
49 #include "core/rendering/style/StyleGridItemData.h"
50 #include "core/rendering/style/StyleInheritedData.h"
51 #include "core/rendering/style/StyleMarqueeData.h"
52 #include "core/rendering/style/StyleMultiColData.h"
53 #include "core/rendering/style/StyleRareInheritedData.h"
54 #include "core/rendering/style/StyleRareNonInheritedData.h"
55 #include "core/rendering/style/StyleReflection.h"
56 #include "core/rendering/style/StyleSurroundData.h"
57 #include "core/rendering/style/StyleTransformData.h"
58 #include "core/rendering/style/StyleVisualData.h"
59 #include "core/rendering/style/StyleWillChangeData.h"
60 #include "core/svg/SVGPaint.h"
61 #include "platform/Length.h"
62 #include "platform/LengthBox.h"
63 #include "platform/LengthSize.h"
64 #include "platform/ThemeTypes.h"
65 #include "platform/fonts/FontBaseline.h"
66 #include "platform/fonts/FontDescription.h"
67 #include "platform/geometry/FloatRoundedRect.h"
68 #include "platform/geometry/LayoutBoxExtent.h"
69 #include "platform/geometry/RoundedRect.h"
70 #include "platform/graphics/Color.h"
71 #include "platform/graphics/GraphicsTypes.h"
72 #include "platform/scroll/ScrollableArea.h"
73 #include "platform/text/TextDirection.h"
74 #include "platform/text/UnicodeBidi.h"
75 #include "platform/transforms/TransformOperations.h"
76 #include "wtf/Forward.h"
77 #include "wtf/OwnPtr.h"
78 #include "wtf/RefCounted.h"
79 #include "wtf/StdLibExtras.h"
80 #include "wtf/Vector.h"
81
compareEqual(const T & t,const U & u)82 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u) { return t == static_cast<T>(u); }
83
84 #define SET_VAR(group, variable, value) \
85 if (!compareEqual(group->variable, value)) \
86 group.access()->variable = value
87
88 #define SET_VAR_WITH_SETTER(group, getter, setter, value) \
89 if (!compareEqual(group->getter(), value)) \
90 group.access()->setter(value)
91
92 #define SET_BORDERVALUE_COLOR(group, variable, value) \
93 if (!compareEqual(group->variable.color(), value)) \
94 group.access()->variable.setColor(value)
95
96 namespace WebCore {
97
98 using std::max;
99
100 class FilterOperations;
101
102 class AppliedTextDecoration;
103 class BorderData;
104 class CounterContent;
105 class Font;
106 class FontMetrics;
107 class ShadowList;
108 class StyleImage;
109 class StyleInheritedData;
110 class StyleResolver;
111 class TransformationMatrix;
112
113 class ContentData;
114
115 typedef Vector<RefPtr<RenderStyle>, 4> PseudoStyleCache;
116
117 class RenderStyle: public RefCounted<RenderStyle> {
118 friend class AnimatedStyleBuilder; // Used by Web Animations CSS. Sets the color styles
119 friend class CSSAnimatableValueFactory; // Used by Web Animations CSS. Gets visited and unvisited colors separately.
120 friend class CSSPropertyEquality; // Used by CSS animations. We can't allow them to animate based off visited colors.
121 friend class ApplyStyleCommand; // Editing has to only reveal unvisited info.
122 friend class EditingStyle; // Editing has to only reveal unvisited info.
123 friend class CSSComputedStyleDeclaration; // Ignores visited styles, so needs to be able to see unvisited info.
124 friend class PropertyWrapperMaybeInvalidStyleColor; // Used by CSS animations. We can't allow them to animate based off visited colors.
125 friend class StyleBuilderFunctions; // Sets color styles
126 friend class CachedUAStyle; // Saves Border/Background information for later comparison.
127
128 // FIXME: When we stop resolving currentColor at style time, these can be removed.
129 friend class CSSToStyleMap;
130 friend class FilterOperationResolver;
131 friend class StyleBuilderConverter;
132 friend class StyleBuilder;
133 friend class StyleResolverState;
134 friend class StyleResolver;
135 protected:
136
137 // non-inherited attributes
138 DataRef<StyleBoxData> m_box;
139 DataRef<StyleVisualData> visual;
140 DataRef<StyleBackgroundData> m_background;
141 DataRef<StyleSurroundData> surround;
142 DataRef<StyleRareNonInheritedData> rareNonInheritedData;
143
144 // inherited attributes
145 DataRef<StyleRareInheritedData> rareInheritedData;
146 DataRef<StyleInheritedData> inherited;
147
148 // list of associated pseudo styles
149 OwnPtr<PseudoStyleCache> m_cachedPseudoStyles;
150
151 DataRef<SVGRenderStyle> m_svgStyle;
152
153 // !START SYNC!: Keep this in sync with the copy constructor in RenderStyle.cpp and implicitlyInherited() in StyleResolver.cpp
154
155 // inherit
156 struct InheritedFlags {
157 bool operator==(const InheritedFlags& other) const
158 {
159 return (_empty_cells == other._empty_cells)
160 && (_caption_side == other._caption_side)
161 && (_list_style_type == other._list_style_type)
162 && (_list_style_position == other._list_style_position)
163 && (_visibility == other._visibility)
164 && (_text_align == other._text_align)
165 && (_text_transform == other._text_transform)
166 && (m_textUnderline == other.m_textUnderline)
167 && (_cursor_style == other._cursor_style)
168 && (_direction == other._direction)
169 && (_white_space == other._white_space)
170 && (_border_collapse == other._border_collapse)
171 && (_box_direction == other._box_direction)
172 && (m_rtlOrdering == other.m_rtlOrdering)
173 && (m_printColorAdjust == other.m_printColorAdjust)
174 && (_pointerEvents == other._pointerEvents)
175 && (_insideLink == other._insideLink)
176 && (m_writingMode == other.m_writingMode);
177 }
178
179 bool operator!=(const InheritedFlags& other) const { return !(*this == other); }
180
181 unsigned _empty_cells : 1; // EEmptyCell
182 unsigned _caption_side : 2; // ECaptionSide
183 unsigned _list_style_type : 7; // EListStyleType
184 unsigned _list_style_position : 1; // EListStylePosition
185 unsigned _visibility : 2; // EVisibility
186 unsigned _text_align : 4; // ETextAlign
187 unsigned _text_transform : 2; // ETextTransform
188 unsigned m_textUnderline : 1;
189 unsigned _cursor_style : 6; // ECursor
190 unsigned _direction : 1; // TextDirection
191 unsigned _white_space : 3; // EWhiteSpace
192 unsigned _border_collapse : 1; // EBorderCollapse
193 unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction property, flexible box layout module)
194 // 32 bits
195
196 // non CSS2 inherited
197 unsigned m_rtlOrdering : 1; // Order
198 unsigned m_printColorAdjust : PrintColorAdjustBits;
199 unsigned _pointerEvents : 4; // EPointerEvents
200 unsigned _insideLink : 2; // EInsideLink
201
202 // CSS Text Layout Module Level 3: Vertical writing support
203 unsigned m_writingMode : 2; // WritingMode
204 // 42 bits
205 } inherited_flags;
206
207 // don't inherit
208 struct NonInheritedFlags {
209 bool operator==(const NonInheritedFlags& other) const
210 {
211 return _effectiveDisplay == other._effectiveDisplay
212 && _originalDisplay == other._originalDisplay
213 && _overflowX == other._overflowX
214 && _overflowY == other._overflowY
215 && _vertical_align == other._vertical_align
216 && _clear == other._clear
217 && _position == other._position
218 && _floating == other._floating
219 && _table_layout == other._table_layout
220 && _page_break_before == other._page_break_before
221 && _page_break_after == other._page_break_after
222 && _page_break_inside == other._page_break_inside
223 && _styleType == other._styleType
224 && _affectedByFocus == other._affectedByFocus
225 && _affectedByHover == other._affectedByHover
226 && _affectedByActive == other._affectedByActive
227 && _affectedByDrag == other._affectedByDrag
228 && _pseudoBits == other._pseudoBits
229 && _unicodeBidi == other._unicodeBidi
230 && explicitInheritance == other.explicitInheritance
231 && currentColor == other.currentColor
232 && unique == other.unique
233 && emptyState == other.emptyState
234 && firstChildState == other.firstChildState
235 && lastChildState == other.lastChildState
236 && _isLink == other._isLink;
237 }
238
239 bool operator!=(const NonInheritedFlags& other) const { return !(*this == other); }
240
241 unsigned _effectiveDisplay : 5; // EDisplay
242 unsigned _originalDisplay : 5; // EDisplay
243 unsigned _overflowX : 3; // EOverflow
244 unsigned _overflowY : 3; // EOverflow
245 unsigned _vertical_align : 4; // EVerticalAlign
246 unsigned _clear : 2; // EClear
247 unsigned _position : 3; // EPosition
248 unsigned _floating : 2; // EFloat
249 unsigned _table_layout : 1; // ETableLayout
250
251 unsigned _unicodeBidi : 3; // EUnicodeBidi
252
253 // This is set if we used viewport units when resolving a length.
254 // It is mutable so we can pass around const RenderStyles to resolve lengths.
255 mutable unsigned hasViewportUnits : 1;
256
257 // 32 bits
258
259 unsigned _page_break_before : 2; // EPageBreak
260 unsigned _page_break_after : 2; // EPageBreak
261 unsigned _page_break_inside : 2; // EPageBreak
262
263 unsigned _styleType : 6; // PseudoId
264 unsigned _pseudoBits : 8;
265 unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited property
266 unsigned currentColor : 1; // At least one color has the value 'currentColor'
267 unsigned unique : 1; // Style can not be shared.
268 unsigned emptyState : 1;
269 unsigned firstChildState : 1;
270 unsigned lastChildState : 1;
271
affectedByFocusNonInheritedFlags272 bool affectedByFocus() const { return _affectedByFocus; }
setAffectedByFocusNonInheritedFlags273 void setAffectedByFocus(bool value) { _affectedByFocus = value; }
affectedByHoverNonInheritedFlags274 bool affectedByHover() const { return _affectedByHover; }
setAffectedByHoverNonInheritedFlags275 void setAffectedByHover(bool value) { _affectedByHover = value; }
affectedByActiveNonInheritedFlags276 bool affectedByActive() const { return _affectedByActive; }
setAffectedByActiveNonInheritedFlags277 void setAffectedByActive(bool value) { _affectedByActive = value; }
affectedByDragNonInheritedFlags278 bool affectedByDrag() const { return _affectedByDrag; }
setAffectedByDragNonInheritedFlags279 void setAffectedByDrag(bool value) { _affectedByDrag = value; }
isLinkNonInheritedFlags280 bool isLink() const { return _isLink; }
setIsLinkNonInheritedFlags281 void setIsLink(bool value) { _isLink = value; }
282 private:
283 unsigned _affectedByFocus : 1;
284 unsigned _affectedByHover : 1;
285 unsigned _affectedByActive : 1;
286 unsigned _affectedByDrag : 1;
287 unsigned _isLink : 1;
288 // If you add more style bits here, you will also need to update RenderStyle::copyNonInheritedFrom()
289 // 63 bits
290 } noninherited_flags;
291
292 // !END SYNC!
293
294 protected:
setBitDefaults()295 void setBitDefaults()
296 {
297 inherited_flags._empty_cells = initialEmptyCells();
298 inherited_flags._caption_side = initialCaptionSide();
299 inherited_flags._list_style_type = initialListStyleType();
300 inherited_flags._list_style_position = initialListStylePosition();
301 inherited_flags._visibility = initialVisibility();
302 inherited_flags._text_align = initialTextAlign();
303 inherited_flags._text_transform = initialTextTransform();
304 inherited_flags.m_textUnderline = false;
305 inherited_flags._cursor_style = initialCursor();
306 inherited_flags._direction = initialDirection();
307 inherited_flags._white_space = initialWhiteSpace();
308 inherited_flags._border_collapse = initialBorderCollapse();
309 inherited_flags.m_rtlOrdering = initialRTLOrdering();
310 inherited_flags._box_direction = initialBoxDirection();
311 inherited_flags.m_printColorAdjust = initialPrintColorAdjust();
312 inherited_flags._pointerEvents = initialPointerEvents();
313 inherited_flags._insideLink = NotInsideLink;
314 inherited_flags.m_writingMode = initialWritingMode();
315
316 noninherited_flags._effectiveDisplay = noninherited_flags._originalDisplay = initialDisplay();
317 noninherited_flags._overflowX = initialOverflowX();
318 noninherited_flags._overflowY = initialOverflowY();
319 noninherited_flags._vertical_align = initialVerticalAlign();
320 noninherited_flags._clear = initialClear();
321 noninherited_flags._position = initialPosition();
322 noninherited_flags._floating = initialFloating();
323 noninherited_flags._table_layout = initialTableLayout();
324 noninherited_flags._unicodeBidi = initialUnicodeBidi();
325 noninherited_flags._page_break_before = initialPageBreak();
326 noninherited_flags._page_break_after = initialPageBreak();
327 noninherited_flags._page_break_inside = initialPageBreak();
328 noninherited_flags._styleType = NOPSEUDO;
329 noninherited_flags._pseudoBits = 0;
330 noninherited_flags.explicitInheritance = false;
331 noninherited_flags.currentColor = false;
332 noninherited_flags.unique = false;
333 noninherited_flags.emptyState = false;
334 noninherited_flags.firstChildState = false;
335 noninherited_flags.lastChildState = false;
336 noninherited_flags.hasViewportUnits = false;
337 noninherited_flags.setAffectedByFocus(false);
338 noninherited_flags.setAffectedByHover(false);
339 noninherited_flags.setAffectedByActive(false);
340 noninherited_flags.setAffectedByDrag(false);
341 noninherited_flags.setIsLink(false);
342 }
343
344 private:
345 ALWAYS_INLINE RenderStyle();
346
347 enum DefaultStyleTag {
348 DefaultStyle
349 };
350 ALWAYS_INLINE explicit RenderStyle(DefaultStyleTag);
351 ALWAYS_INLINE RenderStyle(const RenderStyle&);
352
353 public:
354 static PassRefPtr<RenderStyle> create();
355 static PassRefPtr<RenderStyle> createDefaultStyle();
356 static PassRefPtr<RenderStyle> createAnonymousStyleWithDisplay(const RenderStyle* parentStyle, EDisplay);
357 static PassRefPtr<RenderStyle> clone(const RenderStyle*);
358
359 // Computes how the style change should be propagated down the tree.
360 static StyleRecalcChange stylePropagationDiff(const RenderStyle* oldStyle, const RenderStyle* newStyle);
361
362 // Computes how much visual invalidation the style change causes: layout, repaint or recomposite.
363 StyleDifference visualInvalidationDiff(const RenderStyle&, unsigned& changedContextSensitiveProperties) const;
364
365 enum IsAtShadowBoundary {
366 AtShadowBoundary,
367 NotAtShadowBoundary,
368 };
369
370 void inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary = NotAtShadowBoundary);
371 void copyNonInheritedFrom(const RenderStyle*);
372
styleType()373 PseudoId styleType() const { return static_cast<PseudoId>(noninherited_flags._styleType); }
setStyleType(PseudoId styleType)374 void setStyleType(PseudoId styleType) { noninherited_flags._styleType = styleType; }
375
376 RenderStyle* getCachedPseudoStyle(PseudoId) const;
377 RenderStyle* addCachedPseudoStyle(PassRefPtr<RenderStyle>);
378 void removeCachedPseudoStyle(PseudoId);
379
cachedPseudoStyles()380 const PseudoStyleCache* cachedPseudoStyles() const { return m_cachedPseudoStyles.get(); }
381
382 void setHasViewportUnits(bool hasViewportUnits = true) const { noninherited_flags.hasViewportUnits = hasViewportUnits; }
hasViewportUnits()383 bool hasViewportUnits() const { return noninherited_flags.hasViewportUnits; }
384
affectedByFocus()385 bool affectedByFocus() const { return noninherited_flags.affectedByFocus(); }
affectedByHover()386 bool affectedByHover() const { return noninherited_flags.affectedByHover(); }
affectedByActive()387 bool affectedByActive() const { return noninherited_flags.affectedByActive(); }
affectedByDrag()388 bool affectedByDrag() const { return noninherited_flags.affectedByDrag(); }
389
setAffectedByFocus()390 void setAffectedByFocus() { noninherited_flags.setAffectedByFocus(true); }
setAffectedByHover()391 void setAffectedByHover() { noninherited_flags.setAffectedByHover(true); }
setAffectedByActive()392 void setAffectedByActive() { noninherited_flags.setAffectedByActive(true); }
setAffectedByDrag()393 void setAffectedByDrag() { noninherited_flags.setAffectedByDrag(true); }
394
395 bool operator==(const RenderStyle& other) const;
396 bool operator!=(const RenderStyle& other) const { return !(*this == other); }
isFloating()397 bool isFloating() const { return noninherited_flags._floating != NoFloat; }
hasMargin()398 bool hasMargin() const { return surround->margin.nonZero(); }
hasBorder()399 bool hasBorder() const { return surround->border.hasBorder(); }
hasPadding()400 bool hasPadding() const { return surround->padding.nonZero(); }
hasOffset()401 bool hasOffset() const { return surround->offset.nonZero(); }
hasMarginBeforeQuirk()402 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); }
hasMarginAfterQuirk()403 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); }
404
hasBackgroundImage()405 bool hasBackgroundImage() const { return m_background->background().hasImage(); }
hasFixedBackgroundImage()406 bool hasFixedBackgroundImage() const { return m_background->background().hasFixedImage(); }
407
408 bool hasEntirelyFixedBackground() const;
409
hasAppearance()410 bool hasAppearance() const { return appearance() != NoControlPart; }
411
hasBackground()412 bool hasBackground() const
413 {
414 Color color = visitedDependentColor(CSSPropertyBackgroundColor);
415 if (color.alpha())
416 return true;
417 return hasBackgroundImage();
418 }
419
420 LayoutBoxExtent imageOutsets(const NinePieceImage&) const;
hasBorderImageOutsets()421 bool hasBorderImageOutsets() const
422 {
423 return borderImage().hasImage() && borderImage().outset().nonZero();
424 }
borderImageOutsets()425 LayoutBoxExtent borderImageOutsets() const
426 {
427 return imageOutsets(borderImage());
428 }
429
maskBoxImageOutsets()430 LayoutBoxExtent maskBoxImageOutsets() const
431 {
432 return imageOutsets(maskBoxImage());
433 }
434
hasFilterOutsets()435 bool hasFilterOutsets() const { return hasFilter() && filter().hasOutsets(); }
filterOutsets()436 FilterOutsets filterOutsets() const { return hasFilter() ? filter().outsets() : FilterOutsets(); }
437
rtlOrdering()438 Order rtlOrdering() const { return static_cast<Order>(inherited_flags.m_rtlOrdering); }
setRTLOrdering(Order o)439 void setRTLOrdering(Order o) { inherited_flags.m_rtlOrdering = o; }
440
441 bool isStyleAvailable() const;
442
443 bool hasAnyPublicPseudoStyles() const;
444 bool hasPseudoStyle(PseudoId pseudo) const;
445 void setHasPseudoStyle(PseudoId pseudo);
446 bool hasUniquePseudoStyle() const;
447 bool hasPseudoElementStyle() const;
448
449 // attribute getter methods
450
display()451 EDisplay display() const { return static_cast<EDisplay>(noninherited_flags._effectiveDisplay); }
originalDisplay()452 EDisplay originalDisplay() const { return static_cast<EDisplay>(noninherited_flags._originalDisplay); }
453
left()454 const Length& left() const { return surround->offset.left(); }
right()455 const Length& right() const { return surround->offset.right(); }
top()456 const Length& top() const { return surround->offset.top(); }
bottom()457 const Length& bottom() const { return surround->offset.bottom(); }
458
459 // Accessors for positioned object edges that take into account writing mode.
logicalLeft()460 const Length& logicalLeft() const { return surround->offset.logicalLeft(writingMode()); }
logicalRight()461 const Length& logicalRight() const { return surround->offset.logicalRight(writingMode()); }
logicalTop()462 const Length& logicalTop() const { return surround->offset.before(writingMode()); }
logicalBottom()463 const Length& logicalBottom() const { return surround->offset.after(writingMode()); }
464
465 // Whether or not a positioned element requires normal flow x/y to be computed
466 // to determine its position.
hasAutoLeftAndRight()467 bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto(); }
hasAutoTopAndBottom()468 bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto(); }
hasStaticInlinePosition(bool horizontal)469 bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? hasAutoLeftAndRight() : hasAutoTopAndBottom(); }
hasStaticBlockPosition(bool horizontal)470 bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? hasAutoTopAndBottom() : hasAutoLeftAndRight(); }
471
position()472 EPosition position() const { return static_cast<EPosition>(noninherited_flags._position); }
hasOutOfFlowPosition()473 bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; }
hasInFlowPosition()474 bool hasInFlowPosition() const { return position() == RelativePosition || position() == StickyPosition; }
hasViewportConstrainedPosition()475 bool hasViewportConstrainedPosition() const { return position() == FixedPosition || position() == StickyPosition; }
floating()476 EFloat floating() const { return static_cast<EFloat>(noninherited_flags._floating); }
477
width()478 const Length& width() const { return m_box->width(); }
height()479 const Length& height() const { return m_box->height(); }
minWidth()480 const Length& minWidth() const { return m_box->minWidth(); }
maxWidth()481 const Length& maxWidth() const { return m_box->maxWidth(); }
minHeight()482 const Length& minHeight() const { return m_box->minHeight(); }
maxHeight()483 const Length& maxHeight() const { return m_box->maxHeight(); }
484
logicalWidth()485 const Length& logicalWidth() const { return isHorizontalWritingMode() ? width() : height(); }
logicalHeight()486 const Length& logicalHeight() const { return isHorizontalWritingMode() ? height() : width(); }
logicalMinWidth()487 const Length& logicalMinWidth() const { return isHorizontalWritingMode() ? minWidth() : minHeight(); }
logicalMaxWidth()488 const Length& logicalMaxWidth() const { return isHorizontalWritingMode() ? maxWidth() : maxHeight(); }
logicalMinHeight()489 const Length& logicalMinHeight() const { return isHorizontalWritingMode() ? minHeight() : minWidth(); }
logicalMaxHeight()490 const Length& logicalMaxHeight() const { return isHorizontalWritingMode() ? maxHeight() : maxWidth(); }
491
border()492 const BorderData& border() const { return surround->border; }
borderLeft()493 const BorderValue& borderLeft() const { return surround->border.left(); }
borderRight()494 const BorderValue& borderRight() const { return surround->border.right(); }
borderTop()495 const BorderValue& borderTop() const { return surround->border.top(); }
borderBottom()496 const BorderValue& borderBottom() const { return surround->border.bottom(); }
497
498 const BorderValue& borderBefore() const;
499 const BorderValue& borderAfter() const;
500 const BorderValue& borderStart() const;
501 const BorderValue& borderEnd() const;
502
borderImage()503 const NinePieceImage& borderImage() const { return surround->border.image(); }
borderImageSource()504 StyleImage* borderImageSource() const { return surround->border.image().image(); }
borderImageSlices()505 const LengthBox& borderImageSlices() const { return surround->border.image().imageSlices(); }
borderImageWidth()506 const BorderImageLengthBox& borderImageWidth() const { return surround->border.image().borderSlices(); }
borderImageOutset()507 const BorderImageLengthBox& borderImageOutset() const { return surround->border.image().outset(); }
508
borderTopLeftRadius()509 const LengthSize& borderTopLeftRadius() const { return surround->border.topLeft(); }
borderTopRightRadius()510 const LengthSize& borderTopRightRadius() const { return surround->border.topRight(); }
borderBottomLeftRadius()511 const LengthSize& borderBottomLeftRadius() const { return surround->border.bottomLeft(); }
borderBottomRightRadius()512 const LengthSize& borderBottomRightRadius() const { return surround->border.bottomRight(); }
hasBorderRadius()513 bool hasBorderRadius() const { return surround->border.hasBorderRadius(); }
514
borderLeftWidth()515 unsigned borderLeftWidth() const { return surround->border.borderLeftWidth(); }
borderLeftStyle()516 EBorderStyle borderLeftStyle() const { return surround->border.left().style(); }
borderLeftIsTransparent()517 bool borderLeftIsTransparent() const { return surround->border.left().isTransparent(); }
borderRightWidth()518 unsigned borderRightWidth() const { return surround->border.borderRightWidth(); }
borderRightStyle()519 EBorderStyle borderRightStyle() const { return surround->border.right().style(); }
borderRightIsTransparent()520 bool borderRightIsTransparent() const { return surround->border.right().isTransparent(); }
borderTopWidth()521 unsigned borderTopWidth() const { return surround->border.borderTopWidth(); }
borderTopStyle()522 EBorderStyle borderTopStyle() const { return surround->border.top().style(); }
borderTopIsTransparent()523 bool borderTopIsTransparent() const { return surround->border.top().isTransparent(); }
borderBottomWidth()524 unsigned borderBottomWidth() const { return surround->border.borderBottomWidth(); }
borderBottomStyle()525 EBorderStyle borderBottomStyle() const { return surround->border.bottom().style(); }
borderBottomIsTransparent()526 bool borderBottomIsTransparent() const { return surround->border.bottom().isTransparent(); }
527
528 unsigned short borderBeforeWidth() const;
529 unsigned short borderAfterWidth() const;
530 unsigned short borderStartWidth() const;
531 unsigned short borderEndWidth() const;
532
outlineSize()533 unsigned short outlineSize() const { return max(0, outlineWidth() + outlineOffset()); }
outlineWidth()534 unsigned short outlineWidth() const
535 {
536 if (m_background->outline().style() == BNONE)
537 return 0;
538 return m_background->outline().width();
539 }
hasOutline()540 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > BHIDDEN; }
outlineStyle()541 EBorderStyle outlineStyle() const { return m_background->outline().style(); }
outlineStyleIsAuto()542 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto>(m_background->outline().isAuto()); }
543
overflowX()544 EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_flags._overflowX); }
overflowY()545 EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_flags._overflowY); }
546 // It's sufficient to just check one direction, since it's illegal to have visible on only one overflow value.
isOverflowVisible()547 bool isOverflowVisible() const { ASSERT(overflowX() != OVISIBLE || overflowX() == overflowY()); return overflowX() == OVISIBLE; }
isOverflowPaged()548 bool isOverflowPaged() const { return overflowY() == OPAGEDX || overflowY() == OPAGEDY; }
549
visibility()550 EVisibility visibility() const { return static_cast<EVisibility>(inherited_flags._visibility); }
verticalAlign()551 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(noninherited_flags._vertical_align); }
verticalAlignLength()552 const Length& verticalAlignLength() const { return m_box->verticalAlign(); }
553
clipLeft()554 const Length& clipLeft() const { return visual->clip.left(); }
clipRight()555 const Length& clipRight() const { return visual->clip.right(); }
clipTop()556 const Length& clipTop() const { return visual->clip.top(); }
clipBottom()557 const Length& clipBottom() const { return visual->clip.bottom(); }
clip()558 const LengthBox& clip() const { return visual->clip; }
hasClip()559 bool hasClip() const { return visual->hasClip; }
560
unicodeBidi()561 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninherited_flags._unicodeBidi); }
562
clear()563 EClear clear() const { return static_cast<EClear>(noninherited_flags._clear); }
tableLayout()564 ETableLayout tableLayout() const { return static_cast<ETableLayout>(noninherited_flags._table_layout); }
isFixedTableLayout()565 bool isFixedTableLayout() const { return tableLayout() == TFIXED && !logicalWidth().isAuto(); }
566
567 const Font& font() const;
568 const FontMetrics& fontMetrics() const;
569 const FontDescription& fontDescription() const;
570 float specifiedFontSize() const;
571 float computedFontSize() const;
572 int fontSize() const;
573 FontWeight fontWeight() const;
574
textAutosizingMultiplier()575 float textAutosizingMultiplier() const { return inherited->textAutosizingMultiplier; }
576
textIndent()577 const Length& textIndent() const { return rareInheritedData->indent; }
textIndentLine()578 TextIndentLine textIndentLine() const { return static_cast<TextIndentLine>(rareInheritedData->m_textIndentLine); }
textIndentType()579 TextIndentType textIndentType() const { return static_cast<TextIndentType>(rareInheritedData->m_textIndentType); }
textAlign()580 ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flags._text_align); }
textAlignLast()581 TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(rareInheritedData->m_textAlignLast); }
textJustify()582 TextJustify textJustify() const { return static_cast<TextJustify>(rareInheritedData->m_textJustify); }
textTransform()583 ETextTransform textTransform() const { return static_cast<ETextTransform>(inherited_flags._text_transform); }
584 TextDecoration textDecorationsInEffect() const;
585 const Vector<AppliedTextDecoration>& appliedTextDecorations() const;
textDecoration()586 TextDecoration textDecoration() const { return static_cast<TextDecoration>(visual->textDecoration); }
textUnderlinePosition()587 TextUnderlinePosition textUnderlinePosition() const { return static_cast<TextUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); }
textDecorationStyle()588 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(rareNonInheritedData->m_textDecorationStyle); }
589 float wordSpacing() const;
590 float letterSpacing() const;
591
zoom()592 float zoom() const { return visual->m_zoom; }
effectiveZoom()593 float effectiveZoom() const { return rareInheritedData->m_effectiveZoom; }
594
direction()595 TextDirection direction() const { return static_cast<TextDirection>(inherited_flags._direction); }
isLeftToRightDirection()596 bool isLeftToRightDirection() const { return direction() == LTR; }
597
598 const Length& specifiedLineHeight() const;
599 Length lineHeight() const;
600 int computedLineHeight() const;
601
whiteSpace()602 EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(inherited_flags._white_space); }
autoWrap(EWhiteSpace ws)603 static bool autoWrap(EWhiteSpace ws)
604 {
605 // Nowrap and pre don't automatically wrap.
606 return ws != NOWRAP && ws != PRE;
607 }
608
autoWrap()609 bool autoWrap() const
610 {
611 return autoWrap(whiteSpace());
612 }
613
preserveNewline(EWhiteSpace ws)614 static bool preserveNewline(EWhiteSpace ws)
615 {
616 // Normal and nowrap do not preserve newlines.
617 return ws != NORMAL && ws != NOWRAP;
618 }
619
preserveNewline()620 bool preserveNewline() const
621 {
622 return preserveNewline(whiteSpace());
623 }
624
collapseWhiteSpace(EWhiteSpace ws)625 static bool collapseWhiteSpace(EWhiteSpace ws)
626 {
627 // Pre and prewrap do not collapse whitespace.
628 return ws != PRE && ws != PRE_WRAP;
629 }
630
collapseWhiteSpace()631 bool collapseWhiteSpace() const
632 {
633 return collapseWhiteSpace(whiteSpace());
634 }
635
isCollapsibleWhiteSpace(UChar c)636 bool isCollapsibleWhiteSpace(UChar c) const
637 {
638 switch (c) {
639 case ' ':
640 case '\t':
641 return collapseWhiteSpace();
642 case '\n':
643 return !preserveNewline();
644 }
645 return false;
646 }
647
breakOnlyAfterWhiteSpace()648 bool breakOnlyAfterWhiteSpace() const
649 {
650 return whiteSpace() == PRE_WRAP || lineBreak() == LineBreakAfterWhiteSpace;
651 }
652
breakWords()653 bool breakWords() const
654 {
655 return wordBreak() == BreakWordBreak || overflowWrap() == BreakOverflowWrap;
656 }
657
backgroundRepeatX()658 EFillRepeat backgroundRepeatX() const { return static_cast<EFillRepeat>(m_background->background().repeatX()); }
backgroundRepeatY()659 EFillRepeat backgroundRepeatY() const { return static_cast<EFillRepeat>(m_background->background().repeatY()); }
backgroundComposite()660 CompositeOperator backgroundComposite() const { return static_cast<CompositeOperator>(m_background->background().composite()); }
backgroundAttachment()661 EFillAttachment backgroundAttachment() const { return static_cast<EFillAttachment>(m_background->background().attachment()); }
backgroundClip()662 EFillBox backgroundClip() const { return static_cast<EFillBox>(m_background->background().clip()); }
backgroundOrigin()663 EFillBox backgroundOrigin() const { return static_cast<EFillBox>(m_background->background().origin()); }
backgroundXPosition()664 const Length& backgroundXPosition() const { return m_background->background().xPosition(); }
backgroundYPosition()665 const Length& backgroundYPosition() const { return m_background->background().yPosition(); }
backgroundSizeType()666 EFillSizeType backgroundSizeType() const { return m_background->background().sizeType(); }
backgroundSizeLength()667 const LengthSize& backgroundSizeLength() const { return m_background->background().sizeLength(); }
accessBackgroundLayers()668 FillLayer* accessBackgroundLayers() { return &(m_background.access()->m_background); }
backgroundLayers()669 const FillLayer* backgroundLayers() const { return &(m_background->background()); }
670
maskImage()671 StyleImage* maskImage() const { return rareNonInheritedData->m_mask.image(); }
maskRepeatX()672 EFillRepeat maskRepeatX() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.repeatX()); }
maskRepeatY()673 EFillRepeat maskRepeatY() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.repeatY()); }
maskComposite()674 CompositeOperator maskComposite() const { return static_cast<CompositeOperator>(rareNonInheritedData->m_mask.composite()); }
maskClip()675 EFillBox maskClip() const { return static_cast<EFillBox>(rareNonInheritedData->m_mask.clip()); }
maskOrigin()676 EFillBox maskOrigin() const { return static_cast<EFillBox>(rareNonInheritedData->m_mask.origin()); }
maskXPosition()677 const Length& maskXPosition() const { return rareNonInheritedData->m_mask.xPosition(); }
maskYPosition()678 const Length& maskYPosition() const { return rareNonInheritedData->m_mask.yPosition(); }
maskSizeType()679 EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.sizeType(); }
maskSizeLength()680 const LengthSize& maskSizeLength() const { return rareNonInheritedData->m_mask.sizeLength(); }
accessMaskLayers()681 FillLayer* accessMaskLayers() { return &(rareNonInheritedData.access()->m_mask); }
maskLayers()682 const FillLayer* maskLayers() const { return &(rareNonInheritedData->m_mask); }
683
maskBoxImage()684 const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_maskBoxImage; }
maskBoxImageSource()685 StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_maskBoxImage.image(); }
maskBoxImageSlices()686 const LengthBox& maskBoxImageSlices() const { return rareNonInheritedData->m_maskBoxImage.imageSlices(); }
maskBoxImageSlicesFill()687 bool maskBoxImageSlicesFill() const { return rareNonInheritedData->m_maskBoxImage.fill(); }
maskBoxImageWidth()688 const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheritedData->m_maskBoxImage.borderSlices(); }
maskBoxImageOutset()689 const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInheritedData->m_maskBoxImage.outset(); }
690
borderCollapse()691 EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse>(inherited_flags._border_collapse); }
692 short horizontalBorderSpacing() const;
693 short verticalBorderSpacing() const;
emptyCells()694 EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_flags._empty_cells); }
captionSide()695 ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherited_flags._caption_side); }
696
listStyleType()697 EListStyleType listStyleType() const { return static_cast<EListStyleType>(inherited_flags._list_style_type); }
698 StyleImage* listStyleImage() const;
listStylePosition()699 EListStylePosition listStylePosition() const { return static_cast<EListStylePosition>(inherited_flags._list_style_position); }
700
marginTop()701 const Length& marginTop() const { return surround->margin.top(); }
marginBottom()702 const Length& marginBottom() const { return surround->margin.bottom(); }
marginLeft()703 const Length& marginLeft() const { return surround->margin.left(); }
marginRight()704 const Length& marginRight() const { return surround->margin.right(); }
marginBefore()705 const Length& marginBefore() const { return surround->margin.before(writingMode()); }
marginAfter()706 const Length& marginAfter() const { return surround->margin.after(writingMode()); }
marginStart()707 const Length& marginStart() const { return surround->margin.start(writingMode(), direction()); }
marginEnd()708 const Length& marginEnd() const { return surround->margin.end(writingMode(), direction()); }
marginStartUsing(const RenderStyle * otherStyle)709 const Length& marginStartUsing(const RenderStyle* otherStyle) const { return surround->margin.start(otherStyle->writingMode(), otherStyle->direction()); }
marginEndUsing(const RenderStyle * otherStyle)710 const Length& marginEndUsing(const RenderStyle* otherStyle) const { return surround->margin.end(otherStyle->writingMode(), otherStyle->direction()); }
marginBeforeUsing(const RenderStyle * otherStyle)711 const Length& marginBeforeUsing(const RenderStyle* otherStyle) const { return surround->margin.before(otherStyle->writingMode()); }
marginAfterUsing(const RenderStyle * otherStyle)712 const Length& marginAfterUsing(const RenderStyle* otherStyle) const { return surround->margin.after(otherStyle->writingMode()); }
713
paddingBox()714 const LengthBox& paddingBox() const { return surround->padding; }
paddingTop()715 const Length& paddingTop() const { return surround->padding.top(); }
paddingBottom()716 const Length& paddingBottom() const { return surround->padding.bottom(); }
paddingLeft()717 const Length& paddingLeft() const { return surround->padding.left(); }
paddingRight()718 const Length& paddingRight() const { return surround->padding.right(); }
paddingBefore()719 const Length& paddingBefore() const { return surround->padding.before(writingMode()); }
paddingAfter()720 const Length& paddingAfter() const { return surround->padding.after(writingMode()); }
paddingStart()721 const Length& paddingStart() const { return surround->padding.start(writingMode(), direction()); }
paddingEnd()722 const Length& paddingEnd() const { return surround->padding.end(writingMode(), direction()); }
723
cursor()724 ECursor cursor() const { return static_cast<ECursor>(inherited_flags._cursor_style); }
cursors()725 CursorList* cursors() const { return rareInheritedData->cursorData.get(); }
726
insideLink()727 EInsideLink insideLink() const { return static_cast<EInsideLink>(inherited_flags._insideLink); }
isLink()728 bool isLink() const { return noninherited_flags.isLink(); }
729
widows()730 short widows() const { return rareInheritedData->widows; }
orphans()731 short orphans() const { return rareInheritedData->orphans; }
hasAutoWidows()732 bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; }
hasAutoOrphans()733 bool hasAutoOrphans() const { return rareInheritedData->m_hasAutoOrphans; }
pageBreakInside()734 EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninherited_flags._page_break_inside); }
pageBreakBefore()735 EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninherited_flags._page_break_before); }
pageBreakAfter()736 EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(noninherited_flags._page_break_after); }
737
738 // CSS3 Getter Methods
739
outlineOffset()740 int outlineOffset() const
741 {
742 if (m_background->outline().style() == BNONE)
743 return 0;
744 return m_background->outline().offset();
745 }
746
textShadow()747 ShadowList* textShadow() const { return rareInheritedData->textShadow.get(); }
getTextShadowExtent(LayoutUnit & top,LayoutUnit & right,LayoutUnit & bottom,LayoutUnit & left)748 void getTextShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const { getShadowExtent(textShadow(), top, right, bottom, left); }
getTextShadowHorizontalExtent(LayoutUnit & left,LayoutUnit & right)749 void getTextShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(textShadow(), left, right); }
getTextShadowVerticalExtent(LayoutUnit & top,LayoutUnit & bottom)750 void getTextShadowVerticalExtent(LayoutUnit& top, LayoutUnit& bottom) const { getShadowVerticalExtent(textShadow(), top, bottom); }
getTextShadowInlineDirectionExtent(LayoutUnit & logicalLeft,LayoutUnit & logicalRight)751 void getTextShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(textShadow(), logicalLeft, logicalRight); }
getTextShadowBlockDirectionExtent(LayoutUnit & logicalTop,LayoutUnit & logicalBottom)752 void getTextShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& logicalBottom) { getShadowBlockDirectionExtent(textShadow(), logicalTop, logicalBottom); }
753
textStrokeWidth()754 float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; }
opacity()755 float opacity() const { return rareNonInheritedData->opacity; }
appearance()756 ControlPart appearance() const { return static_cast<ControlPart>(rareNonInheritedData->m_appearance); }
757 // aspect ratio convenience method
hasAspectRatio()758 bool hasAspectRatio() const { return rareNonInheritedData->m_hasAspectRatio; }
aspectRatio()759 float aspectRatio() const { return aspectRatioNumerator() / aspectRatioDenominator(); }
aspectRatioDenominator()760 float aspectRatioDenominator() const { return rareNonInheritedData->m_aspectRatioDenominator; }
aspectRatioNumerator()761 float aspectRatioNumerator() const { return rareNonInheritedData->m_aspectRatioNumerator; }
boxAlign()762 EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(rareNonInheritedData->m_deprecatedFlexibleBox->align); }
boxDirection()763 EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(inherited_flags._box_direction); }
boxFlex()764 float boxFlex() const { return rareNonInheritedData->m_deprecatedFlexibleBox->flex; }
boxFlexGroup()765 unsigned boxFlexGroup() const { return rareNonInheritedData->m_deprecatedFlexibleBox->flexGroup; }
boxLines()766 EBoxLines boxLines() const { return static_cast<EBoxLines>(rareNonInheritedData->m_deprecatedFlexibleBox->lines); }
boxOrdinalGroup()767 unsigned boxOrdinalGroup() const { return rareNonInheritedData->m_deprecatedFlexibleBox->ordinalGroup; }
boxOrient()768 EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(rareNonInheritedData->m_deprecatedFlexibleBox->orient); }
boxPack()769 EBoxPack boxPack() const { return static_cast<EBoxPack>(rareNonInheritedData->m_deprecatedFlexibleBox->pack); }
770
order()771 int order() const { return rareNonInheritedData->m_order; }
callbackSelectors()772 const Vector<String>& callbackSelectors() const { return rareNonInheritedData->m_callbackSelectors; }
flexGrow()773 float flexGrow() const { return rareNonInheritedData->m_flexibleBox->m_flexGrow; }
flexShrink()774 float flexShrink() const { return rareNonInheritedData->m_flexibleBox->m_flexShrink; }
flexBasis()775 const Length& flexBasis() const { return rareNonInheritedData->m_flexibleBox->m_flexBasis; }
alignContent()776 EAlignContent alignContent() const { return static_cast<EAlignContent>(rareNonInheritedData->m_alignContent); }
alignItems()777 ItemPosition alignItems() const { return static_cast<ItemPosition>(rareNonInheritedData->m_alignItems); }
alignItemsOverflowAlignment()778 OverflowAlignment alignItemsOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_alignItemsOverflowAlignment); }
alignSelf()779 ItemPosition alignSelf() const { return static_cast<ItemPosition>(rareNonInheritedData->m_alignSelf); }
alignSelfOverflowAlignment()780 OverflowAlignment alignSelfOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_alignSelfOverflowAlignment); }
flexDirection()781 EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(rareNonInheritedData->m_flexibleBox->m_flexDirection); }
isColumnFlexDirection()782 bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; }
isReverseFlexDirection()783 bool isReverseFlexDirection() const { return flexDirection() == FlowRowReverse || flexDirection() == FlowColumnReverse; }
flexWrap()784 EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(rareNonInheritedData->m_flexibleBox->m_flexWrap); }
justifyContent()785 EJustifyContent justifyContent() const { return static_cast<EJustifyContent>(rareNonInheritedData->m_justifyContent); }
justifySelf()786 ItemPosition justifySelf() const { return static_cast<ItemPosition>(rareNonInheritedData->m_justifySelf); }
justifySelfOverflowAlignment()787 OverflowAlignment justifySelfOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_justifySelfOverflowAlignment); }
788
gridTemplateColumns()789 const Vector<GridTrackSize>& gridTemplateColumns() const { return rareNonInheritedData->m_grid->m_gridTemplateColumns; }
gridTemplateRows()790 const Vector<GridTrackSize>& gridTemplateRows() const { return rareNonInheritedData->m_grid->m_gridTemplateRows; }
namedGridColumnLines()791 const NamedGridLinesMap& namedGridColumnLines() const { return rareNonInheritedData->m_grid->m_namedGridColumnLines; }
namedGridRowLines()792 const NamedGridLinesMap& namedGridRowLines() const { return rareNonInheritedData->m_grid->m_namedGridRowLines; }
orderedNamedGridColumnLines()793 const OrderedNamedGridLines& orderedNamedGridColumnLines() const { return rareNonInheritedData->m_grid->m_orderedNamedGridColumnLines; }
orderedNamedGridRowLines()794 const OrderedNamedGridLines& orderedNamedGridRowLines() const { return rareNonInheritedData->m_grid->m_orderedNamedGridRowLines; }
namedGridArea()795 const NamedGridAreaMap& namedGridArea() const { return rareNonInheritedData->m_grid->m_namedGridArea; }
namedGridAreaRowCount()796 size_t namedGridAreaRowCount() const { return rareNonInheritedData->m_grid->m_namedGridAreaRowCount; }
namedGridAreaColumnCount()797 size_t namedGridAreaColumnCount() const { return rareNonInheritedData->m_grid->m_namedGridAreaColumnCount; }
gridAutoFlow()798 GridAutoFlow gridAutoFlow() const { return rareNonInheritedData->m_grid->m_gridAutoFlow; }
gridAutoColumns()799 const GridTrackSize& gridAutoColumns() const { return rareNonInheritedData->m_grid->m_gridAutoColumns; }
gridAutoRows()800 const GridTrackSize& gridAutoRows() const { return rareNonInheritedData->m_grid->m_gridAutoRows; }
801
gridColumnStart()802 const GridPosition& gridColumnStart() const { return rareNonInheritedData->m_gridItem->m_gridColumnStart; }
gridColumnEnd()803 const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_gridItem->m_gridColumnEnd; }
gridRowStart()804 const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gridItem->m_gridRowStart; }
gridRowEnd()805 const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_gridItem->m_gridRowEnd; }
806
boxShadow()807 ShadowList* boxShadow() const { return rareNonInheritedData->m_boxShadow.get(); }
getBoxShadowExtent(LayoutUnit & top,LayoutUnit & right,LayoutUnit & bottom,LayoutUnit & left)808 void getBoxShadowExtent(LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const { getShadowExtent(boxShadow(), top, right, bottom, left); }
getBoxShadowInsetExtent()809 LayoutBoxExtent getBoxShadowInsetExtent() const { return getShadowInsetExtent(boxShadow()); }
getBoxShadowHorizontalExtent(LayoutUnit & left,LayoutUnit & right)810 void getBoxShadowHorizontalExtent(LayoutUnit& left, LayoutUnit& right) const { getShadowHorizontalExtent(boxShadow(), left, right); }
getBoxShadowVerticalExtent(LayoutUnit & top,LayoutUnit & bottom)811 void getBoxShadowVerticalExtent(LayoutUnit& top, LayoutUnit& bottom) const { getShadowVerticalExtent(boxShadow(), top, bottom); }
getBoxShadowInlineDirectionExtent(LayoutUnit & logicalLeft,LayoutUnit & logicalRight)812 void getBoxShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) { getShadowInlineDirectionExtent(boxShadow(), logicalLeft, logicalRight); }
getBoxShadowBlockDirectionExtent(LayoutUnit & logicalTop,LayoutUnit & logicalBottom)813 void getBoxShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& logicalBottom) { getShadowBlockDirectionExtent(boxShadow(), logicalTop, logicalBottom); }
814
boxDecorationBreak()815 EBoxDecorationBreak boxDecorationBreak() const { return m_box->boxDecorationBreak(); }
boxReflect()816 StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxReflect.get(); }
reflectionDataEquivalent(const RenderStyle * otherStyle)817 bool reflectionDataEquivalent(const RenderStyle* otherStyle) const { return rareNonInheritedData->reflectionDataEquivalent(*otherStyle->rareNonInheritedData); }
818
boxSizing()819 EBoxSizing boxSizing() const { return m_box->boxSizing(); }
marqueeIncrement()820 const Length& marqueeIncrement() const { return rareNonInheritedData->m_marquee->increment; }
marqueeSpeed()821 int marqueeSpeed() const { return rareNonInheritedData->m_marquee->speed; }
marqueeLoopCount()822 int marqueeLoopCount() const { return rareNonInheritedData->m_marquee->loops; }
marqueeBehavior()823 EMarqueeBehavior marqueeBehavior() const { return static_cast<EMarqueeBehavior>(rareNonInheritedData->m_marquee->behavior); }
marqueeDirection()824 EMarqueeDirection marqueeDirection() const { return static_cast<EMarqueeDirection>(rareNonInheritedData->m_marquee->direction); }
userModify()825 EUserModify userModify() const { return static_cast<EUserModify>(rareInheritedData->userModify); }
userDrag()826 EUserDrag userDrag() const { return static_cast<EUserDrag>(rareNonInheritedData->userDrag); }
userSelect()827 EUserSelect userSelect() const { return static_cast<EUserSelect>(rareInheritedData->userSelect); }
textOverflow()828 TextOverflow textOverflow() const { return static_cast<TextOverflow>(rareNonInheritedData->textOverflow); }
marginBeforeCollapse()829 EMarginCollapse marginBeforeCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginBeforeCollapse); }
marginAfterCollapse()830 EMarginCollapse marginAfterCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginAfterCollapse); }
wordBreak()831 EWordBreak wordBreak() const { return static_cast<EWordBreak>(rareInheritedData->wordBreak); }
overflowWrap()832 EOverflowWrap overflowWrap() const { return static_cast<EOverflowWrap>(rareInheritedData->overflowWrap); }
lineBreak()833 LineBreak lineBreak() const { return static_cast<LineBreak>(rareInheritedData->lineBreak); }
highlight()834 const AtomicString& highlight() const { return rareInheritedData->highlight; }
hyphenationString()835 const AtomicString& hyphenationString() const { return rareInheritedData->hyphenationString; }
locale()836 const AtomicString& locale() const { return rareInheritedData->locale; }
borderFit()837 EBorderFit borderFit() const { return static_cast<EBorderFit>(rareNonInheritedData->m_borderFit); }
resize()838 EResize resize() const { return static_cast<EResize>(rareInheritedData->resize); }
hasInlinePaginationAxis()839 bool hasInlinePaginationAxis() const
840 {
841 // If the pagination axis is parallel with the writing mode inline axis, columns may be laid
842 // out along the inline axis, just like for regular multicol. Otherwise, we need to lay out
843 // along the block axis.
844 if (isOverflowPaged())
845 return (overflowY() == OPAGEDX) == isHorizontalWritingMode();
846 return false;
847 }
columnWidth()848 float columnWidth() const { return rareNonInheritedData->m_multiCol->m_width; }
hasAutoColumnWidth()849 bool hasAutoColumnWidth() const { return rareNonInheritedData->m_multiCol->m_autoWidth; }
columnCount()850 unsigned short columnCount() const { return rareNonInheritedData->m_multiCol->m_count; }
hasAutoColumnCount()851 bool hasAutoColumnCount() const { return rareNonInheritedData->m_multiCol->m_autoCount; }
specifiesColumns()852 bool specifiesColumns() const { return !hasAutoColumnCount() || !hasAutoColumnWidth(); }
columnFill()853 ColumnFill columnFill() const { return static_cast<ColumnFill>(rareNonInheritedData->m_multiCol->m_fill); }
columnGap()854 float columnGap() const { return rareNonInheritedData->m_multiCol->m_gap; }
hasNormalColumnGap()855 bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m_normalGap; }
columnRuleStyle()856 EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiCol->m_rule.style(); }
columnRuleWidth()857 unsigned short columnRuleWidth() const { return rareNonInheritedData->m_multiCol->ruleWidth(); }
columnRuleIsTransparent()858 bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiCol->m_rule.isTransparent(); }
columnSpan()859 ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheritedData->m_multiCol->m_columnSpan); }
columnBreakBefore()860 EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakBefore); }
columnBreakInside()861 EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakInside); }
columnBreakAfter()862 EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakAfter); }
transform()863 const TransformOperations& transform() const { return rareNonInheritedData->m_transform->m_operations; }
transformOriginX()864 const Length& transformOriginX() const { return rareNonInheritedData->m_transform->m_x; }
transformOriginY()865 const Length& transformOriginY() const { return rareNonInheritedData->m_transform->m_y; }
transformOriginZ()866