Replace PassRef with Ref/Ref&& across the board.
[WebKit-https.git] / Source / WebCore / rendering / style / RenderStyle.h
index 27bdf3f..7c0cea0 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
  *           (C) 2000 Antti Koivisto (koivisto@kde.org)
  *           (C) 2000 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2003-2014 Apple Inc. All rights reserved.
  * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
  *
  * This library is free software; you can redistribute it and/or
 #include "StyleDashboardRegion.h"
 #endif
 
-#if ENABLE(CSS_SCROLL_SNAP)
-#include "StyleScrollSnapPoints.h"
-#endif
-
 #if ENABLE(IOS_TEXT_AUTOSIZING)
 #include "TextSizeAdjustment.h"
 #endif
@@ -104,13 +100,15 @@ template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
 
 namespace WebCore {
 
-class FilterOperations;
 class BorderData;
+class ContentData;
 class CounterContent;
 class CursorList;
+class FilterOperations;
 class Font;
 class FontMetrics;
 class IntRect;
+class MaskImageOperation;
 class Pair;
 class ShadowData;
 class StyleImage;
@@ -118,7 +116,7 @@ class StyleInheritedData;
 class StyleResolver;
 class TransformationMatrix;
 
-class ContentData;
+struct ScrollSnapPoints;
 
 typedef Vector<RefPtr<RenderStyle>, 4> PseudoStyleCache;
 
@@ -131,6 +129,7 @@ class RenderStyle: public RefCounted<RenderStyle> {
     friend class PropertyWrapperMaybeInvalidColor; // Used by CSS animations. We can't allow them to animate based off visited colors.
     friend class RenderSVGResource; // FIXME: Needs to alter the visited state by hand. Should clean the SVG code up and move it into RenderStyle perhaps.
     friend class RenderTreeAsText; // FIXME: Only needed so the render tree can keep lying and dump the wrong colors.  Rebaselining would allow this to be yanked.
+    friend class StyleBuilderCustom; // Sets members directly.
     friend class StyleResolver; // Sets members directly.
 
 public:
@@ -237,6 +236,14 @@ public:
             ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
             m_flags |= oneBitMask << (pseudoBitsOffset - 1 + pseudo);
         }
+        void setHasPseudoStyles(PseudoIdSet pseudoIdSet)
+        {
+            ASSERT(pseudoIdSet);
+            uint64_t rawPseudoIdSet = pseudoIdSet.data();
+            ASSERT((rawPseudoIdSet & PUBLIC_PSEUDOID_MASK) == rawPseudoIdSet);
+            static_assert(pseudoBitsOffset >= 1, "(pseudoBitsOffset - 1) should be valid.");
+            m_flags |= (static_cast<uint64_t>(rawPseudoIdSet) << (pseudoBitsOffset - 1));
+        }
 
         ETableLayout tableLayout() const { return static_cast<ETableLayout>(getValue(tableLayoutBitMask, tableLayoutOffset)); }
         void setTableLayout(ETableLayout tableLayout) { updateValue(tableLayout, tableLayoutBitMask, tableLayoutOffset); }
@@ -268,19 +275,7 @@ public:
         bool isLink() const { return getBoolean(isLinkOffset); }
         void setIsLink(bool value) { updateBoolean(value, isLinkOffset); }
 
-        static EOverflow initialOverflowX() { return OVISIBLE; }
-        static EOverflow initialOverflowY() { return OVISIBLE; }
-        static EClear initialClear() { return CNONE; }
-        static EDisplay initialDisplay() { return INLINE; }
-        static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }
-        static EPosition initialPosition() { return StaticPosition; }
-        static EVerticalAlign initialVerticalAlign() { return BASELINE; }
-        static EFloat initialFloating() { return NoFloat; }
-        static EPageBreak initialPageBreak() { return PBAUTO; }
-        static ETableLayout initialTableLayout() { return TAUTO; }
-
         static ptrdiff_t flagsMemoryOffset() { return OBJECT_OFFSETOF(NonInheritedFlags, m_flags); }
