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

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

Issue 441873010: DevTools: [SSP] Implement adding new rule in user stylesheet (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor changes Created 6 years, 4 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
Index: Source/core/inspector/InspectorStyleSheet.h
diff --git a/Source/core/inspector/InspectorStyleSheet.h b/Source/core/inspector/InspectorStyleSheet.h
index 9ad922315c740bb65cc2e0d926b9229e3af6e2e3..557c51247e23d9675b29d22eaa3e2edbb6311cbf 100644
--- a/Source/core/inspector/InspectorStyleSheet.h
+++ b/Source/core/inspector/InspectorStyleSheet.h
@@ -41,6 +41,7 @@ class ParsedStyleSheet;
namespace blink {
+class CSSMediaRule;
class CSSRuleList;
class CSSStyleDeclaration;
class CSSStyleRule;
@@ -206,8 +207,8 @@ public:
virtual bool getText(String* result) const OVERRIDE;
String ruleSelector(const InspectorCSSId&, ExceptionState&);
bool setRuleSelector(const InspectorCSSId&, const String& selector, ExceptionState&);
- CSSStyleRule* addRule(const String& selector, ExceptionState&);
- bool deleteRule(const InspectorCSSId&, ExceptionState&);
+ CSSStyleRule* addRule(const String& ruleText, const SourceRange& location, ExceptionState&);
+ bool deleteRule(const InspectorCSSId&, const String& oldText, ExceptionState&);
CSSStyleSheet* pageStyleSheet() const { return m_pageStyleSheet.get(); }
@@ -237,7 +238,11 @@ protected:
private:
InspectorStyleSheet(InspectorPageAgent*, InspectorResourceAgent*, const String& id, PassRefPtrWillBeRawPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enum, const String& documentURL, Listener*);
-
+ unsigned ruleIndexBySourceRange(const CSSMediaRule* parentMediaRule, const SourceRange&);
+ 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&);
+ bool verifyRuleText(const String& ruleText);
unsigned ruleIndexByStyle(CSSStyleDeclaration*) const;
String sourceMapURL() const;
String sourceURL() const;

Powered by Google App Engine
This is Rietveld 408576698