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

Side by Side Diff: Source/core/inspector/InspectorStyleSheet.h

Issue 1232333002: Fix virtual/override/final usage in the rest of Source/core/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorState.h ('k') | Source/core/inspector/InspectorStyleSheet.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) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 String m_id; 114 String m_id;
115 Listener* m_listener; 115 Listener* m_listener;
116 OwnPtr<LineEndings> m_lineEndings; 116 OwnPtr<LineEndings> m_lineEndings;
117 }; 117 };
118 118
119 class InspectorStyleSheet : public InspectorStyleSheetBase { 119 class InspectorStyleSheet : public InspectorStyleSheetBase {
120 public: 120 public:
121 static PassRefPtrWillBeRawPtr<InspectorStyleSheet> create(InspectorResourceA gent*, PassRefPtrWillBeRawPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::S tyleSheetOrigin::Enum, const String& documentURL, InspectorCSSAgent*); 121 static PassRefPtrWillBeRawPtr<InspectorStyleSheet> create(InspectorResourceA gent*, PassRefPtrWillBeRawPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::S tyleSheetOrigin::Enum, const String& documentURL, InspectorCSSAgent*);
122 122
123 virtual ~InspectorStyleSheet(); 123 ~InspectorStyleSheet() override;
124 DECLARE_VIRTUAL_TRACE(); 124 DECLARE_VIRTUAL_TRACE();
125 125
126 String finalURL(); 126 String finalURL();
127 virtual bool setText(const String&, ExceptionState&) override; 127 bool setText(const String&, ExceptionState&) override;
128 virtual bool getText(String* result) override; 128 bool getText(String* result) override;
129 RefPtrWillBeRawPtr<CSSStyleRule> setRuleSelector(const SourceRange&, const String& selector, SourceRange* newRange, String* oldSelector, ExceptionState&); 129 RefPtrWillBeRawPtr<CSSStyleRule> setRuleSelector(const SourceRange&, const String& selector, SourceRange* newRange, String* oldSelector, ExceptionState&);
130 RefPtrWillBeRawPtr<CSSStyleRule> setStyleText(const SourceRange&, const Str ing& text, SourceRange* newRange, String* oldSelector, ExceptionState&); 130 RefPtrWillBeRawPtr<CSSStyleRule> setStyleText(const SourceRange&, const Str ing& text, SourceRange* newRange, String* oldSelector, ExceptionState&);
131 RefPtrWillBeRawPtr<CSSMediaRule> setMediaRuleText(const SourceRange&, const String& selector, SourceRange* newRange, String* oldSelector, ExceptionState&); 131 RefPtrWillBeRawPtr<CSSMediaRule> setMediaRuleText(const SourceRange&, const String& selector, SourceRange* newRange, String* oldSelector, ExceptionState&);
132 RefPtrWillBeRawPtr<CSSStyleRule> addRule(const String& ruleText, const Sour ceRange& location, SourceRange* addedRange, ExceptionState&); 132 RefPtrWillBeRawPtr<CSSStyleRule> addRule(const String& ruleText, const Sour ceRange& location, SourceRange* addedRange, ExceptionState&);
133 bool deleteRule(const SourceRange&, ExceptionState&); 133 bool deleteRule(const SourceRange&, ExceptionState&);
134 134
135 CSSStyleSheet* pageStyleSheet() { return m_pageStyleSheet.get(); } 135 CSSStyleSheet* pageStyleSheet() { return m_pageStyleSheet.get(); }
136 136
137 PassRefPtr<TypeBuilder::CSS::CSSStyleSheetHeader> buildObjectForStyleSheetIn fo(); 137 PassRefPtr<TypeBuilder::CSS::CSSStyleSheetHeader> buildObjectForStyleSheetIn fo();
138 PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*, Pass RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> >); 138 PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*, Pass RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> >);
139 139
140 PassRefPtr<TypeBuilder::CSS::SourceRange> ruleHeaderSourceRange(CSSRule*); 140 PassRefPtr<TypeBuilder::CSS::SourceRange> ruleHeaderSourceRange(CSSRule*);
141 PassRefPtr<TypeBuilder::CSS::SourceRange> mediaQueryExpValueSourceRange(CSSR ule*, size_t mediaQueryIndex, size_t mediaQueryExpIndex); 141 PassRefPtr<TypeBuilder::CSS::SourceRange> mediaQueryExpValueSourceRange(CSSR ule*, size_t mediaQueryIndex, size_t mediaQueryExpIndex);
142 142
143 bool isInlineStyle() override { return false; } 143 bool isInlineStyle() override { return false; }
144 const CSSRuleVector& flatRules(); 144 const CSSRuleVector& flatRules();
145 RefPtrWillBeRawPtr<CSSRuleSourceData> sourceDataForRule(RefPtrWillBeRawPtr<C SSRule>); 145 RefPtrWillBeRawPtr<CSSRuleSourceData> sourceDataForRule(RefPtrWillBeRawPtr<C SSRule>);
146 146
147 protected: 147 protected:
148 virtual PassRefPtrWillBeRawPtr<InspectorStyle> inspectorStyle(RefPtrWillBeRa wPtr<CSSStyleDeclaration>) override; 148 PassRefPtrWillBeRawPtr<InspectorStyle> inspectorStyle(RefPtrWillBeRawPtr<CSS StyleDeclaration>) override;
149 149
150 private: 150 private:
151 InspectorStyleSheet(InspectorResourceAgent*, PassRefPtrWillBeRawPtr<CSSStyle Sheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enum, const String& d ocumentURL, InspectorCSSAgent*); 151 InspectorStyleSheet(InspectorResourceAgent*, PassRefPtrWillBeRawPtr<CSSStyle Sheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enum, const String& d ocumentURL, InspectorCSSAgent*);
152 RefPtrWillBeRawPtr<CSSRuleSourceData> ruleSourceDataAfterSourceRange(const S ourceRange&); 152 RefPtrWillBeRawPtr<CSSRuleSourceData> ruleSourceDataAfterSourceRange(const S ourceRange&);
153 RefPtrWillBeRawPtr<CSSRuleSourceData> findRuleByHeaderRange(const SourceRang e&); 153 RefPtrWillBeRawPtr<CSSRuleSourceData> findRuleByHeaderRange(const SourceRang e&);
154 RefPtrWillBeRawPtr<CSSRuleSourceData> findRuleByBodyRange(const SourceRange& ); 154 RefPtrWillBeRawPtr<CSSRuleSourceData> findRuleByBodyRange(const SourceRange& );
155 RefPtrWillBeRawPtr<CSSRule> ruleForSourceData(RefPtrWillBeRawPtr<CSSRuleSour ceData>); 155 RefPtrWillBeRawPtr<CSSRule> ruleForSourceData(RefPtrWillBeRawPtr<CSSRuleSour ceData>);
156 CSSStyleRule* insertCSSOMRuleInStyleSheet(CSSRule* insertBefore, const Strin g& ruleText, ExceptionState&); 156 CSSStyleRule* insertCSSOMRuleInStyleSheet(CSSRule* insertBefore, const Strin g& ruleText, ExceptionState&);
157 CSSStyleRule* insertCSSOMRuleInMediaRule(CSSMediaRule*, CSSRule* insertBefor e, const String& ruleText, ExceptionState&); 157 CSSStyleRule* insertCSSOMRuleInMediaRule(CSSMediaRule*, CSSRule* insertBefor e, const String& ruleText, ExceptionState&);
158 CSSStyleRule* insertCSSOMRuleBySourceRange(const SourceRange&, const String& ruleText, ExceptionState&); 158 CSSStyleRule* insertCSSOMRuleBySourceRange(const SourceRange&, const String& ruleText, ExceptionState&);
(...skipping 26 matching lines...) Expand all
185 IndexMap m_ruleToSourceData; 185 IndexMap m_ruleToSourceData;
186 IndexMap m_sourceDataToRule; 186 IndexMap m_sourceDataToRule;
187 String m_sourceURL; 187 String m_sourceURL;
188 }; 188 };
189 189
190 class InspectorStyleSheetForInlineStyle final : public InspectorStyleSheetBase { 190 class InspectorStyleSheetForInlineStyle final : public InspectorStyleSheetBase {
191 public: 191 public:
192 static PassRefPtrWillBeRawPtr<InspectorStyleSheetForInlineStyle> create(Pass RefPtrWillBeRawPtr<Element>, Listener*); 192 static PassRefPtrWillBeRawPtr<InspectorStyleSheetForInlineStyle> create(Pass RefPtrWillBeRawPtr<Element>, Listener*);
193 193
194 void didModifyElementAttribute(); 194 void didModifyElementAttribute();
195 virtual bool setText(const String&, ExceptionState&) override; 195 bool setText(const String&, ExceptionState&) override;
196 virtual bool getText(String* result) override; 196 bool getText(String* result) override;
197 CSSStyleDeclaration* inlineStyle(); 197 CSSStyleDeclaration* inlineStyle();
198 RefPtrWillBeRawPtr<CSSRuleSourceData> ruleSourceData(); 198 RefPtrWillBeRawPtr<CSSRuleSourceData> ruleSourceData();
199 199
200 DECLARE_VIRTUAL_TRACE(); 200 DECLARE_VIRTUAL_TRACE();
201 201
202 protected: 202 protected:
203 virtual PassRefPtrWillBeRawPtr<InspectorStyle> inspectorStyle(RefPtrWillBeRa wPtr<CSSStyleDeclaration>) override; 203 PassRefPtrWillBeRawPtr<InspectorStyle> inspectorStyle(RefPtrWillBeRawPtr<CSS StyleDeclaration>) override;
204 204
205 // Also accessed by friend class InspectorStyle. 205 // Also accessed by friend class InspectorStyle.
206 bool isInlineStyle() override { return true; } 206 bool isInlineStyle() override { return true; }
207 207
208 private: 208 private:
209 InspectorStyleSheetForInlineStyle(PassRefPtrWillBeRawPtr<Element>, Listener* ); 209 InspectorStyleSheetForInlineStyle(PassRefPtrWillBeRawPtr<Element>, Listener* );
210 const String& elementStyleText(); 210 const String& elementStyleText();
211 211
212 RefPtrWillBeMember<Element> m_element; 212 RefPtrWillBeMember<Element> m_element;
213 RefPtrWillBeMember<InspectorStyle> m_inspectorStyle; 213 RefPtrWillBeMember<InspectorStyle> m_inspectorStyle;
214 }; 214 };
215 215
216 } // namespace blink 216 } // namespace blink
217 217
218 #endif // !defined(InspectorStyleSheet_h) 218 #endif // !defined(InspectorStyleSheet_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorState.h ('k') | Source/core/inspector/InspectorStyleSheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698