| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2  * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 
| 3  * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. | 3  * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. | 
| 4  * | 4  * | 
| 5  * This library is free software; you can redistribute it and/or | 5  * This library is free software; you can redistribute it and/or | 
| 6  * modify it under the terms of the GNU Lesser General Public | 6  * modify it under the terms of the GNU Lesser General Public | 
| 7  * License as published by the Free Software Foundation; either | 7  * License as published by the Free Software Foundation; either | 
| 8  * version 2 of the License, or (at your option) any later version. | 8  * version 2 of the License, or (at your option) any later version. | 
| 9  * | 9  * | 
| 10  * This library is distributed in the hope that it will be useful, | 10  * This library is distributed in the hope that it will be useful, | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
| 39 class Node; | 39 class Node; | 
| 40 class RenderObject; | 40 class RenderObject; | 
| 41 class RenderStyle; | 41 class RenderStyle; | 
| 42 class ShadowData; | 42 class ShadowData; | 
| 43 class ShadowList; | 43 class ShadowList; | 
| 44 class StyleColor; | 44 class StyleColor; | 
| 45 class StylePropertyShorthand; | 45 class StylePropertyShorthand; | 
| 46 | 46 | 
| 47 enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; | 47 enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; | 
| 48 | 48 | 
| 49 class CSSComputedStyleDeclaration FINAL : public CSSStyleDeclaration { | 49 class CSSComputedStyleDeclaration final : public CSSStyleDeclaration { | 
| 50 public: | 50 public: | 
| 51     static PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> create(PassRefPtr
     WillBeRawPtr<Node> node, bool allowVisitedStyle = false, const String& pseudoEle
     mentName = String()) | 51     static PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> create(PassRefPtr
     WillBeRawPtr<Node> node, bool allowVisitedStyle = false, const String& pseudoEle
     mentName = String()) | 
| 52     { | 52     { | 
| 53         return adoptRefWillBeNoop(new CSSComputedStyleDeclaration(node, allowVis
     itedStyle, pseudoElementName)); | 53         return adoptRefWillBeNoop(new CSSComputedStyleDeclaration(node, allowVis
     itedStyle, pseudoElementName)); | 
| 54     } | 54     } | 
| 55     virtual ~CSSComputedStyleDeclaration(); | 55     virtual ~CSSComputedStyleDeclaration(); | 
| 56 | 56 | 
| 57 #if !ENABLE(OILPAN) | 57 #if !ENABLE(OILPAN) | 
| 58     virtual void ref() OVERRIDE; | 58     virtual void ref() override; | 
| 59     virtual void deref() OVERRIDE; | 59     virtual void deref() override; | 
| 60 #endif | 60 #endif | 
| 61 | 61 | 
| 62     String getPropertyValue(CSSPropertyID) const; | 62     String getPropertyValue(CSSPropertyID) const; | 
| 63     bool getPropertyPriority(CSSPropertyID) const; | 63     bool getPropertyPriority(CSSPropertyID) const; | 
| 64 | 64 | 
| 65     virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con
     st OVERRIDE; | 65     virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con
     st override; | 
| 66 | 66 | 
| 67     PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateL
     ayout = UpdateLayout) const; | 67     PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateL
     ayout = UpdateLayout) const; | 
| 68     PassRefPtrWillBeRawPtr<CSSValue> getFontSizeCSSValuePreferringKeyword() cons
     t; | 68     PassRefPtrWillBeRawPtr<CSSValue> getFontSizeCSSValuePreferringKeyword() cons
     t; | 
| 69     FixedPitchFontType fixedPitchFontType() const; | 69     FixedPitchFontType fixedPitchFontType() const; | 
| 70     PassRefPtrWillBeRawPtr<CSSValue> getSVGPropertyCSSValue(CSSPropertyID, EUpda
     teLayout) const; | 70     PassRefPtrWillBeRawPtr<CSSValue> getSVGPropertyCSSValue(CSSPropertyID, EUpda
     teLayout) const; | 
| 71 | 71 | 
| 72     PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyPropertiesInSet(const Ve
     ctor<CSSPropertyID>&) const; | 72     PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyPropertiesInSet(const Ve
     ctor<CSSPropertyID>&) const; | 
| 73 | 73 | 
| 74     virtual void trace(Visitor*) OVERRIDE; | 74     virtual void trace(Visitor*) override; | 
| 75 | 75 | 
| 76 private: | 76 private: | 
| 77     CSSComputedStyleDeclaration(PassRefPtrWillBeRawPtr<Node>, bool allowVisitedS
     tyle, const String&); | 77     CSSComputedStyleDeclaration(PassRefPtrWillBeRawPtr<Node>, bool allowVisitedS
     tyle, const String&); | 
| 78 | 78 | 
| 79     // The styled node is either the node passed into getComputedStyle, or the | 79     // The styled node is either the node passed into getComputedStyle, or the | 
| 80     // PseudoElement for :before and :after if they exist. | 80     // PseudoElement for :before and :after if they exist. | 
| 81     // FIXME: This should be styledElement since in JS getComputedStyle only wor
     ks | 81     // FIXME: This should be styledElement since in JS getComputedStyle only wor
     ks | 
| 82     // on Elements, but right now editing creates these for text nodes. We shoul
     d fix | 82     // on Elements, but right now editing creates these for text nodes. We shoul
     d fix | 
