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

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

Issue 1738133002: Add support for media attribute on link (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review nits Created 4 years, 9 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 6c83f39042d35ce2562bfb78fd625622f11b28a9..3e493518f557ecd9e62424cd39c6e4bb24c2258e 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h
@@ -45,6 +45,15 @@ class HTMLParserOptions;
class HTMLTokenizer;
class SegmentedString;
+struct ViewportDescriptionWrapper {
+ ViewportDescription description;
+ bool set;
+ ViewportDescriptionWrapper()
+ : set(false)
+ {
+ }
+};
+
struct CORE_EXPORT CachedDocumentParameters {
USING_FAST_MALLOC(CachedDocumentParameters);
public:
@@ -69,8 +78,8 @@ public:
TokenPreloadScanner(const KURL& documentURL, PassOwnPtr<CachedDocumentParameters>, const MediaValuesCached::MediaValuesCachedData&);
~TokenPreloadScanner();
- void scan(const HTMLToken&, const SegmentedString&, PreloadRequestStream& requests);
- void scan(const CompactHTMLToken&, const SegmentedString&, PreloadRequestStream& requests);
+ void scan(const HTMLToken&, const SegmentedString&, PreloadRequestStream& requests, ViewportDescriptionWrapper*);
+ void scan(const CompactHTMLToken&, const SegmentedString&, PreloadRequestStream& requests, ViewportDescriptionWrapper*);
void setPredictedBaseElementURL(const KURL& url) { m_predictedBaseElementURL = url; }
@@ -83,7 +92,7 @@ private:
class StartTagScanner;
template <typename Token>
- inline void scanCommon(const Token&, const SegmentedString&, PreloadRequestStream& requests);
+ inline void scanCommon(const Token&, const SegmentedString&, PreloadRequestStream& requests, ViewportDescriptionWrapper*);
template<typename Token>
void updatePredictedBaseURL(const Token&);
@@ -146,7 +155,7 @@ public:
~HTMLPreloadScanner();
void appendToEnd(const SegmentedString&);
- void scan(ResourcePreloader*, const KURL& documentBaseElementURL);
+ void scan(ResourcePreloader*, const KURL& documentBaseElementURL, ViewportDescriptionWrapper*);
private:
HTMLPreloadScanner(const HTMLParserOptions&, const KURL& documentURL, PassOwnPtr<CachedDocumentParameters>, const MediaValuesCached::MediaValuesCachedData&);

Powered by Google App Engine
This is Rietveld 408576698