-        static uint64_t flagIsUnique() { return oneBitMask << isUniqueOffset; }
         static uint64_t flagIsaffectedByActive() { return oneBitMask << affectedByActiveOffset; }
         static uint64_t flagIsaffectedByHover() { return oneBitMask << affectedByHoverOffset; }
         static uint64_t flagPseudoStyle(PseudoId pseudo) { return oneBitMask << (pseudoBitsOffset - 1 + pseudo); }
@@ -312,6 +307,7 @@ public:
             return static_cast<unsigned>((m_flags >> offset) & positionIndependentMask);
         }
 
+        static uint64_t flagIsUnique() { return oneBitMask << isUniqueOffset; }
         static uint64_t flagFirstChildState() { return oneBitMask << firstChildStateOffset; }
         static uint64_t flagLastChildState() { return oneBitMask << lastChildStateOffset; }
 
@@ -439,6 +435,7 @@ protected:
                 && (m_printColorAdjust == other.m_printColorAdjust)
                 && (_pointerEvents == other._pointerEvents)
                 && (_insideLink == other._insideLink)
+                && (_insideDefaultButton == other._insideDefaultButton)
                 && (m_writingMode == other.m_writingMode);
         }
 
@@ -467,11 +464,12 @@ protected:
         unsigned m_printColorAdjust : PrintColorAdjustBits;
         unsigned _pointerEvents : 4; // EPointerEvents
         unsigned _insideLink : 2; // EInsideLink
-        // 43 bits
+        unsigned _insideDefaultButton : 1;
+        // 44 bits
 
         // CSS Text Layout Module Level 3: Vertical writing support
         unsigned m_writingMode : 2; // WritingMode
-        // 45 bits
+        // 46 bits
     } inherited_flags;
 
 // don't inherit
@@ -484,13 +482,13 @@ private:
     ALWAYS_INLINE RenderStyle(const RenderStyle&);
 
 public:
-    static PassRef<RenderStyle> create();
-    static PassRef<RenderStyle> createDefaultStyle();
-    static PassRef<RenderStyle> createAnonymousStyleWithDisplay(const RenderStyle* parentStyle, EDisplay);
-    static PassRef<RenderStyle> clone(const RenderStyle*);
+    static Ref<RenderStyle> create();
+    static Ref<RenderStyle> createDefaultStyle();
+    static Ref<RenderStyle> createAnonymousStyleWithDisplay(const RenderStyle* parentStyle, EDisplay);
+    static Ref<RenderStyle> clone(const RenderStyle*);
 
     // Create a RenderStyle for generated content by inheriting from a pseudo style.
-    static PassRef<RenderStyle> createStyleInheritingFromPseudoStyle(const RenderStyle& pseudoStyle);
+    static Ref<RenderStyle> createStyleInheritingFromPseudoStyle(const RenderStyle& pseudoStyle);
 
     enum IsAtShadowBoundary {
         AtShadowBoundary,
@@ -573,6 +571,7 @@ public:
     bool hasAnyPublicPseudoStyles() const;
     bool hasPseudoStyle(PseudoId pseudo) const;
     void setHasPseudoStyle(PseudoId pseudo);
+    void setHasPseudoStyles(PseudoIdSet);
     bool hasUniquePseudoStyle() const;
 
     // attribute getter methods
@@ -800,7 +799,6 @@ public:
     FillLayer* accessBackgroundLayers() { return &(m_background.access()->m_background); }
     const FillLayer* backgroundLayers() const { return &(m_background->background()); }
 
-    StyleImage* maskImage() const { return rareNonInheritedData->m_mask.image(); }
     EFillRepeat maskRepeatX() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.repeatX()); }
     EFillRepeat maskRepeatY() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.repeatY()); }
     CompositeOperator maskComposite() const { return static_cast<CompositeOperator>(rareNonInheritedData->m_mask.composite()); }
@@ -858,6 +856,8 @@ public:
     EInsideLink insideLink() const { return static_cast<EInsideLink>(inherited_flags._insideLink); }
     bool isLink() const { return noninherited_flags.isLink(); }
 
+    bool insideDefaultButton() const { return inherited_flags._insideDefaultButton; }
+
     short widows() const { return rareInheritedData->widows; }
     short orphans() const { return rareInheritedData->orphans; }
     bool hasAutoWidows() const { return rareInheritedData->m_hasAutoWidows; }
