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

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

Issue 884753003: Fix template angle bracket syntax in inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Some more fixes Created 5 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
« 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class CSSStyleDeclaration; 45 class CSSStyleDeclaration;
46 class CSSStyleRule; 46 class CSSStyleRule;
47 class CSSStyleSheet; 47 class CSSStyleSheet;
48 class Document; 48 class Document;
49 class Element; 49 class Element;
50 class ExceptionState; 50 class ExceptionState;
51 class InspectorPageAgent; 51 class InspectorPageAgent;
52 class InspectorResourceAgent; 52 class InspectorResourceAgent;
53 class InspectorStyleSheetBase; 53 class InspectorStyleSheetBase;
54 54
55 typedef WillBeHeapVector<RefPtrWillBeMember<CSSRule> > CSSRuleVector; 55 typedef WillBeHeapVector<RefPtrWillBeMember<CSSRule>> CSSRuleVector;
56 typedef String ErrorString; 56 typedef String ErrorString;
57 typedef Vector<unsigned> LineEndings; 57 typedef Vector<unsigned> LineEndings;
58 58
59 class InspectorCSSId { 59 class InspectorCSSId {
60 public: 60 public:
61 InspectorCSSId() 61 InspectorCSSId()
62 : m_ordinal(0) 62 : m_ordinal(0)
63 { 63 {
64 } 64 }
65 65
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 bool hasSource; 102 bool hasSource;
103 String rawText; 103 String rawText;
104 }; 104 };
105 105
106 class InspectorStyle final : public RefCountedWillBeGarbageCollectedFinalized<In spectorStyle> { 106 class InspectorStyle final : public RefCountedWillBeGarbageCollectedFinalized<In spectorStyle> {
107 public: 107 public:
108 static PassRefPtrWillBeRawPtr<InspectorStyle> create(const InspectorCSSId&, PassRefPtrWillBeRawPtr<CSSStyleDeclaration>, InspectorStyleSheetBase* parentStyl eSheet); 108 static PassRefPtrWillBeRawPtr<InspectorStyle> create(const InspectorCSSId&, PassRefPtrWillBeRawPtr<CSSStyleDeclaration>, InspectorStyleSheetBase* parentStyl eSheet);
109 109
110 CSSStyleDeclaration* cssStyle() const { return m_style.get(); } 110 CSSStyleDeclaration* cssStyle() const { return m_style.get(); }
111 PassRefPtr<TypeBuilder::CSS::CSSStyle> buildObjectForStyle() const; 111 PassRefPtr<TypeBuilder::CSS::CSSStyle> buildObjectForStyle() const;
112 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty> > buildArrayForComputedStyle() const; 112 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty>> b uildArrayForComputedStyle() const;
113 bool setPropertyText(unsigned index, const String& text, bool overwrite, Exc eptionState&); 113 bool setPropertyText(unsigned index, const String& text, bool overwrite, Exc eptionState&);
114 bool styleText(String* result) const; 114 bool styleText(String* result) const;
115 bool textForRange(const SourceRange&, String* result) const; 115 bool textForRange(const SourceRange&, String* result) const;
116 116
117 void trace(Visitor*); 117 void trace(Visitor*);
118 118
119 private: 119 private:
120 InspectorStyle(const InspectorCSSId&, PassRefPtrWillBeRawPtr<CSSStyleDeclara tion>, InspectorStyleSheetBase* parentStyleSheet); 120 InspectorStyle(const InspectorCSSId&, PassRefPtrWillBeRawPtr<CSSStyleDeclara tion>, InspectorStyleSheetBase* parentStyleSheet);
121 121
122 bool verifyPropertyText(const String& propertyText, bool canOmitSemicolon); 122 bool verifyPropertyText(const String& propertyText, bool canOmitSemicolon);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 String ruleSelector(const InspectorCSSId&, ExceptionState&); 201 String ruleSelector(const InspectorCSSId&, ExceptionState&);
202 bool setRuleSelector(const InspectorCSSId&, const String& selector, Exceptio nState&); 202 bool setRuleSelector(const InspectorCSSId&, const String& selector, Exceptio nState&);
203 String mediaRuleText(const InspectorCSSId&, ExceptionState&); 203 String mediaRuleText(const InspectorCSSId&, ExceptionState&);
204 bool setMediaRuleText(const InspectorCSSId&, const String& text, ExceptionSt ate&); 204 bool setMediaRuleText(const InspectorCSSId&, const String& text, ExceptionSt ate&);
205 CSSStyleRule* addRule(const String& ruleText, const SourceRange& location, E xceptionState&); 205 CSSStyleRule* addRule(const String& ruleText, const SourceRange& location, E xceptionState&);
206 bool deleteRule(const InspectorCSSId&, const String& oldText, ExceptionState &); 206 bool deleteRule(const InspectorCSSId&, const String& oldText, ExceptionState &);
207 207
208 CSSStyleSheet* pageStyleSheet() const { return m_pageStyleSheet.get(); } 208 CSSStyleSheet* pageStyleSheet() const { return m_pageStyleSheet.get(); }
209 209
210 PassRefPtr<TypeBuilder::CSS::CSSStyleSheetHeader> buildObjectForStyleSheetIn fo() const; 210 PassRefPtr<TypeBuilder::CSS::CSSStyleSheetHeader> buildObjectForStyleSheetIn fo() const;
211 PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*, Pass RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> >); 211 PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*, Pass RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia>>);
212 212
213 PassRefPtr<TypeBuilder::CSS::SourceRange> ruleHeaderSourceRange(const CSSRul e*); 213 PassRefPtr<TypeBuilder::CSS::SourceRange> ruleHeaderSourceRange(const CSSRul e*);
214 PassRefPtr<TypeBuilder::CSS::SourceRange> mediaQueryExpValueSourceRange(cons t CSSRule*, size_t mediaQueryIndex, size_t mediaQueryExpIndex); 214 PassRefPtr<TypeBuilder::CSS::SourceRange> mediaQueryExpValueSourceRange(cons t CSSRule*, size_t mediaQueryIndex, size_t mediaQueryExpIndex);
215 215
216 InspectorCSSId ruleId(CSSStyleRule*) const; 216 InspectorCSSId ruleId(CSSStyleRule*) const;
217 CSSStyleRule* ruleForId(const InspectorCSSId&) const; 217 CSSStyleRule* ruleForId(const InspectorCSSId&) const;
218 CSSMediaRule* mediaRuleForId(const InspectorCSSId&) const; 218 CSSMediaRule* mediaRuleForId(const InspectorCSSId&) const;
219 219
220 virtual InspectorCSSId styleId(CSSStyleDeclaration*) const override; 220 virtual InspectorCSSId styleId(CSSStyleDeclaration*) const override;
221 virtual CSSStyleDeclaration* styleForId(const InspectorCSSId&) const overrid e; 221 virtual CSSStyleDeclaration* styleForId(const InspectorCSSId&) const overrid e;
(...skipping 23 matching lines...) Expand all
245 bool verifyMediaText(const String& mediaText); 245 bool verifyMediaText(const String& mediaText);
246 unsigned ruleIndexByStyle(CSSStyleDeclaration*) const; 246 unsigned ruleIndexByStyle(CSSStyleDeclaration*) const;
247 String sourceMapURL() const; 247 String sourceMapURL() const;
248 String sourceURL() const; 248 String sourceURL() const;
249 bool ensureText() const; 249 bool ensureText() const;
250 void ensureFlatRules() const; 250 void ensureFlatRules() const;
251 bool styleSheetTextWithChangedStyle(CSSStyleDeclaration*, const String& newS tyleText, String* result); 251 bool styleSheetTextWithChangedStyle(CSSStyleDeclaration*, const String& newS tyleText, String* result);
252 bool originalStyleSheetText(String* result) const; 252 bool originalStyleSheetText(String* result) const;
253 bool resourceStyleSheetText(String* result) const; 253 bool resourceStyleSheetText(String* result) const;
254 bool inlineStyleSheetText(String* result) const; 254 bool inlineStyleSheetText(String* result) const;
255 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Selector> > selectorsFromSou rce(const CSSRuleSourceData*, const String&); 255 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Selector>> selectorsFromSour ce(const CSSRuleSourceData*, const String&);
256 PassRefPtr<TypeBuilder::CSS::SelectorList> buildObjectForSelectorList(CSSSty leRule*); 256 PassRefPtr<TypeBuilder::CSS::SelectorList> buildObjectForSelectorList(CSSSty leRule*);
257 String url() const; 257 String url() const;
258 bool hasSourceURL() const; 258 bool hasSourceURL() const;
259 bool startsAtZero() const; 259 bool startsAtZero() const;
260 260
261 void updateText(const String& newText); 261 void updateText(const String& newText);
262 Element* ownerStyleElement() const; 262 Element* ownerStyleElement() const;
263 263
264 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; 264 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent;
265 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent; 265 RawPtrWillBeMember<InspectorResourceAgent> m_resourceAgent;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 mutable String m_styleText; 308 mutable String m_styleText;
309 mutable bool m_isStyleTextValid; 309 mutable bool m_isStyleTextValid;
310 }; 310 };
311 311
312 312
313 } // namespace blink 313 } // namespace blink
314 314
315 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::InspectorStyleProperty); 315 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::InspectorStyleProperty);
316 316
317 #endif // !defined(InspectorStyleSheet_h) 317 #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