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

Unified Diff: Source/web/WebDocument.cpp

Issue 66383005: Remove the concept of user stylesheets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix WebFrameCSSCallbackTest tests Created 7 years, 1 month 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/testing/runner/WebPreferences.cpp ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDocument.cpp
diff --git a/Source/web/WebDocument.cpp b/Source/web/WebDocument.cpp
index e34072b04327fb5c92670a56d37865f28a7d48f9..7bdc58413a90b5f18993c60dbe50e62f572856ae 100644
--- a/Source/web/WebDocument.cpp
+++ b/Source/web/WebDocument.cpp
@@ -206,17 +206,18 @@ WebDocumentType WebDocument::doctype() const
return WebDocumentType(constUnwrap<Document>()->doctype());
}
-void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLevel styleLevel)
+void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLevel)
+{
+ insertStyleSheet(sourceCode);
+}
+
+void WebDocument::insertStyleSheet(const WebString& sourceCode)
{
RefPtr<Document> document = unwrap<Document>();
ASSERT(document);
RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(*document.get());
- parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel);
parsedSheet->parseString(sourceCode);
- if (parsedSheet->isUserStyleSheet())
- document->styleEngine()->addUserSheet(parsedSheet);
- else
- document->styleEngine()->addAuthorSheet(parsedSheet);
+ document->styleEngine()->addAuthorSheet(parsedSheet);
}
void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors)
« no previous file with comments | « Source/testing/runner/WebPreferences.cpp ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698