@@ -1025,7 +1025,7 @@ public:
     void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, ApplyTransformOrigin = IncludeTransformOrigin) const;
     void setPageScaleTransform(float);
 
-    bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rareNonInheritedData->m_maskBoxImage.hasImage(); }
+    bool hasMask() const { return rareNonInheritedData->m_mask.hasNonEmptyMaskImage() || rareNonInheritedData->m_mask.hasImage() || rareNonInheritedData->m_maskBoxImage.hasImage(); }
 
     TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInheritedData->m_textCombine); }
     bool hasTextCombine() const { return textCombine() != TextCombineNone; }
@@ -1080,31 +1080,28 @@ public:
 
 #if ENABLE(CSS_SCROLL_SNAP)
     ScrollSnapType scrollSnapType() const { return static_cast<ScrollSnapType>(rareNonInheritedData->m_scrollSnapType); }
-    Vector<Length> scrollSnapOffsetsX() const { return rareNonInheritedData->m_scrollSnapPoints->offsetsX; }
-    Vector<Length> scrollSnapOffsetsY() const { return rareNonInheritedData->m_scrollSnapPoints->offsetsY; }
-    Length scrollSnapRepeatOffsetX() const { return rareNonInheritedData->m_scrollSnapPoints->repeatOffsetX; }
-    Length scrollSnapRepeatOffsetY() const { return rareNonInheritedData->m_scrollSnapPoints->repeatOffsetY; }
-    bool scrollSnapHasRepeatX() const { return rareNonInheritedData->m_scrollSnapPoints->hasRepeatX; }
-    bool scrollSnapHasRepeatY() const { return rareNonInheritedData->m_scrollSnapPoints->hasRepeatY; }
-    Length scrollSnapDestinationX() const { return rareNonInheritedData->m_scrollSnapPoints->destinationX; }
-    Length scrollSnapDestinationY() const { return rareNonInheritedData->m_scrollSnapPoints->destinationY; }
-    Vector<SnapCoordinate> scrollSnapCoordinates() const { return rareNonInheritedData->m_scrollSnapPoints->coordinates; }
-    bool scrollSnapUsesElementsX() const { return rareNonInheritedData->m_scrollSnapPoints->usesElementsX; }
-    bool scrollSnapUsesElementsY() const { return rareNonInheritedData->m_scrollSnapPoints->usesElementsY; }
+    const ScrollSnapPoints& scrollSnapPointsX() const;
+    const ScrollSnapPoints& scrollSnapPointsY() const;
+    const LengthSize& scrollSnapDestination() const;
+    const Vector<LengthSize>& scrollSnapCoordinates() const;
 #endif
+
 #if ENABLE(TOUCH_EVENTS)
     Color tapHighlightColor() const { return rareInheritedData->tapHighlightColor; }
 #endif
+
 #if PLATFORM(IOS)
     bool touchCalloutEnabled() const { return rareInheritedData->touchCalloutEnabled; }
-    Color compositionFillColor() const { return rareInheritedData->compositionFillColor; }
 #endif
+
 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
     bool useTouchOverflowScrolling() const { return rareInheritedData->useTouchOverflowScrolling; }
 #endif
+
 #if ENABLE(IOS_TEXT_AUTOSIZING)
     TextSizeAdjustment textSizeAdjust() const { return rareInheritedData->textSizeAdjust; }
 #endif
+
     ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(rareInheritedData->textSecurity); }
 
     WritingMode writingMode() const { return static_cast<WritingMode>(inherited_flags.m_writingMode); }
@@ -1129,6 +1126,17 @@ public:
     FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_filter.access()->m_operations; }
     const FilterOperations& filter() const { return rareNonInheritedData->m_filter->m_operations; }
     bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operations.operations().isEmpty(); }
