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

Unified Diff: Source/web/WebDocument.cpp

Issue 23516004: Have CSSParserContext take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/testing/Internals.cpp ('k') | no next file » | 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 a6d93df59cf3ae75670ca20c5ae805281975d201..05f9a3742c500cfd763dfbd68d18b92c8ab76224 100644
--- a/Source/web/WebDocument.cpp
+++ b/Source/web/WebDocument.cpp
@@ -203,8 +203,8 @@ WebDocumentType WebDocument::doctype() const
void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLevel styleLevel)
{
RefPtr<Document> document = unwrap<Document>();
-
- RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document.get());
+ ASSERT(document);
+ RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(*document.get());
parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel);
parsedSheet->parseString(sourceCode);
if (parsedSheet->isUserStyleSheet())
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698