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

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

Issue 172593003: DevTools: [CSS] Add CSS.editRangeInStyleSheetText() to the protocol (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address vsevik comments Created 6 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 | Annotate | Revision Log
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 bool setPropertyText(const InspectorCSSId&, unsigned propertyIndex, const St ring& text, bool overwrite, String* oldPropertyText, ExceptionState&); 197 bool setPropertyText(const InspectorCSSId&, unsigned propertyIndex, const St ring& text, bool overwrite, String* oldPropertyText, ExceptionState&);
198 198
199 virtual TypeBuilder::CSS::StyleSheetOrigin::Enum origin() const { return m_o rigin; } 199 virtual TypeBuilder::CSS::StyleSheetOrigin::Enum origin() const { return m_o rigin; }
200 virtual bool getText(String* result) const; 200 virtual bool getText(String* result) const;
201 virtual CSSStyleDeclaration* styleForId(const InspectorCSSId&) const; 201 virtual CSSStyleDeclaration* styleForId(const InspectorCSSId&) const;
202 void fireStyleSheetChanged(); 202 void fireStyleSheetChanged();
203 PassRefPtr<TypeBuilder::CSS::SourceRange> ruleHeaderSourceRange(const CSSRul e*); 203 PassRefPtr<TypeBuilder::CSS::SourceRange> ruleHeaderSourceRange(const CSSRul e*);
204 204
205 InspectorCSSId ruleId(CSSStyleRule*) const; 205 InspectorCSSId ruleId(CSSStyleRule*) const;
206 InspectorCSSId styleId(CSSStyleDeclaration* style) const { return ruleOrStyl eId(style); } 206 InspectorCSSId styleId(CSSStyleDeclaration* style) const { return ruleOrStyl eId(style); }
207 bool lineNumberAndColumnToOffset(unsigned lineNumber, unsigned columnNumber, unsigned* offset) const;
207 208
208 protected: 209 protected:
209 InspectorStyleSheet(InspectorPageAgent*, InspectorResourceAgent*, const Stri ng& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOr igin::Enum, const String& documentURL, Listener*); 210 InspectorStyleSheet(InspectorPageAgent*, InspectorResourceAgent*, const Stri ng& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOr igin::Enum, const String& documentURL, Listener*);
210 211
211 InspectorCSSId ruleOrStyleId(CSSStyleDeclaration* style) const; 212 InspectorCSSId ruleOrStyleId(CSSStyleDeclaration* style) const;
212 virtual PassRefPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration* ) const; 213 virtual PassRefPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration* ) const;
213 virtual unsigned ruleIndexByStyle(CSSStyleDeclaration*) const; 214 virtual unsigned ruleIndexByStyle(CSSStyleDeclaration*) const;
214 virtual unsigned ruleIndexByRule(const CSSRule*) const; 215 virtual unsigned ruleIndexByRule(const CSSRule*) const;
215 virtual bool ensureParsedDataReady(); 216 virtual bool ensureParsedDataReady();
216 virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId& ); 217 virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId& );
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 290
290 // Contains "style" attribute value. 291 // Contains "style" attribute value.
291 mutable String m_styleText; 292 mutable String m_styleText;
292 mutable bool m_isStyleTextValid; 293 mutable bool m_isStyleTextValid;
293 }; 294 };
294 295
295 296
296 } // namespace WebCore 297 } // namespace WebCore
297 298
298 #endif // !defined(InspectorStyleSheet_h) 299 #endif // !defined(InspectorStyleSheet_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698