+    
+    RefPtr<MaskImageOperation>& mutableMaskImage() { return rareNonInheritedData.access()->m_mask.m_maskImageOperation; }
+    const RefPtr<MaskImageOperation> maskImage() const { return rareNonInheritedData->m_mask.maskImage(); }
+
+#if ENABLE(FILTERS_LEVEL_2)
+    FilterOperations& mutableBackdropFilter() { return rareNonInheritedData.access()->m_backdropFilter.access()->m_operations; }
+    const FilterOperations& backdropFilter() const { return rareNonInheritedData->m_backdropFilter->m_operations; }
+    bool hasBackdropFilter() const { return !rareNonInheritedData->m_backdropFilter->m_operations.operations().isEmpty(); }
+#else
+    bool hasBackdropFilter() const { return false; }
+#endif
 
 #if ENABLE(CSS_COMPOSITING)
     BlendMode blendMode() const { return static_cast<BlendMode>(rareNonInheritedData->m_effectiveBlendMode); }
@@ -1320,7 +1328,7 @@ public:
 #if ENABLE(CSS3_TEXT)
     void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAlignLast, v); }
     void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustify, v); }
-#endif // CSS3_TEXT
+#endif
     void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInheritedData, m_textDecorationStyle, v); }
     void setTextDecorationSkip(TextDecorationSkip skip) { SET_VAR(rareInheritedData, m_textDecorationSkip, skip); }
     void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInheritedData, m_textUnderlinePosition, v); }
@@ -1372,8 +1380,6 @@ public:
         }
     }
 
-    void setMaskImage(PassRefPtr<StyleImage> v) { rareNonInheritedData.access()->m_mask.setImage(v); }
-
     void setMaskBoxImage(const NinePieceImage& b) { SET_VAR(rareNonInheritedData, m_maskBoxImage, b); }
     void setMaskBoxImageSource(PassRefPtr<StyleImage> v) { rareNonInheritedData.access()->m_maskBoxImage.setImage(v); }
     void setMaskXPosition(Length length) { SET_VAR(rareNonInheritedData, m_mask.m_xPosition, WTF::move(length)); }
@@ -1421,6 +1427,8 @@ public:
     void setInsideLink(EInsideLink insideLink) { inherited_flags._insideLink = insideLink; }
     void setIsLink(bool b) { noninherited_flags.setIsLink(b); }
 
+    void setInsideDefaultButton(bool insideDefaultButton) { inherited_flags._insideDefaultButton = insideDefaultButton; }
+
     PrintColorAdjust printColorAdjust() const { return static_cast<PrintColorAdjust>(inherited_flags.m_printColorAdjust); }
     void setPrintColorAdjust(PrintColorAdjust value) { inherited_flags.m_printColorAdjust = value; }
 
@@ -1558,6 +1566,12 @@ public:
     void setRubyPosition(RubyPosition position) { SET_VAR(rareInheritedData, m_rubyPosition, position); }
 
     void setFilter(const FilterOperations& ops) { SET_VAR(rareNonInheritedData.access()->m_filter, m_operations, ops); }
+#if ENABLE(FILTERS_LEVEL_2)
+    void setBackdropFilter(const FilterOperations& ops) { SET_VAR(rareNonInheritedData.access()->m_backdropFilter, m_operations, ops); }
+#endif
+
+    void setMaskImage(const Vector<RefPtr<MaskImageOperation>>&);
+    void setMaskImage(const RefPtr<MaskImageOperation> maskImage) { Vector<RefPtr<MaskImageOperation>> vectMask; vectMask.append(maskImage); setMaskImage(vectMask); }
 
     void setTabSize(unsigned size) { SET_VAR(rareInheritedData, m_tabSize, size); }
 
@@ -1606,33 +1620,29 @@ public:
     void setInitialLetter(const IntSize& size) { SET_VAR(rareNonInheritedData, m_initialLetter, size); }
     
 #if ENABLE(CSS_SCROLL_SNAP)
