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

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

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #if !ENABLE(OILPAN) 55 #if !ENABLE(OILPAN)
56 virtual void ref() override; 56 virtual void ref() override;
57 virtual void deref() override; 57 virtual void deref() override;
58 #endif 58 #endif
59 59
60 String getPropertyValue(CSSPropertyID) const; 60 String getPropertyValue(CSSPropertyID) const;
61 bool getPropertyPriority(CSSPropertyID) const; 61 bool getPropertyPriority(CSSPropertyID) const;
62 62
63 PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() const; 63 PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() const;
64 64
65 PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const; 65 NullableCSSValue getPropertyCSSValue(CSSPropertyID) const;
66 PassRefPtrWillBeRawPtr<CSSValue> getFontSizeCSSValuePreferringKeyword() cons t; 66 NullableCSSValue getFontSizeCSSValuePreferringKeyword() const;
67 bool isMonospaceFont() const; 67 bool isMonospaceFont() const;
68 68
69 PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyPropertiesInSet(const Ve ctor<CSSPropertyID>&) const; 69 PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyPropertiesInSet(const Ve ctor<CSSPropertyID>&) const;
70 70
71 DECLARE_VIRTUAL_TRACE(); 71 DECLARE_VIRTUAL_TRACE();
72 72
73 private: 73 private:
74 CSSComputedStyleDeclaration(PassRefPtrWillBeRawPtr<Node>, bool allowVisitedS tyle, const String&); 74 CSSComputedStyleDeclaration(PassRefPtrWillBeRawPtr<Node>, bool allowVisitedS tyle, const String&);
75 75
76 // The styled node is either the node passed into getComputedStyle, or the 76 // The styled node is either the node passed into getComputedStyle, or the
77 // PseudoElement for :before and :after if they exist. 77 // PseudoElement for :before and :after if they exist.
78 // FIXME: This should be styledElement since in JS getComputedStyle only wor ks 78 // FIXME: This should be styledElement since in JS getComputedStyle only wor ks
79 // on Elements, but right now editing creates these for text nodes. We shoul d fix 79 // on Elements, but right now editing creates these for text nodes. We shoul d fix
80 // that. 80 // that.
81 Node* styledNode() const; 81 Node* styledNode() const;
82 82
83 // CSSOM functions. Don't make these public. 83 // CSSOM functions. Don't make these public.
84 virtual CSSRule* parentRule() const override; 84 virtual CSSRule* parentRule() const override;
85 virtual unsigned length() const override; 85 virtual unsigned length() const override;
86 virtual String item(unsigned index) const override; 86 virtual String item(unsigned index) const override;
87 const ComputedStyle* computeComputedStyle() const; 87 const ComputedStyle* computeComputedStyle() const;
88 virtual String getPropertyValue(const String& propertyName) override; 88 virtual String getPropertyValue(const String& propertyName) override;
89 virtual String getPropertyPriority(const String& propertyName) override; 89 virtual String getPropertyPriority(const String& propertyName) override;
90 virtual String getPropertyShorthand(const String& propertyName) override; 90 virtual String getPropertyShorthand(const String& propertyName) override;
91 virtual bool isPropertyImplicit(const String& propertyName) override; 91 virtual bool isPropertyImplicit(const String& propertyName) override;
92 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) override; 92 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) override;
93 virtual String removeProperty(const String& propertyName, ExceptionState&) o verride; 93 virtual String removeProperty(const String& propertyName, ExceptionState&) o verride;
94 virtual String cssText() const override; 94 virtual String cssText() const override;
95 virtual void setCSSText(const String&, ExceptionState&) override; 95 virtual void setCSSText(const String&, ExceptionState&) override;
96 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSProp ertyID) override; 96 virtual NullableCSSValue getPropertyCSSValueInternal(CSSPropertyID) override ;
97 virtual String getPropertyValueInternal(CSSPropertyID) override; 97 virtual String getPropertyValueInternal(CSSPropertyID) override;
98 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) override; 98 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) override;
99 99
100 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const overri de; 100 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue) const overrid e;
101 101
102 RefPtrWillBeMember<Node> m_node; 102 RefPtrWillBeMember<Node> m_node;
103 PseudoId m_pseudoElementSpecifier; 103 PseudoId m_pseudoElementSpecifier;
104 bool m_allowVisitedStyle; 104 bool m_allowVisitedStyle;
105 #if !ENABLE(OILPAN) 105 #if !ENABLE(OILPAN)
106 unsigned m_refCount; 106 unsigned m_refCount;
107 #endif 107 #endif
108 }; 108 };
109 109
110 } // namespace blink 110 } // namespace blink
111 111
112 #endif // CSSComputedStyleDeclaration_h 112 #endif // CSSComputedStyleDeclaration_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSCalculationValueTest.cpp ('k') | Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698