Index: Source/core/dom/StyleElement.cpp |
diff --git a/Source/core/dom/StyleElement.cpp b/Source/core/dom/StyleElement.cpp |
index 683a8f293b3f3bd8e4e5ffd5be4a220bf62f0743..08082421924b66449548db1051902ff3cd1d24e1 100644 |
--- a/Source/core/dom/StyleElement.cpp |
+++ b/Source/core/dom/StyleElement.cpp |
@@ -124,26 +124,26 @@ void StyleElement::createSheet(Element* e, const String& text) |
{ |
ASSERT(e); |
ASSERT(e->inDocument()); |
- Document* document = e->document(); |
+ Document& document = e->document(); |
if (m_sheet) { |
if (m_sheet->isLoading()) |
- document->styleSheetCollections()->removePendingSheet(e); |
+ document.styleSheetCollections()->removePendingSheet(e); |
clearSheet(); |
} |
// If type is empty or CSS, this is a CSS style sheet. |
const AtomicString& type = this->type(); |
- if (document->contentSecurityPolicy()->allowInlineStyle(e->document()->url(), m_startPosition.m_line) && isCSS(e, type)) { |
+ if (document.contentSecurityPolicy()->allowInlineStyle(e->document().url(), m_startPosition.m_line) && isCSS(e, type)) { |
RefPtr<MediaQuerySet> mediaQueries = MediaQuerySet::create(media()); |
MediaQueryEvaluator screenEval("screen", true); |
MediaQueryEvaluator printEval("print", true); |
if (screenEval.eval(mediaQueries.get()) || printEval.eval(mediaQueries.get())) { |
- document->styleSheetCollections()->addPendingSheet(); |
+ document.styleSheetCollections()->addPendingSheet(); |
m_loading = true; |
TextPosition startPosition = m_startPosition == TextPosition::belowRangePosition() ? TextPosition::minimumPosition() : m_startPosition; |
- m_sheet = CSSStyleSheet::createInline(e, KURL(), startPosition, document->inputEncoding()); |
+ m_sheet = CSSStyleSheet::createInline(e, KURL(), startPosition, document.inputEncoding()); |
m_sheet->setMediaQueries(mediaQueries.release()); |
m_sheet->setTitle(e->title()); |
m_sheet->contents()->parseStringAtPosition(text, startPosition, m_createdByParser); |