| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index f188102cfe0d3187e6f7d6e1b7286b6083c5f436..2a6480ca33f5f43be97344253115e4b368044c97 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -1859,7 +1859,10 @@ void Internals::allowRoundingHacks() const
|
|
|
| void Internals::insertAuthorCSS(Document* document, const String& css) const
|
| {
|
| - RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document);
|
| + if (!document)
|
| + return;
|
| +
|
| + RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(*document);
|
| parsedSheet->setIsUserStyleSheet(false);
|
| parsedSheet->parseString(css);
|
| document->styleSheetCollections()->addAuthorSheet(parsedSheet);
|
| @@ -1867,7 +1870,10 @@ void Internals::insertAuthorCSS(Document* document, const String& css) const
|
|
|
| void Internals::insertUserCSS(Document* document, const String& css) const
|
| {
|
| - RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document);
|
| + if (!document)
|
| + return;
|
| +
|
| + RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(*document);
|
| parsedSheet->setIsUserStyleSheet(true);
|
| parsedSheet->parseString(css);
|
| document->styleSheetCollections()->addUserSheet(parsedSheet);
|
|
|