| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class ShadowData; | 42 class ShadowData; |
| 43 class ShadowList; | 43 class ShadowList; |
| 44 class StyleColor; | 44 class StyleColor; |
| 45 class StylePropertySet; | 45 class StylePropertySet; |
| 46 class StylePropertyShorthand; | 46 class StylePropertyShorthand; |
| 47 | 47 |
| 48 enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; | 48 enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; |
| 49 | 49 |
| 50 class CSSComputedStyleDeclaration final : public CSSStyleDeclaration { | 50 class CSSComputedStyleDeclaration final : public CSSStyleDeclaration { |
| 51 public: | 51 public: |
| 52 static PassRefPtr<CSSComputedStyleDeclaration> create(PassRefPtr<Node> node,
bool allowVisitedStyle = false, const String& pseudoElementName = String()) | 52 static PassRefPtr<CSSComputedStyleDeclaration> create(PassRefPtr<Node> node,
bool allowVisitedStyle = false) |
| 53 { | 53 { |
| 54 return adoptRef(new CSSComputedStyleDeclaration(node, allowVisitedStyle,
pseudoElementName)); | 54 return adoptRef(new CSSComputedStyleDeclaration(node, allowVisitedStyle)
); |
| 55 } | 55 } |
| 56 virtual ~CSSComputedStyleDeclaration(); | 56 virtual ~CSSComputedStyleDeclaration(); |
| 57 | 57 |
| 58 #if !ENABLE(OILPAN) | 58 #if !ENABLE(OILPAN) |
| 59 virtual void ref() override; | 59 virtual void ref() override; |
| 60 virtual void deref() override; | 60 virtual void deref() override; |
| 61 #endif | 61 #endif |
| 62 | 62 |
| 63 String getPropertyValue(CSSPropertyID) const; | 63 String getPropertyValue(CSSPropertyID) const; |
| 64 | 64 |
| 65 virtual PassRefPtr<MutableStylePropertySet> copyProperties() const override; | 65 virtual PassRefPtr<MutableStylePropertySet> copyProperties() const override; |
| 66 | 66 |
| 67 PassRefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateLayout = Upda
teLayout) const; | 67 PassRefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateLayout = Upda
teLayout) const; |
| 68 PassRefPtr<CSSValue> getFontSizeCSSValuePreferringKeyword() const; | 68 PassRefPtr<CSSValue> getFontSizeCSSValuePreferringKeyword() const; |
| 69 FixedPitchFontType fixedPitchFontType() const; | 69 FixedPitchFontType fixedPitchFontType() const; |
| 70 | 70 |
| 71 PassRefPtr<MutableStylePropertySet> copyPropertiesInSet(const Vector<CSSProp
ertyID>&) const; | 71 PassRefPtr<MutableStylePropertySet> copyPropertiesInSet(const Vector<CSSProp
ertyID>&) const; |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 CSSComputedStyleDeclaration(PassRefPtr<Node>, bool allowVisitedStyle, const
String&); | 74 CSSComputedStyleDeclaration(PassRefPtr<Node>, bool allowVisitedStyle); |
| 75 | 75 |
| 76 // CSSOM functions. Don't make these public. | 76 // CSSOM functions. Don't make these public. |
| 77 virtual unsigned length() const override; | 77 virtual unsigned length() const override; |
| 78 virtual String item(unsigned index) const override; | 78 virtual String item(unsigned index) const override; |
| 79 PassRefPtr<RenderStyle> computeRenderStyle(CSSPropertyID) const; | 79 PassRefPtr<RenderStyle> computeRenderStyle(CSSPropertyID) const; |
| 80 virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName)
override; | 80 virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName)
override; |
| 81 virtual String getPropertyValue(const String& propertyName) override; | 81 virtual String getPropertyValue(const String& propertyName) override; |
| 82 virtual String getPropertyShorthand(const String& propertyName) override; | 82 virtual String getPropertyShorthand(const String& propertyName) override; |
| 83 virtual bool isPropertyImplicit(const String& propertyName) override; | 83 virtual bool isPropertyImplicit(const String& propertyName) override; |
| 84 virtual void setProperty(const String& propertyName, const String& value, co
nst String& priority, ExceptionState&) override; | 84 virtual void setProperty(const String& propertyName, const String& value, co
nst String& priority, ExceptionState&) override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 95 PassRefPtr<CSSValue> valueForShadowList(const ShadowList*, const RenderStyle
&, bool useSpread) const; | 95 PassRefPtr<CSSValue> valueForShadowList(const ShadowList*, const RenderStyle
&, bool useSpread) const; |
| 96 PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(const RenderStyle&, c
onst StyleColor&) const; | 96 PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(const RenderStyle&, c
onst StyleColor&) const; |
| 97 | 97 |
| 98 PassRefPtr<CSSValue> valueForFilter(const RenderObject*, const RenderStyle&)
const; | 98 PassRefPtr<CSSValue> valueForFilter(const RenderObject*, const RenderStyle&)
const; |
| 99 | 99 |
| 100 PassRefPtr<CSSValueList> valuesForShorthandProperty(const StylePropertyShort
hand&) const; | 100 PassRefPtr<CSSValueList> valuesForShorthandProperty(const StylePropertyShort
hand&) const; |
| 101 PassRefPtr<CSSValueList> valuesForSidesShorthand(const StylePropertyShorthan
d&) const; | 101 PassRefPtr<CSSValueList> valuesForSidesShorthand(const StylePropertyShorthan
d&) const; |
| 102 PassRefPtr<CSSValueList> valuesForBackgroundShorthand() const; | 102 PassRefPtr<CSSValueList> valuesForBackgroundShorthand() const; |
| 103 | 103 |
| 104 RefPtr<Node> m_node; | 104 RefPtr<Node> m_node; |
| 105 PseudoId m_pseudoElementSpecifier; | |
| 106 bool m_allowVisitedStyle; | 105 bool m_allowVisitedStyle; |
| 107 #if !ENABLE(OILPAN) | 106 #if !ENABLE(OILPAN) |
| 108 unsigned m_refCount; | 107 unsigned m_refCount; |
| 109 #endif | 108 #endif |
| 110 }; | 109 }; |
| 111 | 110 |
| 112 } // namespace blink | 111 } // namespace blink |
| 113 | 112 |
| 114 #endif // SKY_ENGINE_CORE_CSS_CSSCOMPUTEDSTYLEDECLARATION_H_ | 113 #endif // SKY_ENGINE_CORE_CSS_CSSCOMPUTEDSTYLEDECLARATION_H_ |
| OLD | NEW |