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

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

Issue 717933002: Clean up after getPropertyCSSValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase / fix debug compile? Created 6 years, 1 month 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
« no previous file with comments | « Source/core/css/Counter.idl ('k') | Source/core/css/PropertySetCSSStyleDeclaration.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 public: 43 public:
44 virtual Element* parentElement() const { return 0; } 44 virtual Element* parentElement() const { return 0; }
45 StyleSheetContents* contextStyleSheet() const; 45 StyleSheetContents* contextStyleSheet() const;
46 46
47 virtual void trace(Visitor*) override; 47 virtual void trace(Visitor*) override;
48 48
49 private: 49 private:
50 virtual CSSRule* parentRule() const override { return 0; } 50 virtual CSSRule* parentRule() const override { return 0; }
51 virtual unsigned length() const override final; 51 virtual unsigned length() const override final;
52 virtual String item(unsigned index) const override final; 52 virtual String item(unsigned index) const override final;
53 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(const String& p ropertyName) override final;
54 virtual String getPropertyValue(const String& propertyName) override final; 53 virtual String getPropertyValue(const String& propertyName) override final;
55 virtual String getPropertyPriority(const String& propertyName) override fina l; 54 virtual String getPropertyPriority(const String& propertyName) override fina l;
56 virtual String getPropertyShorthand(const String& propertyName) override fin al; 55 virtual String getPropertyShorthand(const String& propertyName) override fin al;
57 virtual bool isPropertyImplicit(const String& propertyName) override final; 56 virtual bool isPropertyImplicit(const String& propertyName) override final;
58 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) override final; 57 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) override final;
59 virtual String removeProperty(const String& propertyName, ExceptionState&) o verride final; 58 virtual String removeProperty(const String& propertyName, ExceptionState&) o verride final;
60 virtual String cssText() const override final; 59 virtual String cssText() const override final;
61 virtual void setCSSText(const String&, ExceptionState&) override final; 60 virtual void setCSSText(const String&, ExceptionState&) override final;
62 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSProp ertyID) override final; 61 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSProp ertyID) override final;
63 virtual String getPropertyValueInternal(CSSPropertyID) override final; 62 virtual String getPropertyValueInternal(CSSPropertyID) override final;
64 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) override final; 63 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) override final;
65 64
66 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const overri de final; 65 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const overri de final;
67 virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con st override final; 66 virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con st override final;
68 67
69 CSSValue* cloneAndCacheForCSSOM(CSSValue*);
70
71 protected: 68 protected:
72 enum MutationType { NoChanges, PropertyChanged }; 69 enum MutationType { NoChanges, PropertyChanged };
73 virtual void willMutate() { } 70 virtual void willMutate() { }
74 virtual void didMutate(MutationType) { } 71 virtual void didMutate(MutationType) { }
75 virtual MutableStylePropertySet& propertySet() const = 0; 72 virtual MutableStylePropertySet& propertySet() const = 0;
76
77 OwnPtrWillBeMember<WillBeHeapHashMap<RawPtrWillBeMember<CSSValue>, RefPtrWil lBeMember<CSSValue> > > m_cssomCSSValueClones;
78 }; 73 };
79 74
80 class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclara tion { 75 class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclara tion {
81 public: 76 public:
82 PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_pro pertySet(&propertySet) { } 77 PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_pro pertySet(&propertySet) { }
83 78
84 #if !ENABLE(OILPAN) 79 #if !ENABLE(OILPAN)
85 virtual void ref() override; 80 virtual void ref() override;
86 virtual void deref() override; 81 virtual void deref() override;
87 #endif 82 #endif
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 virtual Element* parentElement() const override { return m_parentElement; } 145 virtual Element* parentElement() const override { return m_parentElement; }
151 146
152 virtual void didMutate(MutationType) override; 147 virtual void didMutate(MutationType) override;
153 148
154 RawPtrWillBeMember<Element> m_parentElement; 149 RawPtrWillBeMember<Element> m_parentElement;
155 }; 150 };
156 151
157 } // namespace blink 152 } // namespace blink
158 153
159 #endif 154 #endif
OLDNEW
« no previous file with comments | « Source/core/css/Counter.idl ('k') | Source/core/css/PropertySetCSSStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698