-    void setScrollSnapType(ScrollSnapType type) { SET_VAR(rareNonInheritedData, m_scrollSnapType, type); }
-    void setScrollSnapOffsetsX(Vector<Length>& offsets) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, offsetsX, offsets); }
-    void setScrollSnapOffsetsY(Vector<Length>& offsets) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, offsetsY, offsets); }
-    void setScrollSnapRepeatOffsetX(Length repeatOffset) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, repeatOffsetX, repeatOffset); }
-    void setScrollSnapRepeatOffsetY(Length repeatOffset) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, repeatOffsetY, repeatOffset); }
-    void setScrollSnapHasRepeatX(bool hasRepeat) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, hasRepeatX, hasRepeat); }
-    void setScrollSnapHasRepeatY(bool hasRepeat) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, hasRepeatY, hasRepeat); }
-    void setScrollSnapDestinationX(Length destination) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, destinationX, destination); }
-    void setScrollSnapDestinationY(Length destination) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, destinationY, destination); }
-    void setScrollSnapCoordinates(Vector<SnapCoordinate>& coordinates) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, coordinates, coordinates); }
-    void setScrollSnapUsesElementsX(bool usesElements) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, usesElementsX, usesElements); }
-    void setScrollSnapUsesElementsY(bool usesElements) { SET_VAR(rareNonInheritedData.access()->m_scrollSnapPoints, usesElementsY, usesElements); }
+    void setScrollSnapType(ScrollSnapType type) { SET_VAR(rareNonInheritedData, m_scrollSnapType, static_cast<unsigned>(type)); }
+    void setScrollSnapPointsX(ScrollSnapPoints);
+    void setScrollSnapPointsY(ScrollSnapPoints);
+    void setScrollSnapDestination(LengthSize);
+    void setScrollSnapCoordinates(Vector<LengthSize>);
 #endif
 
 #if ENABLE(TOUCH_EVENTS)
     void setTapHighlightColor(const Color& c) { SET_VAR(rareInheritedData, tapHighlightColor, c); }
 #endif
+
 #if PLATFORM(IOS)
     void setTouchCalloutEnabled(bool v) { SET_VAR(rareInheritedData, touchCalloutEnabled, v); }
-    void setCompositionFillColor(const Color &c) { SET_VAR(rareInheritedData, compositionFillColor, c); }
 #endif
+
 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
     void setUseTouchOverflowScrolling(bool v) { SET_VAR(rareInheritedData, useTouchOverflowScrolling, v); }
 #endif
+
 #if ENABLE(IOS_TEXT_AUTOSIZING)
     void setTextSizeAdjust(TextSizeAdjustment anAdjustment) { SET_VAR(rareInheritedData, textSizeAdjust, anAdjustment); }
 #endif
+
     void setTextSecurity(ETextSecurity aTextSecurity) { SET_VAR(rareInheritedData, textSecurity, aTextSecurity); }
 
     const SVGRenderStyle& svgStyle() const { return *m_svgStyle; }
@@ -1749,7 +1759,7 @@ public:
     bool equalForTextAutosizing(const RenderStyle *other) const;
 #endif
 
-    StyleDifference diff(const RenderStyle*, unsigned& changedContextSensitiveProperties) const;
+    StyleDifference diff(const RenderStyle&, unsigned& changedContextSensitiveProperties) const;
     bool diffRequiresLayerRepaint(const RenderStyle&, bool isComposited) const;
 
     bool isDisplayReplacedType() const { return isDisplayReplacedType(display()); }
@@ -1788,6 +1798,16 @@ public:
     bool hasExplicitlyInheritedProperties() const { return noninherited_flags.hasExplicitlyInheritedProperties(); }
     
     // Initial values for all the properties
+    static EOverflow initialOverflowX() { return OVISIBLE; }
+    static EOverflow initialOverflowY() { return OVISIBLE; }
+    static EClear initialClear() { return CNONE; }
+    static EDisplay initialDisplay() { return INLINE; }
+    static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }
+    static EPosition initialPosition() { return StaticPosition; }
+    static EVerticalAlign initialVerticalAlign() { return BASELINE; }
+    static EFloat initialFloating() { return NoFloat; }
+    static EPageBreak initialPageBreak() { return PBAUTO; }
+    static ETableLayout initialTableLayout() { return TAUTO; }
     static EBorderCollapse initialBorderCollapse() { return BSEPARATE; }
     static EBorderStyle initialBorderStyle() { return BNONE; }
     static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; }
@@ -1810,7 +1830,7 @@ public:
     static EWhiteSpace initialWhiteSpace() { return NORMAL; }
     static short initialHorizontalBorderSpacing() { return 0; }
     static short initialVerticalBorderSpacing() { return 0; }
-    static ECursor initialCursor() { return CURSOR_AUTO; }
+    static ECursor initialCursor() { return CursorAuto; }
 #if ENABLE(CURSOR_VISIBILITY)
     static CursorVisibility initialCursorVisibility() { return CursorVisibilityAuto; }
 #endif
