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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h

Issue 2242223003: Preload tokens even if a <meta> csp tag is found (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up layout test Created 4 years, 4 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
Index: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
index 329795c691bc849b82ddb93bd3a6d6c097ca809a..8adcd554e498ff24f02603b439bdc5750bf36c9a 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
@@ -80,8 +80,8 @@ public:
TokenPreloadScanner(const KURL& documentURL, std::unique_ptr<CachedDocumentParameters>, const MediaValuesCached::MediaValuesCachedData&);
~TokenPreloadScanner();
- void scan(const HTMLToken&, const SegmentedString&, PreloadRequestStream& requests, ViewportDescriptionWrapper*);
- void scan(const CompactHTMLToken&, const SegmentedString&, PreloadRequestStream& requests, ViewportDescriptionWrapper*, bool* likelyDocumentWriteScript);
+ void scan(const HTMLToken&, const SegmentedString&, PreloadRequestStream& requests, ViewportDescriptionWrapper*, bool* isCSPMetaTag);
+ void scan(const CompactHTMLToken&, const SegmentedString&, PreloadRequestStream& requests, ViewportDescriptionWrapper*, bool* isCSPMetaTag, bool* likelyDocumentWriteScript);
void setPredictedBaseElementURL(const KURL& url) { m_predictedBaseElementURL = url; }
@@ -97,17 +97,16 @@ private:
bool shouldEvaluateForDocumentWrite(const HTMLToken::DataVector& source) { return false; }
template <typename Token>
- inline void scanCommon(const Token&, const SegmentedString&, PreloadRequestStream& requests, ViewportDescriptionWrapper*, bool* likelyDocumentWriteScript);
+ inline void scanCommon(const Token&, const SegmentedString&, PreloadRequestStream& requests, ViewportDescriptionWrapper*, bool* isCSPMetaTag, bool* likelyDocumentWriteScript);
template<typename Token>
void updatePredictedBaseURL(const Token&);
struct Checkpoint {
- Checkpoint(const KURL& predictedBaseElementURL, bool inStyle, bool inScript, bool isCSPEnabled, size_t templateCount)
+ Checkpoint(const KURL& predictedBaseElementURL, bool inStyle, bool inScript, size_t templateCount)
: predictedBaseElementURL(predictedBaseElementURL)
, inStyle(inStyle)
, inScript(inScript)
- , isCSPEnabled(isCSPEnabled)
, templateCount(templateCount)
{
}
@@ -115,7 +114,6 @@ private:
KURL predictedBaseElementURL;
bool inStyle;
bool inScript;
- bool isCSPEnabled;
size_t templateCount;
};
@@ -138,7 +136,6 @@ private:
bool m_inStyle;
bool m_inPicture;
bool m_inScript;
- bool m_isCSPEnabled;
PictureData m_pictureData;
size_t m_templateCount;
std::unique_ptr<CachedDocumentParameters> m_documentParameters;

Powered by Google App Engine
This is Rietveld 408576698