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

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: address @apavlov 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 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 df9ddd4d620690369e2f5d8b0869002b38af1bc9..22c9cd43b2b0fd09c128997974c91614925c751f 100644
--- a/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/Source/core/inspector/InspectorStyleSheet.cpp
@@ -1651,6 +1651,19 @@ 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 success;
+}
+
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