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