| 83     // that. | 83     // that. | 
| 84     Node* styledNode() const; | 84     Node* styledNode() const; | 
| 85 | 85 | 
| 86     // CSSOM functions. Don't make these public. | 86     // CSSOM functions. Don't make these public. | 
| 87     virtual CSSRule* parentRule() const OVERRIDE; | 87     virtual CSSRule* parentRule() const override; | 
| 88     virtual unsigned length() const OVERRIDE; | 88     virtual unsigned length() const override; | 
| 89     virtual String item(unsigned index) const OVERRIDE; | 89     virtual String item(unsigned index) const override; | 
| 90     PassRefPtr<RenderStyle> computeRenderStyle() const; | 90     PassRefPtr<RenderStyle> computeRenderStyle() const; | 
| 91     virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(const String& p
     ropertyName) OVERRIDE; | 91     virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(const String& p
     ropertyName) override; | 
| 92     virtual String getPropertyValue(const String& propertyName) OVERRIDE; | 92     virtual String getPropertyValue(const String& propertyName) override; | 
| 93     virtual String getPropertyPriority(const String& propertyName) OVERRIDE; | 93     virtual String getPropertyPriority(const String& propertyName) override; | 
| 94     virtual String getPropertyShorthand(const String& propertyName) OVERRIDE; | 94     virtual String getPropertyShorthand(const String& propertyName) override; | 
| 95     virtual bool isPropertyImplicit(const String& propertyName) OVERRIDE; | 95     virtual bool isPropertyImplicit(const String& propertyName) override; | 
| 96     virtual void setProperty(const String& propertyName, const String& value, co
     nst String& priority, ExceptionState&) OVERRIDE; | 96     virtual void setProperty(const String& propertyName, const String& value, co
     nst String& priority, ExceptionState&) override; | 
| 97     virtual String removeProperty(const String& propertyName, ExceptionState&) O
     VERRIDE; | 97     virtual String removeProperty(const String& propertyName, ExceptionState&) o
     verride; | 
| 98     virtual String cssText() const OVERRIDE; | 98     virtual String cssText() const override; | 
| 99     virtual void setCSSText(const String&, ExceptionState&) OVERRIDE; | 99     virtual void setCSSText(const String&, ExceptionState&) override; | 
| 100     virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSProp
     ertyID) OVERRIDE; | 100     virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSProp
     ertyID) override; | 
| 101     virtual String getPropertyValueInternal(CSSPropertyID) OVERRIDE; | 101     virtual String getPropertyValueInternal(CSSPropertyID) override; | 
| 102     virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im
     portant, ExceptionState&) OVERRIDE; | 102     virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im
     portant, ExceptionState&) override; | 
| 103 | 103 | 
| 104     virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI
     DE; | 104     virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const overri
     de; | 
| 105 | 105 | 
| 106     PassRefPtrWillBeRawPtr<CSSValue> valueForShadowData(const ShadowData&, const
      RenderStyle&, bool useSpread) const; | 106     PassRefPtrWillBeRawPtr<CSSValue> valueForShadowData(const ShadowData&, const
      RenderStyle&, bool useSpread) const; | 
| 107     PassRefPtrWillBeRawPtr<CSSValue> valueForShadowList(const ShadowList*, const
      RenderStyle&, bool useSpread) const; | 107     PassRefPtrWillBeRawPtr<CSSValue> valueForShadowList(const ShadowList*, const
      RenderStyle&, bool useSpread) const; | 
| 108     PassRefPtrWillBeRawPtr<CSSPrimitiveValue> currentColorOrValidColor(const Ren
     derStyle&, const StyleColor&) const; | 108     PassRefPtrWillBeRawPtr<CSSPrimitiveValue> currentColorOrValidColor(const Ren
     derStyle&, const StyleColor&) const; | 
| 109 | 109 | 
| 110     PassRefPtrWillBeRawPtr<CSSValue> valueForFilter(const RenderObject*, const R
     enderStyle&) const; | 110     PassRefPtrWillBeRawPtr<CSSValue> valueForFilter(const RenderObject*, const R
     enderStyle&) const; | 
| 111 | 111 | 
| 112     PassRefPtrWillBeRawPtr<CSSValueList> valuesForShorthandProperty(const StyleP
     ropertyShorthand&) const; | 112     PassRefPtrWillBeRawPtr<CSSValueList> valuesForShorthandProperty(const StyleP
     ropertyShorthand&) const; | 
| 113     PassRefPtrWillBeRawPtr<CSSValueList> valuesForSidesShorthand(const StyleProp
     ertyShorthand&) const; | 113     PassRefPtrWillBeRawPtr<CSSValueList> valuesForSidesShorthand(const StyleProp
     ertyShorthand&) const; | 
| 114     PassRefPtrWillBeRawPtr<CSSValueList> valuesForBackgroundShorthand() const; | 114     PassRefPtrWillBeRawPtr<CSSValueList> valuesForBackgroundShorthand() const; | 
| 115     PassRefPtrWillBeRawPtr<CSSValueList> valuesForGridShorthand(const StylePrope
     rtyShorthand&) const; | 115     PassRefPtrWillBeRawPtr<CSSValueList> valuesForGridShorthand(const StylePrope
     rtyShorthand&) const; | 
| 116 | 116 | 
| 117     RefPtrWillBeMember<Node> m_node; | 117     RefPtrWillBeMember<Node> m_node; | 
| 118     PseudoId m_pseudoElementSpecifier; | 118     PseudoId m_pseudoElementSpecifier; | 
| 119     bool m_allowVisitedStyle; | 119     bool m_allowVisitedStyle; | 
| 120 #if !ENABLE(OILPAN) | 120 #if !ENABLE(OILPAN) | 
| 121     unsigned m_refCount; | 121     unsigned m_refCount; | 
| 122 #endif | 122 #endif | 
| 123 }; | 123 }; | 
| 124 | 124 | 
| 125 } // namespace blink | 125 } // namespace blink | 
| 126 | 126 | 
| 127 #endif // CSSComputedStyleDeclaration_h | 127 #endif // CSSComputedStyleDeclaration_h | 
| OLD | NEW | 
|---|