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

Unified Diff: Source/core/inspector/InspectorStyleSheet.h

Issue 1204473006: DevTools: explicitly map CSSOM rules to source ranges. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: for landing Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/inspector/InspectorStyleSheet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorStyleSheet.h
diff --git a/Source/core/inspector/InspectorStyleSheet.h b/Source/core/inspector/InspectorStyleSheet.h
index 3f1be2d45eb35a4b141232f1c52548872732f3a2..aa64f32dd6e1291c2e4095db9718449d25858f73 100644
--- a/Source/core/inspector/InspectorStyleSheet.h
+++ b/Source/core/inspector/InspectorStyleSheet.h
@@ -137,8 +137,8 @@ public:
PassRefPtr<TypeBuilder::CSS::CSSStyleSheetHeader> buildObjectForStyleSheetInfo();
PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*, PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> >);
- PassRefPtr<TypeBuilder::CSS::SourceRange> ruleHeaderSourceRange(const CSSRule*);
- PassRefPtr<TypeBuilder::CSS::SourceRange> mediaQueryExpValueSourceRange(const CSSRule*, size_t mediaQueryIndex, size_t mediaQueryExpIndex);
+ PassRefPtr<TypeBuilder::CSS::SourceRange> ruleHeaderSourceRange(CSSRule*);
+ PassRefPtr<TypeBuilder::CSS::SourceRange> mediaQueryExpValueSourceRange(CSSRule*, size_t mediaQueryIndex, size_t mediaQueryExpIndex);
bool isInlineStyle() override { return false; }
const CSSRuleVector& flatRules();
@@ -148,24 +148,25 @@ protected:
private:
InspectorStyleSheet(InspectorResourceAgent*, const String& id, PassRefPtrWillBeRawPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enum, const String& documentURL, InspectorCSSAgent*);
- unsigned ruleIndexBySourceRange(const CSSMediaRule* parentMediaRule, const SourceRange&);
- bool findRuleByHeaderRange(const SourceRange&, CSSRule**, CSSRuleSourceData**);
- bool findRuleByBodyRange(const SourceRange&, CSSRule**, CSSRuleSourceData**);
+ unsigned ruleIndexBySourceRange(CSSMediaRule* parentMediaRule, const SourceRange&);
+ RefPtrWillBeRawPtr<CSSRuleSourceData> findRuleByHeaderRange(const SourceRange&);
+ RefPtrWillBeRawPtr<CSSRuleSourceData> findRuleByBodyRange(const SourceRange&);
+ RefPtrWillBeRawPtr<CSSRule> ruleForSourceData(CSSRuleSourceData*);
+ RefPtrWillBeRawPtr<CSSRuleSourceData> sourceDataForRule(CSSRule*);
CSSStyleRule* insertCSSOMRuleInStyleSheet(const SourceRange&, const String& ruleText, ExceptionState&);
CSSStyleRule* insertCSSOMRuleInMediaRule(CSSMediaRule*, const SourceRange&, const String& ruleText, ExceptionState&);
CSSStyleRule* insertCSSOMRuleBySourceRange(const SourceRange&, const String& ruleText, ExceptionState&);
String sourceMapURL();
String sourceURL();
- void ensureFlatRules();
+ void collectFlatRules();
bool resourceStyleSheetText(String* result);
bool inlineStyleSheetText(String* result);
- PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Selector> > selectorsFromSource(const CSSRuleSourceData*, const String&);
+ PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Selector>> selectorsFromSource(CSSRuleSourceData*, const String&);
PassRefPtr<TypeBuilder::CSS::SelectorList> buildObjectForSelectorList(CSSStyleRule*);
String url();
bool hasSourceURL();
bool startsAtZero();
- unsigned indexOf(CSSStyleDeclaration*);
void replaceText(const SourceRange&, const String& text, SourceRange* newRange, String* oldText);
void innerSetText(const String& newText, bool markAsLocallyModified);
Element* ownerStyleElement();
« no previous file with comments | « no previous file | Source/core/inspector/InspectorStyleSheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698