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

Unified Diff: Source/WebKit/chromium/src/WebDocument.cpp

Issue 11471034: Merge 136878 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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/WebKit/chromium/ChangeLog ('k') | Source/WebKit2/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebDocument.cpp
===================================================================
--- Source/WebKit/chromium/src/WebDocument.cpp (revision 136959)
+++ Source/WebKit/chromium/src/WebDocument.cpp (working copy)
@@ -194,15 +194,17 @@
return WebDocumentType(constUnwrap<Document>()->doctype());
}
-void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLevel)
+void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLevel styleLevel)
{
RefPtr<Document> document = unwrap<Document>();
- // FIXME: We currently ignore the passed in UserStyleLevel. http://crbug.com/162096
RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document.get());
- parsedSheet->setIsUserStyleSheet(true);
+ parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel);
parsedSheet->parseString(sourceCode);
- document->styleSheetCollection()->addUserSheet(parsedSheet.release());
+ if (parsedSheet->isUserStyleSheet())
+ document->styleSheetCollection()->addUserSheet(parsedSheet);
+ else
+ document->styleSheetCollection()->addAuthorSheet(parsedSheet);
}
void WebDocument::cancelFullScreen()
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | Source/WebKit2/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698