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

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

Issue 132803013: DevTools: [CSS] setStyleSheetText to work with inline stylesheets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix testcase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorStyleSheet.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorStyleSheet.cpp
diff --git a/Source/core/inspector/InspectorStyleSheet.cpp b/Source/core/inspector/InspectorStyleSheet.cpp
index 6192e2d47bc59b2aa9f59a3a47944c182db982b5..08b92d94e0ed777012921e7620a0b8b99622cc16 100644
--- a/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/Source/core/inspector/InspectorStyleSheet.cpp
@@ -1652,6 +1652,21 @@ void InspectorStyleSheetForInlineStyle::didModifyElementAttribute()
m_ruleSourceData.clear();
}
+void InspectorStyleSheetForInlineStyle::reparseStyleSheet(const String& text)
+{
+ fireStyleSheetChanged();
+}
+
+bool InspectorStyleSheetForInlineStyle::setText(const String& text, ExceptionState& exceptionState)
+{
+ bool success = setStyleText(inlineStyle(), text);
+ if (!success) {
+ exceptionState.throwDOMException(SyntaxError, "Style sheet text is invalid.");
+ return false;
apavlov 2014/02/12 11:52:32 Collapse both returns into return success;
lushnikov 2014/02/12 12:21:23 Done.
+ }
+ return true;
+}
+
bool InspectorStyleSheetForInlineStyle::getText(String* result) const
{
if (!m_isStyleTextValid) {
« no previous file with comments | « Source/core/inspector/InspectorStyleSheet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698