OSDN Git Service

Merge WebKit at r59636: Initial merge by git
[android-x86/external-webkit.git] / WebCore / rendering / style / RenderStyle.h
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 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 "TransformationMatrix.h"
29 #include "AnimationList.h"
30 #include "BorderData.h"
31 #include "BorderValue.h"
32 #include "CSSHelper.h"
33 #include "CSSImageGeneratorValue.h"
34 #include "CSSPrimitiveValue.h"
35 #include "CSSReflectionDirection.h"
36 #include "CSSValueList.h"
37 #include "CachedImage.h"
38 #include "CollapsedBorderValue.h"
39 #include "Color.h"
40 #include "ColorSpace.h"
41 #include "ContentData.h"
42 #include "CounterDirectives.h"
43 #include "CursorList.h"
44 #include "DataRef.h"
45 #include "FillLayer.h"
46 #include "FloatPoint.h"
47 #include "Font.h"
48 #include "GraphicsTypes.h"
49 #include "IntRect.h"
50 #include "Length.h"
51 #include "LengthBox.h"
52 #include "LengthSize.h"
53 #include "LineClampValue.h"
54 #include "NinePieceImage.h"
55 #include "OutlineValue.h"
56 #include "Pair.h"
57 #include "RenderStyleConstants.h"
58 #include "ShadowData.h"
59 #include "StyleBackgroundData.h"
60 #include "StyleBoxData.h"
61 #include "StyleFlexibleBoxData.h"
62 #include "StyleInheritedData.h"
63 #include "StyleMarqueeData.h"
64 #include "StyleMultiColData.h"
65 #include "StyleRareInheritedData.h"
66 #include "StyleRareNonInheritedData.h"
67 #include "StyleReflection.h"
68 #include "StyleSurroundData.h"
69 #include "StyleTransformData.h"
70 #include "StyleVisualData.h"
71 #include "TextDirection.h"
72 #include "ThemeTypes.h"
73 #include "TimingFunction.h"
74 #include "TransformOperations.h"
75 #include <wtf/OwnPtr.h>
76 #include <wtf/RefCounted.h>
77 #include <wtf/StdLibExtras.h>
78 #include <wtf/Vector.h>
79
80 #if ENABLE(DASHBOARD_SUPPORT)
81 #include "StyleDashboardRegion.h"
82 #endif
83
84 #if ENABLE(SVG)
85 #include "SVGRenderStyle.h"
86 #endif
87
88 #if ENABLE(XBL)
89 #include "BindingURI.h"
90 #endif
91
92 #if COMPILER(WINSCW)
93 #define compareEqual(t, u)      ((t) == (u))
94 #else
95 template<typename T, typename U> inline bool compareEqual(const T& t, const U& u) { return t == static_cast<T>(u); }
96 #endif
97
98 #define SET_VAR(group, variable, value) \
99     if (!compareEqual(group->variable, value)) \
100         group.access()->variable = value;
101
102 namespace WebCore {
103
104 using std::max;
105
106 class CSSStyleSelector;
107 class CSSValueList;
108 class CachedImage;
109 class Pair;
110 class StringImpl;
111 class StyleImage;
112
113 typedef Vector<RefPtr<RenderStyle>, 4> PseudoStyleCache;
114
115 class RenderStyle: public RefCounted<RenderStyle> {
116     friend class CSSStyleSelector;
117 protected:
118
119     // The following bitfield is 32-bits long, which optimizes padding with the
120     // int refCount in the base class. Beware when adding more bits.
121     bool m_affectedByAttributeSelectors : 1;
122     bool m_unique : 1;
123
124     // Bits for dynamic child matching.
125     bool m_affectedByEmpty : 1;
126     bool m_emptyState : 1;
127
128     // We optimize for :first-child and :last-child.  The other positional child selectors like nth-child or
129     // *-child-of-type, we will just give up and re-evaluate whenever children change at all.
130     bool m_childrenAffectedByFirstChildRules : 1;
131     bool m_childrenAffectedByLastChildRules : 1;
132     bool m_childrenAffectedByDirectAdjacentRules : 1;
133     bool m_childrenAffectedByForwardPositionalRules : 1;
134     bool m_childrenAffectedByBackwardPositionalRules : 1;
135     bool m_firstChildState : 1;
136     bool m_lastChildState : 1;
137     unsigned m_childIndex : 21; // Plenty of bits to cache an index.
138
139     // non-inherited attributes
140     DataRef<StyleBoxData> m_box;
141     DataRef<StyleVisualData> visual;
142     DataRef<StyleBackgroundData> m_background;
143     DataRef<StyleSurroundData> surround;
144     DataRef<StyleRareNonInheritedData> rareNonInheritedData;
145
146     // inherited attributes
147     DataRef<StyleRareInheritedData> rareInheritedData;
148     DataRef<StyleInheritedData> inherited;
149
150     // list of associated pseudo styles
151     OwnPtr<PseudoStyleCache> m_cachedPseudoStyles;
152
153 #if ENABLE(SVG)
154     DataRef<SVGRenderStyle> m_svgStyle;
155 #endif
156
157 // !START SYNC!: Keep this in sync with the copy constructor in RenderStyle.cpp
158
159     // inherit
160     struct InheritedFlags {
161         bool operator==(const InheritedFlags& other) const
162         {
163             return (_empty_cells == other._empty_cells) &&
164                    (_caption_side == other._caption_side) &&
165                    (_list_style_type == other._list_style_type) &&
166                    (_list_style_position == other._list_style_position) &&
167                    (_visibility == other._visibility) &&
168                    (_text_align == other._text_align) &&
169                    (_text_transform == other._text_transform) &&
170                    (_text_decorations == other._text_decorations) &&
171                    (_text_transform == other._text_transform) &&
172                    (_cursor_style == other._cursor_style) &&
173                    (_direction == other._direction) &&
174                    (_border_collapse == other._border_collapse) &&
175                    (_white_space == other._white_space) &&
176                    (_box_direction == other._box_direction) &&
177                    (_visuallyOrdered == other._visuallyOrdered) &&
178                    (_htmlHacks == other._htmlHacks) &&
179                    (_force_backgrounds_to_white == other._force_backgrounds_to_white) &&
180                    (_pointerEvents == other._pointerEvents) &&
181                    (_insideLink == other._insideLink);
182         }
183
184         bool operator!=(const InheritedFlags& other) const { return !(*this == other); }
185
186         unsigned _empty_cells : 1; // EEmptyCell
187         unsigned _caption_side : 2; // ECaptionSide
188         unsigned _list_style_type : 7; // EListStyleType
189         unsigned _list_style_position : 1; // EListStylePosition
190         unsigned _visibility : 2; // EVisibility
191         unsigned _text_align : 3; // ETextAlign
192         unsigned _text_transform : 2; // ETextTransform
193         unsigned _text_decorations : 4;
194         unsigned _cursor_style : 6; // ECursor
195         unsigned _direction : 1; // TextDirection
196         bool _border_collapse : 1 ;
197         unsigned _white_space : 3; // EWhiteSpace
198         unsigned _box_direction : 1; // EBoxDirection (CSS3 box_direction property, flexible box layout module)
199         // 34 bits
200         
201         // non CSS2 inherited
202         bool _visuallyOrdered : 1;
203         bool _htmlHacks : 1;
204         bool _force_backgrounds_to_white : 1;
205         unsigned _pointerEvents : 4; // EPointerEvents
206         unsigned _insideLink : 2; // EInsideLink
207         // 43 bits
208     } inherited_flags;
209
210 // don't inherit
211     struct NonInheritedFlags {
212         bool operator==(const NonInheritedFlags& other) const
213         {
214             return _effectiveDisplay == other._effectiveDisplay
215                 && _originalDisplay == other._originalDisplay
216                 && _overflowX == other._overflowX
217                 && _overflowY == other._overflowY
218                 && _vertical_align == other._vertical_align
219                 && _clear == other._clear
220                 && _position == other._position
221                 && _floating == other._floating
222                 && _table_layout == other._table_layout
223                 && _page_break_before == other._page_break_before
224                 && _page_break_after == other._page_break_after
225                 && _page_break_inside == other._page_break_inside
226                 && _styleType == other._styleType
227                 && _affectedByHover == other._affectedByHover
228                 && _affectedByActive == other._affectedByActive
229                 && _affectedByDrag == other._affectedByDrag
230                 && _pseudoBits == other._pseudoBits
231                 && _unicodeBidi == other._unicodeBidi
232                 && _isLink == other._isLink;
233         }
234
235         bool operator!=(const NonInheritedFlags& other) const { return !(*this == other); }
236
237         unsigned _effectiveDisplay : 5; // EDisplay
238         unsigned _originalDisplay : 5; // EDisplay
239         unsigned _overflowX : 3; // EOverflow
240         unsigned _overflowY : 3; // EOverflow
241         unsigned _vertical_align : 4; // EVerticalAlign
242         unsigned _clear : 2; // EClear
243         unsigned _position : 2; // EPosition
244         unsigned _floating : 2; // EFloat
245         unsigned _table_layout : 1; // ETableLayout
246
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         bool _affectedByHover : 1;
253         bool _affectedByActive : 1;
254         bool _affectedByDrag : 1;
255         unsigned _pseudoBits : 7;
256         unsigned _unicodeBidi : 2; // EUnicodeBidi
257         bool _isLink : 1;
258         // 50 bits
259     } noninherited_flags;
260
261 // !END SYNC!
262
263 protected:
264     void setBitDefaults()
265     {
266         inherited_flags._empty_cells = initialEmptyCells();
267         inherited_flags._caption_side = initialCaptionSide();
268         inherited_flags._list_style_type = initialListStyleType();
269         inherited_flags._list_style_position = initialListStylePosition();
270         inherited_flags._visibility = initialVisibility();
271         inherited_flags._text_align = initialTextAlign();
272         inherited_flags._text_transform = initialTextTransform();
273         inherited_flags._text_decorations = initialTextDecoration();
274         inherited_flags._cursor_style = initialCursor();
275         inherited_flags._direction = initialDirection();
276         inherited_flags._border_collapse = initialBorderCollapse();
277         inherited_flags._white_space = initialWhiteSpace();
278         inherited_flags._visuallyOrdered = initialVisuallyOrdered();
279         inherited_flags._htmlHacks=false;
280         inherited_flags._box_direction = initialBoxDirection();
281         inherited_flags._force_backgrounds_to_white = false;
282         inherited_flags._pointerEvents = initialPointerEvents();
283         inherited_flags._insideLink = NotInsideLink;
284
285         noninherited_flags._effectiveDisplay = noninherited_flags._originalDisplay = initialDisplay();
286         noninherited_flags._overflowX = initialOverflowX();
287         noninherited_flags._overflowY = initialOverflowY();
288         noninherited_flags._vertical_align = initialVerticalAlign();
289         noninherited_flags._clear = initialClear();
290         noninherited_flags._position = initialPosition();
291         noninherited_flags._floating = initialFloating();
292         noninherited_flags._table_layout = initialTableLayout();
293         noninherited_flags._page_break_before = initialPageBreak();
294         noninherited_flags._page_break_after = initialPageBreak();
295         noninherited_flags._page_break_inside = initialPageBreak();
296         noninherited_flags._styleType = NOPSEUDO;
297         noninherited_flags._affectedByHover = false;
298         noninherited_flags._affectedByActive = false;
299         noninherited_flags._affectedByDrag = false;
300         noninherited_flags._pseudoBits = 0;
301         noninherited_flags._unicodeBidi = initialUnicodeBidi();
302         noninherited_flags._isLink = false;
303     }
304
305 private:
306     RenderStyle();
307     // used to create the default style.
308     RenderStyle(bool);
309     RenderStyle(const RenderStyle&);
310
311 public:
312     static PassRefPtr<RenderStyle> create();
313     static PassRefPtr<RenderStyle> createDefaultStyle();
314     static PassRefPtr<RenderStyle> clone(const RenderStyle*);
315
316     ~RenderStyle();
317
318     void inheritFrom(const RenderStyle* inheritParent);
319
320     PseudoId styleType() const { return static_cast<PseudoId>(noninherited_flags._styleType); }
321     void setStyleType(PseudoId styleType) { noninherited_flags._styleType = styleType; }
322
323     RenderStyle* getCachedPseudoStyle(PseudoId) const;
324     RenderStyle* addCachedPseudoStyle(PassRefPtr<RenderStyle>);
325
326     const PseudoStyleCache* cachedPseudoStyles() const { return m_cachedPseudoStyles.get(); }
327
328     bool affectedByHoverRules() const { return noninherited_flags._affectedByHover; }
329     bool affectedByActiveRules() const { return noninherited_flags._affectedByActive; }
330     bool affectedByDragRules() const { return noninherited_flags._affectedByDrag; }
331
332     void setAffectedByHoverRules(bool b) { noninherited_flags._affectedByHover = b; }
333     void setAffectedByActiveRules(bool b) { noninherited_flags._affectedByActive = b; }
334     void setAffectedByDragRules(bool b) { noninherited_flags._affectedByDrag = b; }
335
336     bool operator==(const RenderStyle& other) const;
337     bool operator!=(const RenderStyle& other) const { return !(*this == other); }
338     bool isFloating() const { return !(noninherited_flags._floating == FNONE); }
339     bool hasMargin() const { return surround->margin.nonZero(); }
340     bool hasBorder() const { return surround->border.hasBorder(); }
341     bool hasPadding() const { return surround->padding.nonZero(); }
342     bool hasOffset() const { return surround->offset.nonZero(); }
343
344     bool hasBackground() const
345     {
346         if (backgroundColor().isValid() && backgroundColor().alpha() > 0)
347             return true;
348         return m_background->background().hasImage();
349     }
350     bool hasBackgroundImage() const { return m_background->background().hasImage(); }
351     bool hasFixedBackgroundImage() const { return m_background->background().hasFixedImage(); }
352     bool hasAppearance() const { return appearance() != NoControlPart; }
353
354     bool visuallyOrdered() const { return inherited_flags._visuallyOrdered; }
355     void setVisuallyOrdered(bool b) { inherited_flags._visuallyOrdered = b; }
356
357     bool isStyleAvailable() const;
358
359     bool hasAnyPublicPseudoStyles() const;
360     bool hasPseudoStyle(PseudoId pseudo) const;
361     void setHasPseudoStyle(PseudoId pseudo);
362
363     // attribute getter methods
364
365     EDisplay display() const { return static_cast<EDisplay>(noninherited_flags._effectiveDisplay); }
366     EDisplay originalDisplay() const { return static_cast<EDisplay>(noninherited_flags._originalDisplay); }
367
368     Length left() const { return surround->offset.left(); }
369     Length right() const { return surround->offset.right(); }
370     Length top() const { return surround->offset.top(); }
371     Length bottom() const { return surround->offset.bottom(); }
372
373     // Whether or not a positioned element requires normal flow x/y to be computed
374     // to determine its position.
375     bool hasStaticX() const { return (left().isAuto() && right().isAuto()) || left().isStatic() || right().isStatic(); }
376     bool hasStaticY() const { return (top().isAuto() && bottom().isAuto()) || top().isStatic(); }
377
378     EPosition position() const { return static_cast<EPosition>(noninherited_flags._position); }
379     EFloat floating() const { return static_cast<EFloat>(noninherited_flags._floating); }
380
381     Length width() const { return m_box->width(); }
382     Length height() const { return m_box->height(); }
383     Length minWidth() const { return m_box->minWidth(); }
384     Length maxWidth() const { return m_box->maxWidth(); }
385     Length minHeight() const { return m_box->minHeight(); }
386     Length maxHeight() const { return m_box->maxHeight(); }
387
388     const BorderData& border() const { return surround->border; }
389     const BorderValue& borderLeft() const { return surround->border.left(); }
390     const BorderValue& borderRight() const { return surround->border.right(); }
391     const BorderValue& borderTop() const { return surround->border.top(); }
392     const BorderValue& borderBottom() const { return surround->border.bottom(); }
393
394     const NinePieceImage& borderImage() const { return surround->border.image(); }
395
396     const IntSize& borderTopLeftRadius() const { return surround->border.topLeft(); }
397     const IntSize& borderTopRightRadius() const { return surround->border.topRight(); }
398     const IntSize& borderBottomLeftRadius() const { return surround->border.bottomLeft(); }
399     const IntSize& borderBottomRightRadius() const { return surround->border.bottomRight(); }
400     bool hasBorderRadius() const { return surround->border.hasBorderRadius(); }
401
402     unsigned short borderLeftWidth() const { return surround->border.borderLeftWidth(); }
403     EBorderStyle borderLeftStyle() const { return surround->border.left().style(); }
404     const Color& borderLeftColor() const { return surround->border.left().color(); }
405     bool borderLeftIsTransparent() const { return surround->border.left().isTransparent(); }
406     unsigned short borderRightWidth() const { return surround->border.borderRightWidth(); }
407     EBorderStyle borderRightStyle() const { return surround->border.right().style(); }
408     const Color& borderRightColor() const { return surround->border.right().color(); }
409     bool borderRightIsTransparent() const { return surround->border.right().isTransparent(); }
410     unsigned short borderTopWidth() const { return surround->border.borderTopWidth(); }
411     EBorderStyle borderTopStyle() const { return surround->border.top().style(); }
412     const Color& borderTopColor() const { return surround->border.top().color(); }
413     bool borderTopIsTransparent() const { return surround->border.top().isTransparent(); }
414     unsigned short borderBottomWidth() const { return surround->border.borderBottomWidth(); }
415     EBorderStyle borderBottomStyle() const { return surround->border.bottom().style(); }
416     const Color& borderBottomColor() const { return surround->border.bottom().color(); }
417     bool borderBottomIsTransparent() const { return surround->border.bottom().isTransparent(); }
418
419     unsigned short outlineSize() const { return max(0, outlineWidth() + outlineOffset()); }
420     unsigned short outlineWidth() const
421     {
422         if (m_background->outline().style() == BNONE)
423             return 0;
424         return m_background->outline().width();
425     }
426     bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > BHIDDEN; }
427     EBorderStyle outlineStyle() const { return m_background->outline().style(); }
428     bool outlineStyleIsAuto() const { return m_background->outline().isAuto(); }
429     const Color& outlineColor() const { return m_background->outline().color(); }
430
431     EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_flags._overflowX); }
432     EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_flags._overflowY); }
433
434     EVisibility visibility() const { return static_cast<EVisibility>(inherited_flags._visibility); }
435     EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(noninherited_flags._vertical_align); }
436     Length verticalAlignLength() const { return m_box->verticalAlign(); }
437
438     Length clipLeft() const { return visual->clip.left(); }
439     Length clipRight() const { return visual->clip.right(); }
440     Length clipTop() const { return visual->clip.top(); }
441     Length clipBottom() const { return visual->clip.bottom(); }
442     LengthBox clip() const { return visual->clip; }
443     bool hasClip() const { return visual->hasClip; }
444
445     EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(noninherited_flags._unicodeBidi); }
446
447     EClear clear() const { return static_cast<EClear>(noninherited_flags._clear); }
448     ETableLayout tableLayout() const { return static_cast<ETableLayout>(noninherited_flags._table_layout); }
449
450     const Font& font() const { return inherited->font; }
451     const FontDescription& fontDescription() const { return inherited->font.fontDescription(); }
452     int fontSize() const { return inherited->font.pixelSize(); }
453
454     const Color& color() const { return inherited->color; }
455     Length textIndent() const { return rareInheritedData->indent; }
456     ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flags._text_align); }
457     ETextTransform textTransform() const { return static_cast<ETextTransform>(inherited_flags._text_transform); }
458     int textDecorationsInEffect() const { return inherited_flags._text_decorations; }
459     int textDecoration() const { return visual->textDecoration; }
460     int wordSpacing() const { return inherited->font.wordSpacing(); }
461     int letterSpacing() const { return inherited->font.letterSpacing(); }
462
463     float zoom() const { return visual->m_zoom; }
464     float effectiveZoom() const { return rareInheritedData->m_effectiveZoom; }
465
466     TextDirection direction() const { return static_cast<TextDirection>(inherited_flags._direction); }
467     Length lineHeight() const { return inherited->line_height; }
468     int computedLineHeight() const
469     {
470         Length lh = lineHeight();
471
472         // Negative value means the line height is not set.  Use the font's built-in spacing.
473         if (lh.isNegative())
474             return font().lineSpacing();
475
476         if (lh.isPercent())
477             return lh.calcMinValue(fontSize());
478
479         return lh.value();
480     }
481
482     EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(inherited_flags._white_space); }
483     static bool autoWrap(EWhiteSpace ws)
484     {
485         // Nowrap and pre don't automatically wrap.
486         return ws != NOWRAP && ws != PRE;
487     }
488
489     bool autoWrap() const
490     {
491         return autoWrap(whiteSpace());
492     }
493
494     static bool preserveNewline(EWhiteSpace ws)
495     {
496         // Normal and nowrap do not preserve newlines.
497         return ws != NORMAL && ws != NOWRAP;
498     }
499
500     bool preserveNewline() const
501     {
502         return preserveNewline(whiteSpace());
503     }
504
505     static bool collapseWhiteSpace(EWhiteSpace ws)
506     {
507         // Pre and prewrap do not collapse whitespace.
508         return ws != PRE && ws != PRE_WRAP;
509     }
510
511     bool collapseWhiteSpace() const
512     {
513         return collapseWhiteSpace(whiteSpace());
514     }
515
516     bool isCollapsibleWhiteSpace(UChar c) const
517     {
518         switch (c) {
519             case ' ':
520             case '\t':
521                 return collapseWhiteSpace();
522             case '\n':
523                 return !preserveNewline();
524         }
525         return false;
526     }
527
528     bool breakOnlyAfterWhiteSpace() const
529     {
530         return whiteSpace() == PRE_WRAP || khtmlLineBreak() == AFTER_WHITE_SPACE;
531     }
532
533     bool breakWords() const
534     {
535         return wordBreak() == BreakWordBreak || wordWrap() == BreakWordWrap;
536     }
537
538     const Color& backgroundColor() const { return m_background->color(); }
539     StyleImage* backgroundImage() const { return m_background->background().image(); }
540     EFillRepeat backgroundRepeatX() const { return static_cast<EFillRepeat>(m_background->background().repeatX()); }
541     EFillRepeat backgroundRepeatY() const { return static_cast<EFillRepeat>(m_background->background().repeatY()); }
542     CompositeOperator backgroundComposite() const { return static_cast<CompositeOperator>(m_background->background().composite()); }
543     EFillAttachment backgroundAttachment() const { return static_cast<EFillAttachment>(m_background->background().attachment()); }
544     EFillBox backgroundClip() const { return static_cast<EFillBox>(m_background->background().clip()); }
545     EFillBox backgroundOrigin() const { return static_cast<EFillBox>(m_background->background().origin()); }
546     Length backgroundXPosition() const { return m_background->background().xPosition(); }
547     Length backgroundYPosition() const { return m_background->background().yPosition(); }
548     EFillSizeType backgroundSizeType() const { return m_background->background().sizeType(); }
549     LengthSize backgroundSizeLength() const { return m_background->background().sizeLength(); }
550     FillLayer* accessBackgroundLayers() { return &(m_background.access()->m_background); }
551     const FillLayer* backgroundLayers() const { return &(m_background->background()); }
552
553     StyleImage* maskImage() const { return rareNonInheritedData->m_mask.image(); }
554     EFillRepeat maskRepeatX() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.repeatX()); }
555     EFillRepeat maskRepeatY() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.repeatY()); }
556     CompositeOperator maskComposite() const { return static_cast<CompositeOperator>(rareNonInheritedData->m_mask.composite()); }
557     EFillAttachment maskAttachment() const { return static_cast<EFillAttachment>(rareNonInheritedData->m_mask.attachment()); }
558     EFillBox maskClip() const { return static_cast<EFillBox>(rareNonInheritedData->m_mask.clip()); }
559     EFillBox maskOrigin() const { return static_cast<EFillBox>(rareNonInheritedData->m_mask.origin()); }
560     Length maskXPosition() const { return rareNonInheritedData->m_mask.xPosition(); }
561     Length maskYPosition() const { return rareNonInheritedData->m_mask.yPosition(); }
562     EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.sizeType(); }
563     LengthSize maskSizeLength() const { return rareNonInheritedData->m_mask.sizeLength(); }
564     FillLayer* accessMaskLayers() { return &(rareNonInheritedData.access()->m_mask); }
565     const FillLayer* maskLayers() const { return &(rareNonInheritedData->m_mask); }
566     const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_maskBoxImage; }
567
568     // returns true for collapsing borders, false for separate borders
569     bool borderCollapse() const { return inherited_flags._border_collapse; }
570     short horizontalBorderSpacing() const { return inherited->horizontal_border_spacing; }
571     short verticalBorderSpacing() const { return inherited->vertical_border_spacing; }
572     EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_flags._empty_cells); }
573     ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherited_flags._caption_side); }
574
575     short counterIncrement() const { return rareNonInheritedData->m_counterIncrement; }
576     short counterReset() const { return rareNonInheritedData->m_counterReset; }
577
578     EListStyleType listStyleType() const { return static_cast<EListStyleType>(inherited_flags._list_style_type); }
579     StyleImage* listStyleImage() const { return inherited->list_style_image.get(); }
580     EListStylePosition listStylePosition() const { return static_cast<EListStylePosition>(inherited_flags._list_style_position); }
581
582     Length marginTop() const { return surround->margin.top(); }
583     Length marginBottom() const { return surround->margin.bottom(); }
584     Length marginLeft() const { return surround->margin.left(); }
585     Length marginRight() const { return surround->margin.right(); }
586
587     LengthBox paddingBox() const { return surround->padding; }
588     Length paddingTop() const { return surround->padding.top(); }
589     Length paddingBottom() const { return surround->padding.bottom(); }
590     Length paddingLeft() const { return surround->padding.left(); }
591     Length paddingRight() const { return surround->padding.right(); }
592
593     ECursor cursor() const { return static_cast<ECursor>(inherited_flags._cursor_style); }
594
595     CursorList* cursors() const { return rareInheritedData->cursorData.get(); }
596
597     EInsideLink insideLink() const { return static_cast<EInsideLink>(inherited_flags._insideLink); }
598     bool isLink() const { return noninherited_flags._isLink; }
599
600     short widows() const { return rareInheritedData->widows; }
601     short orphans() const { return rareInheritedData->orphans; }
602     EPageBreak pageBreakInside() const { return static_cast<EPageBreak>(noninherited_flags._page_break_inside); }
603     EPageBreak pageBreakBefore() const { return static_cast<EPageBreak>(noninherited_flags._page_break_before); }
604     EPageBreak pageBreakAfter() const { return static_cast<EPageBreak>(noninherited_flags._page_break_after); }
605
606     // CSS3 Getter Methods
607 #if ENABLE(XBL)
608     BindingURI* bindingURIs() const { return rareNonInheritedData->bindingURI; }
609 #endif
610
611     int outlineOffset() const
612     {
613         if (m_background->outline().style() == BNONE)
614             return 0;
615         return m_background->outline().offset();
616     }
617
618     const ShadowData* textShadow() const { return rareInheritedData->textShadow; }
619     const Color& textStrokeColor() const { return rareInheritedData->textStrokeColor; }
620     float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; }
621     const Color& textFillColor() const { return rareInheritedData->textFillColor; }
622     ColorSpace colorSpace() const { return static_cast<ColorSpace>(rareInheritedData->colorSpace); }
623     float opacity() const { return rareNonInheritedData->opacity; }
624     ControlPart appearance() const { return static_cast<ControlPart>(rareNonInheritedData->m_appearance); }
625     EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(rareNonInheritedData->flexibleBox->align); }
626     EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(inherited_flags._box_direction); }
627     float boxFlex() { return rareNonInheritedData->flexibleBox->flex; }
628     unsigned int boxFlexGroup() const { return rareNonInheritedData->flexibleBox->flex_group; }
629     EBoxLines boxLines() { return static_cast<EBoxLines>(rareNonInheritedData->flexibleBox->lines); }
630     unsigned int boxOrdinalGroup() const { return rareNonInheritedData->flexibleBox->ordinal_group; }
631     EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(rareNonInheritedData->flexibleBox->orient); }
632     EBoxAlignment boxPack() const { return static_cast<EBoxAlignment>(rareNonInheritedData->flexibleBox->pack); }
633
634     const ShadowData* boxShadow() const { return rareNonInheritedData->m_boxShadow.get(); }
635     void getBoxShadowExtent(int &top, int &right, int &bottom, int &left) const;
636     void getBoxShadowHorizontalExtent(int &left, int &right) const;
637     void getBoxShadowVerticalExtent(int &top, int &bottom) const;
638
639     StyleReflection* boxReflect() const { return rareNonInheritedData->m_boxReflect.get(); }
640     EBoxSizing boxSizing() const { return m_box->boxSizing(); }
641     Length marqueeIncrement() const { return rareNonInheritedData->marquee->increment; }
642     int marqueeSpeed() const { return rareNonInheritedData->marquee->speed; }
643     int marqueeLoopCount() const { return rareNonInheritedData->marquee->loops; }
644     EMarqueeBehavior marqueeBehavior() const { return static_cast<EMarqueeBehavior>(rareNonInheritedData->marquee->behavior); }
645     EMarqueeDirection marqueeDirection() const { return static_cast<EMarqueeDirection>(rareNonInheritedData->marquee->direction); }
646     EUserModify userModify() const { return static_cast<EUserModify>(rareInheritedData->userModify); }
647     EUserDrag userDrag() const { return static_cast<EUserDrag>(rareNonInheritedData->userDrag); }
648     EUserSelect userSelect() const { return static_cast<EUserSelect>(rareInheritedData->userSelect); }
649     bool textOverflow() const { return rareNonInheritedData->textOverflow; }
650     EMarginCollapse marginTopCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginTopCollapse); }
651     EMarginCollapse marginBottomCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginBottomCollapse); }
652     EWordBreak wordBreak() const { return static_cast<EWordBreak>(rareInheritedData->wordBreak); }
653     EWordWrap wordWrap() const { return static_cast<EWordWrap>(rareInheritedData->wordWrap); }
654     ENBSPMode nbspMode() const { return static_cast<ENBSPMode>(rareInheritedData->nbspMode); }
655     EKHTMLLineBreak khtmlLineBreak() const { return static_cast<EKHTMLLineBreak>(rareInheritedData->khtmlLineBreak); }
656     EMatchNearestMailBlockquoteColor matchNearestMailBlockquoteColor() const { return static_cast<EMatchNearestMailBlockquoteColor>(rareNonInheritedData->matchNearestMailBlockquoteColor); }
657     const AtomicString& highlight() const { return rareInheritedData->highlight; }
658     EBorderFit borderFit() const { return static_cast<EBorderFit>(rareNonInheritedData->m_borderFit); }
659     EResize resize() const { return static_cast<EResize>(rareInheritedData->resize); }
660     float columnWidth() const { return rareNonInheritedData->m_multiCol->m_width; }
661     bool hasAutoColumnWidth() const { return rareNonInheritedData->m_multiCol->m_autoWidth; }
662     unsigned short columnCount() const { return rareNonInheritedData->m_multiCol->m_count; }
663     bool hasAutoColumnCount() const { return rareNonInheritedData->m_multiCol->m_autoCount; }
664     bool specifiesColumns() const { return !hasAutoColumnCount() || !hasAutoColumnWidth(); }
665     float columnGap() const { return rareNonInheritedData->m_multiCol->m_gap; }
666     bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m_normalGap; }
667     const Color& columnRuleColor() const { return rareNonInheritedData->m_multiCol->m_rule.color(); }
668     EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiCol->m_rule.style(); }
669     unsigned short columnRuleWidth() const { return rareNonInheritedData->m_multiCol->ruleWidth(); }
670     bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiCol->m_rule.isTransparent(); }
671     EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakBefore); }
672     EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakInside); }
673     EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakAfter); }
674     const TransformOperations& transform() const { return rareNonInheritedData->m_transform->m_operations; }
675     Length transformOriginX() const { return rareNonInheritedData->m_transform->m_x; }
676     Length transformOriginY() const { return rareNonInheritedData->m_transform->m_y; }
677     float transformOriginZ() const { return rareNonInheritedData->m_transform->m_z; }
678     bool hasTransform() const { return !rareNonInheritedData->m_transform->m_operations.operations().isEmpty(); }
679     
680     // Return true if any transform related property (currently transform, transformStyle3D or perspective) 
681     // indicates that we are transforming
682     bool hasTransformRelatedProperty() const { return hasTransform() || preserves3D() || hasPerspective(); }
683
684     enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin };
685     void applyTransform(TransformationMatrix&, const IntSize& borderBoxSize, ApplyTransformOrigin = IncludeTransformOrigin) const;
686
687     bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rareNonInheritedData->m_maskBoxImage.hasImage(); }
688     // End CSS3 Getters
689
690     // Apple-specific property getter methods
691     EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(inherited_flags._pointerEvents); }
692     const AnimationList* animations() const { return rareNonInheritedData->m_animations.get(); }
693     const AnimationList* transitions() const { return rareNonInheritedData->m_transitions.get(); }
694
695     AnimationList* accessAnimations();
696     AnimationList* accessTransitions();
697
698     bool hasAnimations() const { return rareNonInheritedData->m_animations && rareNonInheritedData->m_animations->size() > 0; }
699     bool hasTransitions() const { return rareNonInheritedData->m_transitions && rareNonInheritedData->m_transitions->size() > 0; }
700
701     // return the first found Animation (including 'all' transitions)
702     const Animation* transitionForProperty(int property) const;
703
704     ETransformStyle3D transformStyle3D() const { return rareNonInheritedData->m_transformStyle3D; }
705     bool preserves3D() const { return rareNonInheritedData->m_transformStyle3D == TransformStyle3DPreserve3D; }
706
707     EBackfaceVisibility backfaceVisibility() const { return rareNonInheritedData->m_backfaceVisibility; }
708     float perspective() const { return rareNonInheritedData->m_perspective; }
709     bool hasPerspective() const { return rareNonInheritedData->m_perspective > 0; }
710     Length perspectiveOriginX() const { return rareNonInheritedData->m_perspectiveOriginX; }
711     Length perspectiveOriginY() const { return rareNonInheritedData->m_perspectiveOriginY; }
712     
713 #if USE(ACCELERATED_COMPOSITING)
714     // When set, this ensures that styles compare as different. Used during accelerated animations.
715     bool isRunningAcceleratedAnimation() const { return rareNonInheritedData->m_runningAcceleratedAnimation; }
716 #endif
717
718     const LineClampValue& lineClamp() const { return rareNonInheritedData->lineClamp; }
719     bool textSizeAdjust() const { return rareInheritedData->textSizeAdjust; }
720     ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(rareInheritedData->textSecurity); }
721
722 #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
723     Color tapHighlightColor() const { return rareInheritedData->tapHighlightColor; }
724 #endif
725
726 // attribute setter methods
727
728     void setDisplay(EDisplay v) { noninherited_flags._effectiveDisplay = v; }
729     void setOriginalDisplay(EDisplay v) { noninherited_flags._originalDisplay = v; }
730     void setPosition(EPosition v) { noninherited_flags._position = v; }
731     void setFloating(EFloat v) { noninherited_flags._floating = v; }
732
733     void setLeft(Length v) { SET_VAR(surround, offset.m_left, v) }
734     void setRight(Length v) { SET_VAR(surround, offset.m_right, v) }
735     void setTop(Length v) { SET_VAR(surround, offset.m_top, v) }
736     void setBottom(Length v) { SET_VAR(surround, offset.m_bottom, v) }
737
738     void setWidth(Length v) { SET_VAR(m_box, m_width, v) }
739     void setHeight(Length v) { SET_VAR(m_box, m_height, v) }
740
741     void setMinWidth(Length v) { SET_VAR(m_box, m_minWidth, v) }
742     void setMaxWidth(Length v) { SET_VAR(m_box, m_maxWidth, v) }
743     void setMinHeight(Length v) { SET_VAR(m_box, m_minHeight, v) }
744     void setMaxHeight(Length v) { SET_VAR(m_box, m_maxHeight, v) }
745
746 #if ENABLE(DASHBOARD_SUPPORT)
747     Vector<StyleDashboardRegion> dashboardRegions() const { return rareNonInheritedData->m_dashboardRegions; }
748     void setDashboardRegions(Vector<StyleDashboardRegion> regions) { SET_VAR(rareNonInheritedData, m_dashboardRegions, regions); }
749
750     void setDashboardRegion(int type, const String& label, Length t, Length r, Length b, Length l, bool append)
751     {
752         StyleDashboardRegion region;
753         region.label = label;
754         region.offset.m_top = t;
755         region.offset.m_right = r;
756         region.offset.m_bottom = b;
757         region.offset.m_left = l;
758         region.type = type;
759         if (!append)
760             rareNonInheritedData.access()->m_dashboardRegions.clear();
761         rareNonInheritedData.access()->m_dashboardRegions.append(region);
762     }
763 #endif
764
765     void resetBorder() { resetBorderImage(); resetBorderTop(); resetBorderRight(); resetBorderBottom(); resetBorderLeft(); resetBorderRadius(); }
766     void resetBorderTop() { SET_VAR(surround, border.m_top, BorderValue()) }
767     void resetBorderRight() { SET_VAR(surround, border.m_right, BorderValue()) }
768     void resetBorderBottom() { SET_VAR(surround, border.m_bottom, BorderValue()) }
769     void resetBorderLeft() { SET_VAR(surround, border.m_left, BorderValue()) }
770     void resetBorderImage() { SET_VAR(surround, border.m_image, NinePieceImage()) }
771     void resetBorderRadius() { resetBorderTopLeftRadius(); resetBorderTopRightRadius(); resetBorderBottomLeftRadius(); resetBorderBottomRightRadius(); }
772     void resetBorderTopLeftRadius() { SET_VAR(surround, border.m_topLeft, initialBorderRadius()) }
773     void resetBorderTopRightRadius() { SET_VAR(surround, border.m_topRight, initialBorderRadius()) }
774     void resetBorderBottomLeftRadius() { SET_VAR(surround, border.m_bottomLeft, initialBorderRadius()) }
775     void resetBorderBottomRightRadius() { SET_VAR(surround, border.m_bottomRight, initialBorderRadius()) }
776
777     void resetOutline() { SET_VAR(m_background, m_outline, OutlineValue()) }
778
779     void setBackgroundColor(const Color& v) { SET_VAR(m_background, m_color, v) }
780
781     void setBackgroundXPosition(Length l) { SET_VAR(m_background, m_background.m_xPosition, l) }
782     void setBackgroundYPosition(Length l) { SET_VAR(m_background, m_background.m_yPosition, l) }
783     void setBackgroundSize(EFillSizeType b) { SET_VAR(m_background, m_background.m_sizeType, b) }
784     void setBackgroundSizeLength(LengthSize l) { SET_VAR(m_background, m_background.m_sizeLength, l) }
785     
786     void setBorderImage(const NinePieceImage& b) { SET_VAR(surround, border.m_image, b) }
787
788     void setBorderTopLeftRadius(const IntSize& s) { SET_VAR(surround, border.m_topLeft, s) }
789     void setBorderTopRightRadius(const IntSize& s) { SET_VAR(surround, border.m_topRight, s) }
790     void setBorderBottomLeftRadius(const IntSize& s) { SET_VAR(surround, border.m_bottomLeft, s) }
791     void setBorderBottomRightRadius(const IntSize& s) { SET_VAR(surround, border.m_bottomRight, s) }
792
793     void setBorderRadius(const IntSize& s)
794     {
795         setBorderTopLeftRadius(s);
796         setBorderTopRightRadius(s);
797         setBorderBottomLeftRadius(s);
798         setBorderBottomRightRadius(s);
799     }
800     
801     void getBorderRadiiForRect(const IntRect&, IntSize& topLeft, IntSize& topRight, IntSize& bottomLeft, IntSize& bottomRight) const;
802
803     void setBorderLeftWidth(unsigned short v) { SET_VAR(surround, border.m_left.m_width, v) }
804     void setBorderLeftStyle(EBorderStyle v) { SET_VAR(surround, border.m_left.m_style, v) }
805     void setBorderLeftColor(const Color& v) { SET_VAR(surround, border.m_left.m_color, v) }
806     void setBorderRightWidth(unsigned short v) { SET_VAR(surround, border.m_right.m_width, v) }
807     void setBorderRightStyle(EBorderStyle v) { SET_VAR(surround, border.m_right.m_style, v) }
808     void setBorderRightColor(const Color& v) { SET_VAR(surround, border.m_right.m_color, v) }
809     void setBorderTopWidth(unsigned short v) { SET_VAR(surround, border.m_top.m_width, v) }
810     void setBorderTopStyle(EBorderStyle v) { SET_VAR(surround, border.m_top.m_style, v) }
811     void setBorderTopColor(const Color& v) { SET_VAR(surround, border.m_top.m_color, v) }
812     void setBorderBottomWidth(unsigned short v) { SET_VAR(surround, border.m_bottom.m_width, v) }
813     void setBorderBottomStyle(EBorderStyle v) { SET_VAR(surround, border.m_bottom.m_style, v) }
814     void setBorderBottomColor(const Color& v) { SET_VAR(surround, border.m_bottom.m_color, v) }
815     void setOutlineWidth(unsigned short v) { SET_VAR(m_background, m_outline.m_width, v) }
816
817     void setOutlineStyle(EBorderStyle v, bool isAuto = false)
818     {
819         SET_VAR(m_background, m_outline.m_style, v)
820         SET_VAR(m_background, m_outline.m_isAuto, isAuto)
821     }
822
823     void setOutlineColor(const Color& v) { SET_VAR(m_background, m_outline.m_color, v) }
824
825     void setOverflowX(EOverflow v) { noninherited_flags._overflowX = v; }
826     void setOverflowY(EOverflow v) { noninherited_flags._overflowY = v; }
827     void setVisibility(EVisibility v) { inherited_flags._visibility = v; }
828     void setVerticalAlign(EVerticalAlign v) { noninherited_flags._vertical_align = v; }
829     void setVerticalAlignLength(Length l) { SET_VAR(m_box, m_verticalAlign, l) }
830
831     void setHasClip(bool b = true) { SET_VAR(visual, hasClip, b) }
832     void setClipLeft(Length v) { SET_VAR(visual, clip.m_left, v) }
833     void setClipRight(Length v) { SET_VAR(visual, clip.m_right, v) }
834     void setClipTop(Length v) { SET_VAR(visual, clip.m_top, v) }
835     void setClipBottom(Length v) { SET_VAR(visual, clip.m_bottom, v) }
836     void setClip(Length top, Length right, Length bottom, Length left);
837
838     void setUnicodeBidi(EUnicodeBidi b) { noninherited_flags._unicodeBidi = b; }
839
840     void setClear(EClear v) { noninherited_flags._clear = v; }
841     void setTableLayout(ETableLayout v) { noninherited_flags._table_layout = v; }
842
843     bool setFontDescription(const FontDescription& v)
844     {
845         if (inherited->font.fontDescription() != v) {
846             inherited.access()->font = Font(v, inherited->font.letterSpacing(), inherited->font.wordSpacing());
847             return true;
848         }
849         return false;
850     }
851
852     // Only used for blending font sizes when animating.
853     void setBlendedFontSize(int);
854
855     void setColor(const Color& v) { SET_VAR(inherited, color, v) }
856     void setTextIndent(Length v) { SET_VAR(rareInheritedData, indent, v) }
857     void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; }
858     void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; }
859     void addToTextDecorationsInEffect(int v) { inherited_flags._text_decorations |= v; }
860     void setTextDecorationsInEffect(int v) { inherited_flags._text_decorations = v; }
861     void setTextDecoration(int v) { SET_VAR(visual, textDecoration, v); }
862     void setDirection(TextDirection v) { inherited_flags._direction = v; }
863     void setLineHeight(Length v) { SET_VAR(inherited, line_height, v) }
864     void setZoom(float f) { SET_VAR(visual, m_zoom, f); setEffectiveZoom(effectiveZoom() * zoom()); }
865     void setEffectiveZoom(float f) { SET_VAR(rareInheritedData, m_effectiveZoom, f) }
866
867     void setWhiteSpace(EWhiteSpace v) { inherited_flags._white_space = v; }
868
869     void setWordSpacing(int v) { inherited.access()->font.setWordSpacing(v); }
870     void setLetterSpacing(int v) { inherited.access()->font.setLetterSpacing(v); }
871
872     void clearBackgroundLayers() { m_background.access()->m_background = FillLayer(BackgroundFillLayer); }
873     void inheritBackgroundLayers(const FillLayer& parent) { m_background.access()->m_background = parent; }
874
875     void adjustBackgroundLayers()
876     {
877         if (backgroundLayers()->next()) {
878             accessBackgroundLayers()->cullEmptyLayers();
879             accessBackgroundLayers()->fillUnsetProperties();
880         }
881     }
882
883     void clearMaskLayers() { rareNonInheritedData.access()->m_mask = FillLayer(MaskFillLayer); }
884     void inheritMaskLayers(const FillLayer& parent) { rareNonInheritedData.access()->m_mask = parent; }
885
886     void adjustMaskLayers()
887     {
888         if (maskLayers()->next()) {
889             accessMaskLayers()->cullEmptyLayers();
890             accessMaskLayers()->fillUnsetProperties();
891         }
892     }
893
894     void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(rareNonInheritedData, m_maskBoxImage, b) }
895     void setMaskXPosition(Length l) { SET_VAR(rareNonInheritedData, m_mask.m_xPosition, l) }
896     void setMaskYPosition(Length l) { SET_VAR(rareNonInheritedData, m_mask.m_yPosition, l) }
897     void setMaskSize(LengthSize l) { SET_VAR(rareNonInheritedData, m_mask.m_sizeLength, l) }
898
899     void setBorderCollapse(bool collapse) { inherited_flags._border_collapse = collapse; }
900     void setHorizontalBorderSpacing(short v) { SET_VAR(inherited, horizontal_border_spacing, v) }
901     void setVerticalBorderSpacing(short v) { SET_VAR(inherited, vertical_border_spacing, v) }
902     void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; }
903     void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; }
904
905     void setCounterIncrement(short v) { SET_VAR(rareNonInheritedData, m_counterIncrement, v) }
906     void setCounterReset(short v) { SET_VAR(rareNonInheritedData, m_counterReset, v) }
907
908     void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; }
909     void setListStyleImage(StyleImage* v) { if (inherited->list_style_image != v) inherited.access()->list_style_image = v; }
910     void setListStylePosition(EListStylePosition v) { inherited_flags._list_style_position = v; }
911
912     void resetMargin() { SET_VAR(surround, margin, LengthBox(Fixed)) }
913     void setMarginTop(Length v) { SET_VAR(surround, margin.m_top, v) }
914     void setMarginBottom(Length v) { SET_VAR(surround, margin.m_bottom, v) }
915     void setMarginLeft(Length v) { SET_VAR(surround, margin.m_left, v) }
916     void setMarginRight(Length v) { SET_VAR(surround, margin.m_right, v) }
917
918     void resetPadding() { SET_VAR(surround, padding, LengthBox(Auto)) }
919     void setPaddingBox(const LengthBox& b) { SET_VAR(surround, padding, b) }
920     void setPaddingTop(Length v) { SET_VAR(surround, padding.m_top, v) }
921     void setPaddingBottom(Length v) { SET_VAR(surround, padding.m_bottom, v) }
922     void setPaddingLeft(Length v) { SET_VAR(surround, padding.m_left, v) }
923     void setPaddingRight(Length v) { SET_VAR(surround, padding.m_right, v) }
924
925     void setCursor(ECursor c) { inherited_flags._cursor_style = c; }
926     void addCursor(CachedImage*, const IntPoint& = IntPoint());
927     void setCursorList(PassRefPtr<CursorList>);
928     void clearCursorList();
929
930     void setInsideLink(EInsideLink insideLink) { inherited_flags._insideLink = insideLink; }
931     void setIsLink(bool b) { noninherited_flags._isLink = b; }
932
933     bool forceBackgroundsToWhite() const { return inherited_flags._force_backgrounds_to_white; }
934     void setForceBackgroundsToWhite(bool b=true) { inherited_flags._force_backgrounds_to_white = b; }
935
936     bool htmlHacks() const { return inherited_flags._htmlHacks; }
937     void setHtmlHacks(bool b=true) { inherited_flags._htmlHacks = b; }
938
939     bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); }
940     void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_box, m_zIndex, 0) }
941     int zIndex() const { return m_box->zIndex(); }
942     void setZIndex(int v) { SET_VAR(m_box, m_hasAutoZIndex, false); SET_VAR(m_box, m_zIndex, v) }
943
944     void setWidows(short w) { SET_VAR(rareInheritedData, widows, w); }
945     void setOrphans(short o) { SET_VAR(rareInheritedData, orphans, o); }
946     void setPageBreakInside(EPageBreak b) { noninherited_flags._page_break_inside = b; }
947     void setPageBreakBefore(EPageBreak b) { noninherited_flags._page_break_before = b; }
948     void setPageBreakAfter(EPageBreak b) { noninherited_flags._page_break_after = b; }
949
950     // CSS3 Setters
951 #if ENABLE(XBL)
952     void deleteBindingURIs() { SET_VAR(rareNonInheritedData, bindingURI, static_cast<BindingURI*>(0)); }
953     void inheritBindingURIs(BindingURI* other) { SET_VAR(rareNonInheritedData, bindingURI, other->copy()); }
954     void addBindingURI(StringImpl* uri);
955 #endif
956
957     void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v) }
958     void setTextShadow(ShadowData* val, bool add=false);
959     void setTextStrokeColor(const Color& c) { SET_VAR(rareInheritedData, textStrokeColor, c) }
960     void setTextStrokeWidth(float w) { SET_VAR(rareInheritedData, textStrokeWidth, w) }
961     void setTextFillColor(const Color& c) { SET_VAR(rareInheritedData, textFillColor, c) }
962     void setColorSpace(ColorSpace space) { SET_VAR(rareInheritedData, colorSpace, space) }
963     void setOpacity(float f) { SET_VAR(rareNonInheritedData, opacity, f); }
964     void setAppearance(ControlPart a) { SET_VAR(rareNonInheritedData, m_appearance, a); }
965     void setBoxAlign(EBoxAlignment a) { SET_VAR(rareNonInheritedData.access()->flexibleBox, align, a); }
966     void setBoxDirection(EBoxDirection d) { inherited_flags._box_direction = d; }
967     void setBoxFlex(float f) { SET_VAR(rareNonInheritedData.access()->flexibleBox, flex, f); }
968     void setBoxFlexGroup(unsigned int fg) { SET_VAR(rareNonInheritedData.access()->flexibleBox, flex_group, fg); }
969     void setBoxLines(EBoxLines l) { SET_VAR(rareNonInheritedData.access()->flexibleBox, lines, l); }
970     void setBoxOrdinalGroup(unsigned int og) { SET_VAR(rareNonInheritedData.access()->flexibleBox, ordinal_group, og); }
971     void setBoxOrient(EBoxOrient o) { SET_VAR(rareNonInheritedData.access()->flexibleBox, orient, o); }
972     void setBoxPack(EBoxAlignment p) { SET_VAR(rareNonInheritedData.access()->flexibleBox, pack, p); }
973     void setBoxShadow(ShadowData* val, bool add=false);
974     void setBoxReflect(PassRefPtr<StyleReflection> reflect) { if (rareNonInheritedData->m_boxReflect != reflect) rareNonInheritedData.access()->m_boxReflect = reflect; }
975     void setBoxSizing(EBoxSizing s) { SET_VAR(m_box, m_boxSizing, s); }
976     void setMarqueeIncrement(const Length& f) { SET_VAR(rareNonInheritedData.access()->marquee, increment, f); }
977     void setMarqueeSpeed(int f) { SET_VAR(rareNonInheritedData.access()->marquee, speed, f); }
978     void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(rareNonInheritedData.access()->marquee, direction, d); }
979     void setMarqueeBehavior(EMarqueeBehavior b) { SET_VAR(rareNonInheritedData.access()->marquee, behavior, b); }
980     void setMarqueeLoopCount(int i) { SET_VAR(rareNonInheritedData.access()->marquee, loops, i); }
981     void setUserModify(EUserModify u) { SET_VAR(rareInheritedData, userModify, u); }
982     void setUserDrag(EUserDrag d) { SET_VAR(rareNonInheritedData, userDrag, d); }
983     void setUserSelect(EUserSelect s) { SET_VAR(rareInheritedData, userSelect, s); }
984     void setTextOverflow(bool b) { SET_VAR(rareNonInheritedData, textOverflow, b); }
985     void setMarginTopCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginTopCollapse, c); }
986     void setMarginBottomCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginBottomCollapse, c); }
987     void setWordBreak(EWordBreak b) { SET_VAR(rareInheritedData, wordBreak, b); }
988     void setWordWrap(EWordWrap b) { SET_VAR(rareInheritedData, wordWrap, b); }
989     void setNBSPMode(ENBSPMode b) { SET_VAR(rareInheritedData, nbspMode, b); }
990     void setKHTMLLineBreak(EKHTMLLineBreak b) { SET_VAR(rareInheritedData, khtmlLineBreak, b); }
991     void setMatchNearestMailBlockquoteColor(EMatchNearestMailBlockquoteColor c) { SET_VAR(rareNonInheritedData, matchNearestMailBlockquoteColor, c); }
992     void setHighlight(const AtomicString& h) { SET_VAR(rareInheritedData, highlight, h); }
993     void setBorderFit(EBorderFit b) { SET_VAR(rareNonInheritedData, m_borderFit, b); }
994     void setResize(EResize r) { SET_VAR(rareInheritedData, resize, r); }
995     void setColumnWidth(float f) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_autoWidth, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_width, f); }
996     void setHasAutoColumnWidth() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_autoWidth, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_width, 0); }
997     void setColumnCount(unsigned short c) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_autoCount, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_count, c); }
998     void setHasAutoColumnCount() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_autoCount, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_count, 0); }
999     void setColumnGap(float f) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_normalGap, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_gap, f); }
1000     void setHasNormalColumnGap() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_normalGap, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_gap, 0); }
1001     void setColumnRuleColor(const Color& c) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule.m_color, c); }
1002     void setColumnRuleStyle(EBorderStyle b) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule.m_style, b); }
1003     void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule.m_width, w); }
1004     void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()) }
1005     void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakBefore, p); }
1006     void setColumnBreakInside(EPageBreak p) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); }
1007     void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakAfter, p); }
1008     void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInheritedData.access()->m_transform, m_operations, ops); }
1009     void setTransformOriginX(Length l) { SET_VAR(rareNonInheritedData.access()->m_transform, m_x, l); }
1010     void setTransformOriginY(Length l) { SET_VAR(rareNonInheritedData.access()->m_transform, m_y, l); }
1011     void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m_transform, m_z, f); }
1012     // End CSS3 Setters
1013
1014     // Apple-specific property setters
1015     void setPointerEvents(EPointerEvents p) { inherited_flags._pointerEvents = p; }
1016
1017     void clearAnimations()
1018     {
1019         rareNonInheritedData.access()->m_animations.clear();
1020     }
1021
1022     void clearTransitions()
1023     {
1024         rareNonInheritedData.access()->m_transitions.clear();
1025     }
1026
1027     void inheritAnimations(const AnimationList* parent) { rareNonInheritedData.access()->m_animations.set(parent ? new AnimationList(*parent) : 0); }
1028     void inheritTransitions(const AnimationList* parent) { rareNonInheritedData.access()->m_transitions.set(parent ? new AnimationList(*parent) : 0); }
1029     void adjustAnimations();
1030     void adjustTransitions();
1031
1032     void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(rareNonInheritedData, m_transformStyle3D, b); }
1033     void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(rareNonInheritedData, m_backfaceVisibility, b); }
1034     void setPerspective(float p) { SET_VAR(rareNonInheritedData, m_perspective, p); }
1035     void setPerspectiveOriginX(Length l) { SET_VAR(rareNonInheritedData, m_perspectiveOriginX, l); }
1036     void setPerspectiveOriginY(Length l) { SET_VAR(rareNonInheritedData, m_perspectiveOriginY, l); }
1037
1038 #if USE(ACCELERATED_COMPOSITING)
1039     void setIsRunningAcceleratedAnimation(bool b = true) { SET_VAR(rareNonInheritedData, m_runningAcceleratedAnimation, b); }
1040 #endif
1041
1042     void setLineClamp(LineClampValue c) { SET_VAR(rareNonInheritedData, lineClamp, c); }
1043     void setTextSizeAdjust(bool b) { SET_VAR(rareInheritedData, textSizeAdjust, b); }
1044     void setTextSecurity(ETextSecurity aTextSecurity) { SET_VAR(rareInheritedData, textSecurity, aTextSecurity); }
1045
1046 #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
1047     void setTapHighlightColor(const Color& v) { SET_VAR(rareInheritedData, tapHighlightColor, v); }
1048 #endif
1049
1050 #if ENABLE(SVG)
1051     const SVGRenderStyle* svgStyle() const { return m_svgStyle.get(); }
1052     SVGRenderStyle* accessSVGStyle() { return m_svgStyle.access(); }
1053     
1054     float fillOpacity() const { return svgStyle()->fillOpacity(); }
1055     void setFillOpacity(float f) { accessSVGStyle()->setFillOpacity(f); }
1056     
1057     float strokeOpacity() const { return svgStyle()->strokeOpacity(); }
1058     void setStrokeOpacity(float f) { accessSVGStyle()->setStrokeOpacity(f); }
1059     
1060     float floodOpacity() const { return svgStyle()->floodOpacity(); }
1061     void setFloodOpacity(float f) { accessSVGStyle()->setFloodOpacity(f); }
1062 #endif
1063
1064     const ContentData* contentData() const { return rareNonInheritedData->m_content.get(); }
1065     bool contentDataEquivalent(const RenderStyle* otherStyle) const { return const_cast<RenderStyle*>(this)->rareNonInheritedData->contentDataEquivalent(*const_cast<RenderStyle*>(otherStyle)->rareNonInheritedData); }
1066     void clearContent();
1067     void setContent(PassRefPtr<StringImpl>, bool add = false);
1068     void setContent(PassRefPtr<StyleImage>, bool add = false);
1069     void setContent(CounterContent*, bool add = false);
1070
1071     const CounterDirectiveMap* counterDirectives() const;
1072     CounterDirectiveMap& accessCounterDirectives();
1073
1074     bool inheritedNotEqual(const RenderStyle*) const;
1075
1076     StyleDifference diff(const RenderStyle*, unsigned& changedContextSensitiveProperties) const;
1077
1078     bool isDisplayReplacedType() const
1079     {
1080         return display() == INLINE_BLOCK || display() == INLINE_BOX || display() == INLINE_TABLE;
1081     }
1082
1083     bool isDisplayInlineType() const
1084     {
1085         return display() == INLINE || isDisplayReplacedType();
1086     }
1087
1088     bool isOriginalDisplayInlineType() const
1089     {
1090         return originalDisplay() == INLINE || originalDisplay() == INLINE_BLOCK ||
1091                originalDisplay() == INLINE_BOX || originalDisplay() == INLINE_TABLE;
1092     }
1093
1094     // To tell if this style matched attribute selectors. This makes it impossible to share.
1095     bool affectedByAttributeSelectors() const { return m_affectedByAttributeSelectors; }
1096     void setAffectedByAttributeSelectors() { m_affectedByAttributeSelectors = true; }
1097
1098     bool unique() const { return m_unique; }
1099     void setUnique() { m_unique = true; }
1100
1101     // Methods for indicating the style is affected by dynamic updates (e.g., children changing, our position changing in our sibling list, etc.)
1102     bool affectedByEmpty() const { return m_affectedByEmpty; }
1103     bool emptyState() const { return m_emptyState; }
1104     void setEmptyState(bool b) { m_affectedByEmpty = true; m_unique = true; m_emptyState = b; }
1105     bool childrenAffectedByPositionalRules() const { return childrenAffectedByForwardPositionalRules() || childrenAffectedByBackwardPositionalRules(); }
1106     bool childrenAffectedByFirstChildRules() const { return m_childrenAffectedByFirstChildRules; }
1107     void setChildrenAffectedByFirstChildRules() { m_childrenAffectedByFirstChildRules = true; }
1108     bool childrenAffectedByLastChildRules() const { return m_childrenAffectedByLastChildRules; }
1109     void setChildrenAffectedByLastChildRules() { m_childrenAffectedByLastChildRules = true; }
1110     bool childrenAffectedByDirectAdjacentRules() const { return m_childrenAffectedByDirectAdjacentRules; }
1111     void setChildrenAffectedByDirectAdjacentRules() { m_childrenAffectedByDirectAdjacentRules = true; }
1112     bool childrenAffectedByForwardPositionalRules() const { return m_childrenAffectedByForwardPositionalRules; }
1113     void setChildrenAffectedByForwardPositionalRules() { m_childrenAffectedByForwardPositionalRules = true; }
1114     bool childrenAffectedByBackwardPositionalRules() const { return m_childrenAffectedByBackwardPositionalRules; }
1115     void setChildrenAffectedByBackwardPositionalRules() { m_childrenAffectedByBackwardPositionalRules = true; }
1116     bool firstChildState() const { return m_firstChildState; }
1117     void setFirstChildState() { m_firstChildState = true; }
1118     bool lastChildState() const { return m_lastChildState; }
1119     void setLastChildState() { m_lastChildState = true; }
1120     unsigned childIndex() const { return m_childIndex; }
1121     void setChildIndex(unsigned index) { m_childIndex = index; }
1122
1123     Color visitedDependentColor(int colorProperty) const;
1124
1125     // Initial values for all the properties
1126     static bool initialBorderCollapse() { return false; }
1127     static EBorderStyle initialBorderStyle() { return BNONE; }
1128     static NinePieceImage initialNinePieceImage() { return NinePieceImage(); }
1129     static IntSize initialBorderRadius() { return IntSize(0, 0); }
1130     static ECaptionSide initialCaptionSide() { return CAPTOP; }
1131     static EClear initialClear() { return CNONE; }
1132     static TextDirection initialDirection() { return LTR; }
1133     static EDisplay initialDisplay() { return INLINE; }
1134     static EEmptyCell initialEmptyCells() { return SHOW; }
1135     static EFloat initialFloating() { return FNONE; }
1136     static EListStylePosition initialListStylePosition() { return OUTSIDE; }
1137     static EListStyleType initialListStyleType() { return Disc; }
1138     static EOverflow initialOverflowX() { return OVISIBLE; }
1139     static EOverflow initialOverflowY() { return OVISIBLE; }
1140     static EPageBreak initialPageBreak() { return PBAUTO; }
1141     static EPosition initialPosition() { return StaticPosition; }
1142     static ETableLayout initialTableLayout() { return TAUTO; }
1143     static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }
1144     static ETextTransform initialTextTransform() { return TTNONE; }
1145     static EVisibility initialVisibility() { return VISIBLE; }
1146     static EWhiteSpace initialWhiteSpace() { return NORMAL; }
1147     static short initialHorizontalBorderSpacing() { return 0; }
1148     static short initialVerticalBorderSpacing() { return 0; }
1149     static ECursor initialCursor() { return CURSOR_AUTO; }
1150     static Color initialColor() { return Color::black; }
1151     static StyleImage* initialListStyleImage() { return 0; }
1152     static unsigned short initialBorderWidth() { return 3; }
1153     static int initialLetterWordSpacing() { return 0; }
1154     static Length initialSize() { return Length(); }
1155     static Length initialMinSize() { return Length(0, Fixed); }
1156     static Length initialMaxSize() { return Length(undefinedLength, Fixed); }
1157     static Length initialOffset() { return Length(); }
1158     static Length initialMargin() { return Length(Fixed); }
1159     static Length initialPadding() { return Length(Fixed); }
1160     static Length initialTextIndent() { return Length(Fixed); }
1161     static EVerticalAlign initialVerticalAlign() { return BASELINE; }
1162     static int initialWidows() { return 2; }
1163     static int initialOrphans() { return 2; }
1164     static Length initialLineHeight() { return Length(-100.0, Percent); }
1165     static ETextAlign initialTextAlign() { return TAAUTO; }
1166     static ETextDecoration initialTextDecoration() { return TDNONE; }
1167     static float initialZoom() { return 1.0f; }
1168     static int initialOutlineOffset() { return 0; }
1169     static float initialOpacity() { return 1.0f; }
1170     static EBoxAlignment initialBoxAlign() { return BSTRETCH; }
1171     static EBoxDirection initialBoxDirection() { return BNORMAL; }
1172     static EBoxLines initialBoxLines() { return SINGLE; }
1173     static EBoxOrient initialBoxOrient() { return HORIZONTAL; }
1174     static EBoxAlignment initialBoxPack() { return BSTART; }
1175     static float initialBoxFlex() { return 0.0f; }
1176     static int initialBoxFlexGroup() { return 1; }
1177     static int initialBoxOrdinalGroup() { return 1; }
1178     static EBoxSizing initialBoxSizing() { return CONTENT_BOX; }
1179     static StyleReflection* initialBoxReflect() { return 0; }
1180     static int initialMarqueeLoopCount() { return -1; }
1181     static int initialMarqueeSpeed() { return 85; }
1182     static Length initialMarqueeIncrement() { return Length(6, Fixed); }
1183     static EMarqueeBehavior initialMarqueeBehavior() { return MSCROLL; }
1184     static EMarqueeDirection initialMarqueeDirection() { return MAUTO; }
1185     static EUserModify initialUserModify() { return READ_ONLY; }
1186     static EUserDrag initialUserDrag() { return DRAG_AUTO; }
1187     static EUserSelect initialUserSelect() { return SELECT_TEXT; }
1188     static bool initialTextOverflow() { return false; }
1189     static EMarginCollapse initialMarginTopCollapse() { return MCOLLAPSE; }
1190     static EMarginCollapse initialMarginBottomCollapse() { return MCOLLAPSE; }
1191     static EWordBreak initialWordBreak() { return NormalWordBreak; }
1192     static EWordWrap initialWordWrap() { return NormalWordWrap; }
1193     static ENBSPMode initialNBSPMode() { return NBNORMAL; }
1194     static EKHTMLLineBreak initialKHTMLLineBreak() { return LBNORMAL; }
1195     static EMatchNearestMailBlockquoteColor initialMatchNearestMailBlockquoteColor() { return BCNORMAL; }
1196     static const AtomicString& initialHighlight() { return nullAtom; }
1197     static EBorderFit initialBorderFit() { return BorderFitBorder; }
1198     static EResize initialResize() { return RESIZE_NONE; }
1199     static ControlPart initialAppearance() { return NoControlPart; }
1200     static bool initialVisuallyOrdered() { return false; }
1201     static float initialTextStrokeWidth() { return 0; }
1202     static unsigned short initialColumnCount() { return 1; }
1203     static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(TransformOperations, ops, ()); return ops; }
1204     static Length initialTransformOriginX() { return Length(50.0, Percent); }
1205     static Length initialTransformOriginY() { return Length(50.0, Percent); }
1206     static EPointerEvents initialPointerEvents() { return PE_AUTO; }
1207     static float initialTransformOriginZ() { return 0; }
1208     static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3DFlat; }
1209     static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisibilityVisible; }
1210     static float initialPerspective() { return 0; }
1211     static Length initialPerspectiveOriginX() { return Length(50.0, Percent); }
1212     static Length initialPerspectiveOriginY() { return Length(50.0, Percent); }
1213     static Color initialBackgroundColor() { return Color::transparent; }
1214
1215     // Keep these at the end.
1216     static LineClampValue initialLineClamp() { return LineClampValue(); }
1217     static bool initialTextSizeAdjust() { return true; }
1218     static ETextSecurity initialTextSecurity() { return TSNONE; }
1219 #if ENABLE(DASHBOARD_SUPPORT)
1220     static const Vector<StyleDashboardRegion>& initialDashboardRegions();
1221     static const Vector<StyleDashboardRegion>& noneDashboardRegions();
1222 #endif
1223
1224 #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
1225     static Color initialTapHighlightColor() { return Color::tap; }
1226 #endif
1227 };
1228
1229 } // namespace WebCore
1230
1231 #endif // RenderStyle_h