Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.h

Issue 2403423002: [CSSTypedOM] Computed StylePropertyMap use ComputedStyle for Lengths (Closed)
Patch Set: Use StyleValueFactory & ComputedStyleCSSValueMapping for unsupported Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
69 DECLARE_VIRTUAL_TRACE(); 73 DECLARE_VIRTUAL_TRACE();
70 74
71 private: 75 private:
72 CSSComputedStyleDeclaration(Node*, bool allowVisitedStyle, const String&); 76 CSSComputedStyleDeclaration(Node*, bool allowVisitedStyle, const String&);
73 77
74 // The styled node is either the node passed into getComputedStyle, or the 78 // The styled node is either the node passed into getComputedStyle, or the
75 // PseudoElement for :before and :after if they exist. 79 // PseudoElement for :before and :after if they exist.
76 // FIXME: This should be styledElement since in JS getComputedStyle only works 80 // 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 81 // on Elements, but right now editing creates these for text nodes. We should
78 // fix that. 82 // fix that.
79 Node* styledNode() const; 83 Node* styledNode() const;
80 84
81 // CSSOM functions. Don't make these public. 85 // CSSOM functions.
82 CSSRule* parentRule() const override; 86 CSSRule* parentRule() const override;
83 unsigned length() const override;
84 String item(unsigned index) const override;
85 const ComputedStyle* computeComputedStyle() const; 87 const ComputedStyle* computeComputedStyle() const;
86 String getPropertyValue(const String& propertyName) override; 88 String getPropertyValue(const String& propertyName) override;
87 String getPropertyPriority(const String& propertyName) override; 89 String getPropertyPriority(const String& propertyName) override;
88 String getPropertyShorthand(const String& propertyName) override; 90 String getPropertyShorthand(const String& propertyName) override;
89 bool isPropertyImplicit(const String& propertyName) override; 91 bool isPropertyImplicit(const String& propertyName) override;
90 void setProperty(const String& propertyName, 92 void setProperty(const String& propertyName,
91 const String& value, 93 const String& value,
92 const String& priority, 94 const String& priority,
93 ExceptionState&) override; 95 ExceptionState&) override;
94 String removeProperty(const String& propertyName, ExceptionState&) override; 96 String removeProperty(const String& propertyName, ExceptionState&) override;
(...skipping 14 matching lines...) Expand all
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698