@@ -1934,8 +1954,14 @@ public:
     static StyleImage* initialBorderImageSource() { return 0; }
     static StyleImage* initialMaskBoxImageSource() { return 0; }
     static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; }
+    static QuotesData* initialQuotes() { return nullptr; }
+
 #if ENABLE(CSS_SCROLL_SNAP)
     static ScrollSnapType initialScrollSnapType() { return ScrollSnapType::None; }
+    static ScrollSnapPoints initialScrollSnapPointsX();
+    static ScrollSnapPoints initialScrollSnapPointsY();
+    static LengthSize initialScrollSnapDestination();
+    static Vector<LengthSize> initialScrollSnapCoordinates();
 #endif
 
 #if ENABLE(CSS_GRID_LAYOUT)
@@ -1983,7 +2009,6 @@ public:
 #endif
 #if PLATFORM(IOS)
     static bool initialTouchCalloutEnabled() { return true; }
-    static Color initialCompositionFillColor() { return Color::compositionFill; }
 #endif
 #if ENABLE(TOUCH_EVENTS)
     static Color initialTapHighlightColor();
@@ -1996,6 +2021,9 @@ public:
     static const Vector<StyleDashboardRegion>& noneDashboardRegions();
 #endif
     static const FilterOperations& initialFilter() { DEPRECATED_DEFINE_STATIC_LOCAL(FilterOperations, ops, ()); return ops; }
+#if ENABLE(FILTERS_LEVEL_2)
+    static const FilterOperations& initialBackdropFilter() { DEPRECATED_DEFINE_STATIC_LOCAL(FilterOperations, ops, ()); return ops; }
+#endif
 #if ENABLE(CSS_COMPOSITING)
     static BlendMode initialBlendMode() { return BlendModeNormal; }
     static Isolation initialIsolation() { return IsolationAuto; }
@@ -2005,12 +2033,12 @@ public:
 
 private:
     bool changeAffectsVisualOverflow(const RenderStyle&) const;
-    bool changeRequiresLayout(const RenderStyle*, unsigned& changedContextSensitiveProperties) const;
-    bool changeRequiresPositionedLayoutOnly(const RenderStyle*, unsigned& changedContextSensitiveProperties) const;
-    bool changeRequiresLayerRepaint(const RenderStyle*, unsigned& changedContextSensitiveProperties) const;
-    bool changeRequiresRepaint(const RenderStyle*, unsigned& changedContextSensitiveProperties) const;
-    bool changeRequiresRepaintIfTextOrBorderOrOutline(const RenderStyle*, unsigned& changedContextSensitiveProperties) const;
-    bool changeRequiresRecompositeLayer(const RenderStyle*, unsigned& changedContextSensitiveProperties) const;
+    bool changeRequiresLayout(const RenderStyle&, unsigned& changedContextSensitiveProperties) const;
+    bool changeRequiresPositionedLayoutOnly(const RenderStyle&, unsigned& changedContextSensitiveProperties) const;
+    bool changeRequiresLayerRepaint(const RenderStyle&, unsigned& changedContextSensitiveProperties) const;
+    bool changeRequiresRepaint(const RenderStyle&, unsigned& changedContextSensitiveProperties) const;
+    bool changeRequiresRepaintIfTextOrBorderOrOutline(const RenderStyle&, unsigned& changedContextSensitiveProperties) const;
+    bool changeRequiresRecompositeLayer(const RenderStyle&, unsigned& changedContextSensitiveProperties) const;
 
     void setVisitedLinkColor(const Color&);
     void setVisitedLinkBackgroundColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBackgroundColor, v); }
@@ -2156,6 +2184,11 @@ inline void RenderStyle::setHasPseudoStyle(PseudoId pseudo)
     noninherited_flags.setHasPseudoStyle(pseudo);
 }
 
+inline void RenderStyle::setHasPseudoStyles(PseudoIdSet pseudoIdSet)
+{
+    noninherited_flags.setHasPseudoStyles(pseudoIdSet);
+}
+
 } // namespace WebCore
 
 #endif // RenderStyle_h