| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const CSSValue* getPropertyCSSValue(AtomicString customPropertyName) const; | 66 const CSSValue* getPropertyCSSValue(AtomicString customPropertyName) const; |
| 67 std::unique_ptr<HashMap<AtomicString, RefPtr<CSSVariableData>>> getVariables() | 67 std::unique_ptr<HashMap<AtomicString, RefPtr<CSSVariableData>>> getVariables() |
| 68 const; | 68 const; |
| 69 | 69 |
| 70 const CSSValue* getFontSizeCSSValuePreferringKeyword() const; | 70 const CSSValue* getFontSizeCSSValuePreferringKeyword() const; |
| 71 bool isMonospaceFont() const; | 71 bool isMonospaceFont() const; |
| 72 | 72 |
| 73 MutableStylePropertySet* copyPropertiesInSet( | 73 MutableStylePropertySet* copyPropertiesInSet( |
| 74 const Vector<CSSPropertyID>&) const; | 74 const Vector<CSSPropertyID>&) const; |
| 75 | 75 |
| 76 // CSSOM functions. |
| 77 unsigned length() const override; |
| 78 String item(unsigned index) const override; |
| 79 const CSSValue* getPropertyCSSValueInternal( |
| 80 AtomicString customPropertyName) override; |
| 81 |
| 76 DECLARE_VIRTUAL_TRACE(); | 82 DECLARE_VIRTUAL_TRACE(); |
| 77 | 83 |
| 78 private: | 84 private: |
| 79 CSSComputedStyleDeclaration(Node*, bool allowVisitedStyle, const String&); | 85 CSSComputedStyleDeclaration(Node*, bool allowVisitedStyle, const String&); |
| 80 | 86 |
| 81 // The styled node is either the node passed into getComputedStyle, or the | 87 // The styled node is either the node passed into getComputedStyle, or the |
| 82 // PseudoElement for :before and :after if they exist. | 88 // PseudoElement for :before and :after if they exist. |
| 83 // FIXME: This should be styledElement since in JS getComputedStyle only works | 89 // FIXME: This should be styledElement since in JS getComputedStyle only works |
| 84 // on Elements, but right now editing creates these for text nodes. We should | 90 // on Elements, but right now editing creates these for text nodes. We should |
| 85 // fix that. | 91 // fix that. |
| 86 Node* styledNode() const; | 92 Node* styledNode() const; |
| 87 | 93 |
| 88 // CSSOM functions. Don't make these public. | 94 // CSSOM functions. |
| 89 CSSRule* parentRule() const override; | 95 CSSRule* parentRule() const override; |
| 90 unsigned length() const override; | |
| 91 String item(unsigned index) const override; | |
| 92 const ComputedStyle* computeComputedStyle() const; | 96 const ComputedStyle* computeComputedStyle() const; |
| 93 String getPropertyValue(const String& propertyName) override; | 97 String getPropertyValue(const String& propertyName) override; |
| 94 String getPropertyPriority(const String& propertyName) override; | 98 String getPropertyPriority(const String& propertyName) override; |
| 95 String getPropertyShorthand(const String& propertyName) override; | 99 String getPropertyShorthand(const String& propertyName) override; |
| 96 bool isPropertyImplicit(const String& propertyName) override; | 100 bool isPropertyImplicit(const String& propertyName) override; |
| 97 void setProperty(const String& propertyName, | 101 void setProperty(const String& propertyName, |
| 98 const String& value, | 102 const String& value, |
| 99 const String& priority, | 103 const String& priority, |
| 100 ExceptionState&) override; | 104 ExceptionState&) override; |
| 101 String removeProperty(const String& propertyName, ExceptionState&) override; | 105 String removeProperty(const String& propertyName, ExceptionState&) override; |
| 102 String cssFloat() const; | 106 String cssFloat() const; |
| 103 void setCSSFloat(const String&, ExceptionState&); | 107 void setCSSFloat(const String&, ExceptionState&); |
| 104 String cssText() const override; | 108 String cssText() const override; |
| 105 void setCSSText(const String&, ExceptionState&) override; | 109 void setCSSText(const String&, ExceptionState&) override; |
| 106 const CSSValue* getPropertyCSSValueInternal(CSSPropertyID) override; | 110 const CSSValue* getPropertyCSSValueInternal(CSSPropertyID) override; |
| 107 const CSSValue* getPropertyCSSValueInternal( | |
| 108 AtomicString customPropertyName) override; | |
| 109 String getPropertyValueInternal(CSSPropertyID) override; | 111 String getPropertyValueInternal(CSSPropertyID) override; |
| 110 void setPropertyInternal(CSSPropertyID, | 112 void setPropertyInternal(CSSPropertyID, |
| 111 const String& customPropertyName, | 113 const String& customPropertyName, |
| 112 const String& value, | 114 const String& value, |
| 113 bool important, | 115 bool important, |
| 114 ExceptionState&) override; | 116 ExceptionState&) override; |
| 115 | 117 |
| 116 bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const override; | 118 bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const override; |
| 117 | 119 |
| 118 Member<Node> m_node; | 120 Member<Node> m_node; |
| 119 PseudoId m_pseudoElementSpecifier; | 121 PseudoId m_pseudoElementSpecifier; |
| 120 bool m_allowVisitedStyle; | 122 bool m_allowVisitedStyle; |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 } // namespace blink | 125 } // namespace blink |
| 124 | 126 |
| 125 #endif // CSSComputedStyleDeclaration_h | 127 #endif // CSSComputedStyleDeclaration_h |
| OLD | NEW |