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

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

Issue 640593002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/[css|rendering|clipboard] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased the patch Created 6 years, 2 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
« no previous file with comments | « Source/core/css/Pair.h ('k') | Source/core/css/RemoteFontFaceSource.h » ('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 26 matching lines...) Expand all
37 class Element; 37 class Element;
38 class ExceptionState; 38 class ExceptionState;
39 class MutableStylePropertySet; 39 class MutableStylePropertySet;
40 class StyleSheetContents; 40 class StyleSheetContents;
41 41
42 class AbstractPropertySetCSSStyleDeclaration : public CSSStyleDeclaration { 42 class AbstractPropertySetCSSStyleDeclaration : public CSSStyleDeclaration {
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; 53 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(const String& p ropertyName) override final;
54 virtual String getPropertyValue(const String& propertyName) OVERRIDE FINAL; 54 virtual String getPropertyValue(const String& propertyName) override final;
55 virtual String getPropertyPriority(const String& propertyName) OVERRIDE FINA L; 55 virtual String getPropertyPriority(const String& propertyName) override fina l;
56 virtual String getPropertyShorthand(const String& propertyName) OVERRIDE FIN AL; 56 virtual String getPropertyShorthand(const String& propertyName) override fin al;
57 virtual bool isPropertyImplicit(const String& propertyName) OVERRIDE FINAL; 57 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; 58 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; 59 virtual String removeProperty(const String& propertyName, ExceptionState&) o verride final;
60 virtual String cssText() const OVERRIDE FINAL; 60 virtual String cssText() const override final;
61 virtual void setCSSText(const String&, ExceptionState&) OVERRIDE FINAL; 61 virtual void setCSSText(const String&, ExceptionState&) override final;
62 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSProp ertyID) OVERRIDE FINAL; 62 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSProp ertyID) override final;
63 virtual String getPropertyValueInternal(CSSPropertyID) OVERRIDE FINAL; 63 virtual String getPropertyValueInternal(CSSPropertyID) override final;
64 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) OVERRIDE FINAL; 64 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) override final;
65 65
66 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI DE FINAL; 66 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const overri de final;
67 virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con st OVERRIDE FINAL; 67 virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con st override final;
68 68
69 CSSValue* cloneAndCacheForCSSOM(CSSValue*); 69 CSSValue* cloneAndCacheForCSSOM(CSSValue*);
70 70
71 protected: 71 protected:
72 enum MutationType { NoChanges, PropertyChanged }; 72 enum MutationType { NoChanges, PropertyChanged };
73 virtual void willMutate() { } 73 virtual void willMutate() { }
74 virtual void didMutate(MutationType) { } 74 virtual void didMutate(MutationType) { }
75 virtual MutableStylePropertySet& propertySet() const = 0; 75 virtual MutableStylePropertySet& propertySet() const = 0;
76 76
77 OwnPtrWillBeMember<WillBeHeapHashMap<RawPtrWillBeMember<CSSValue>, RefPtrWil lBeMember<CSSValue> > > m_cssomCSSValueClones; 77 OwnPtrWillBeMember<WillBeHeapHashMap<RawPtrWillBeMember<CSSValue>, RefPtrWil lBeMember<CSSValue> > > m_cssomCSSValueClones;
78 }; 78 };
79 79
80 class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclara tion { 80 class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclara tion {
81 public: 81 public:
82 PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_pro pertySet(&propertySet) { } 82 PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_pro pertySet(&propertySet) { }
83 83
84 #if !ENABLE(OILPAN) 84 #if !ENABLE(OILPAN)
85 virtual void ref() OVERRIDE; 85 virtual void ref() override;
86 virtual void deref() OVERRIDE; 86 virtual void deref() override;
87 #endif 87 #endif
88 88
89 virtual void trace(Visitor*) OVERRIDE; 89 virtual void trace(Visitor*) override;
90 90
91 protected: 91 protected:
92 virtual MutableStylePropertySet& propertySet() const OVERRIDE FINAL { ASSERT (m_propertySet); return *m_propertySet; } 92 virtual MutableStylePropertySet& propertySet() const override final { ASSERT (m_propertySet); return *m_propertySet; }
93 93
94 RawPtrWillBeMember<MutableStylePropertySet> m_propertySet; // Cannot be null 94 RawPtrWillBeMember<MutableStylePropertySet> m_propertySet; // Cannot be null
95 }; 95 };
96 96
97 class StyleRuleCSSStyleDeclaration FINAL : public PropertySetCSSStyleDeclaration 97 class StyleRuleCSSStyleDeclaration final : public PropertySetCSSStyleDeclaration
98 { 98 {
99 public: 99 public:
100 static PassRefPtrWillBeRawPtr<StyleRuleCSSStyleDeclaration> create(MutableSt ylePropertySet& propertySet, CSSRule* parentRule) 100 static PassRefPtrWillBeRawPtr<StyleRuleCSSStyleDeclaration> create(MutableSt ylePropertySet& propertySet, CSSRule* parentRule)
101 { 101 {
102 return adoptRefWillBeNoop(new StyleRuleCSSStyleDeclaration(propertySet, parentRule)); 102 return adoptRefWillBeNoop(new StyleRuleCSSStyleDeclaration(propertySet, parentRule));
103 } 103 }
104 104
105 #if !ENABLE(OILPAN) 105 #if !ENABLE(OILPAN)
106 void clearParentRule() { m_parentRule = nullptr; } 106 void clearParentRule() { m_parentRule = nullptr; }
107 107
108 virtual void ref() OVERRIDE; 108 virtual void ref() override;
109 virtual void deref() OVERRIDE; 109 virtual void deref() override;
110 #endif 110 #endif
111 111
112 void reattach(MutableStylePropertySet&); 112 void reattach(MutableStylePropertySet&);
113 113
114 virtual void trace(Visitor*) OVERRIDE; 114 virtual void trace(Visitor*) override;
115 115
116 private: 116 private:
117 StyleRuleCSSStyleDeclaration(MutableStylePropertySet&, CSSRule*); 117 StyleRuleCSSStyleDeclaration(MutableStylePropertySet&, CSSRule*);
118 virtual ~StyleRuleCSSStyleDeclaration(); 118 virtual ~StyleRuleCSSStyleDeclaration();
119 119
120 virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE; 120 virtual CSSStyleSheet* parentStyleSheet() const override;
121 121
122 virtual CSSRule* parentRule() const OVERRIDE { return m_parentRule; } 122 virtual CSSRule* parentRule() const override { return m_parentRule; }
123 123
124 virtual void willMutate() OVERRIDE; 124 virtual void willMutate() override;
125 virtual void didMutate(MutationType) OVERRIDE; 125 virtual void didMutate(MutationType) override;
126 126
127 #if !ENABLE(OILPAN) 127 #if !ENABLE(OILPAN)
128 unsigned m_refCount; 128 unsigned m_refCount;
129 #endif 129 #endif
130 RawPtrWillBeMember<CSSRule> m_parentRule; 130 RawPtrWillBeMember<CSSRule> m_parentRule;
131 }; 131 };
132 132
133 class InlineCSSStyleDeclaration FINAL : public AbstractPropertySetCSSStyleDeclar ation 133 class InlineCSSStyleDeclaration final : public AbstractPropertySetCSSStyleDeclar ation
134 { 134 {
135 public: 135 public:
136 explicit InlineCSSStyleDeclaration(Element* parentElement) 136 explicit InlineCSSStyleDeclaration(Element* parentElement)
137 : m_parentElement(parentElement) 137 : m_parentElement(parentElement)
138 { 138 {
139 } 139 }
140 140
141 virtual void trace(Visitor*) OVERRIDE; 141 virtual void trace(Visitor*) override;
142 142
143 private: 143 private:
144 virtual MutableStylePropertySet& propertySet() const OVERRIDE; 144 virtual MutableStylePropertySet& propertySet() const override;
145 #if !ENABLE(OILPAN) 145 #if !ENABLE(OILPAN)
146 virtual void ref() OVERRIDE; 146 virtual void ref() override;
147 virtual void deref() OVERRIDE; 147 virtual void deref() override;
148 #endif 148 #endif
149 virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE; 149 virtual CSSStyleSheet* parentStyleSheet() const override;
150 virtual Element* parentElement() const OVERRIDE { return m_parentElement; } 150 virtual Element* parentElement() const override { return m_parentElement; }
151 151
152 virtual void didMutate(MutationType) OVERRIDE; 152 virtual void didMutate(MutationType) override;
153 153
154 RawPtrWillBeMember<Element> m_parentElement; 154 RawPtrWillBeMember<Element> m_parentElement;
155 }; 155 };
156 156
157 } // namespace blink 157 } // namespace blink
158 158
159 #endif 159 #endif
OLDNEW
« no previous file with comments | « Source/core/css/Pair.h ('k') | Source/core/css/RemoteFontFaceSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698