Index: Source/core/html/parser/CSSPreloadScanner.cpp |
diff --git a/Source/core/html/parser/CSSPreloadScanner.cpp b/Source/core/html/parser/CSSPreloadScanner.cpp |
index 29d37d1e8d01667d41c35b2b0d5a1b0c8e55fa2d..a059b01c6e6448a3aecc57c4d7ae50c471c7afdb 100644 |
--- a/Source/core/html/parser/CSSPreloadScanner.cpp |
+++ b/Source/core/html/parser/CSSPreloadScanner.cpp |
@@ -36,6 +36,7 @@ namespace blink { |
CSSPreloadScanner::CSSPreloadScanner() |
: m_state(Initial) |
+ , m_isBeforeBody(true) |
, m_requests(0) |
{ |
} |
@@ -49,6 +50,7 @@ void CSSPreloadScanner::reset() |
m_state = Initial; |
m_rule.clear(); |
m_ruleValue.clear(); |
+ m_isBeforeBody = true; |
} |
template<typename Char> |
@@ -216,6 +218,7 @@ void CSSPreloadScanner::emitRule(const SegmentedString& source) |
KURL baseElementURL; // FIXME: This should be passed in from the HTMLPreloadScaner via scan()! |
TextPosition position = TextPosition(source.currentLine(), source.currentColumn()); |
OwnPtr<PreloadRequest> request = PreloadRequest::create(FetchInitiatorTypeNames::css, position, url, baseElementURL, Resource::CSSStyleSheet); |
+ request->setIsBeforeBody(m_isBeforeBody); |
// FIXME: Should this be including the charset in the preload request? |
m_requests->append(request.release()); |
} |