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

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

Issue 1493253002: CSSPreloadScanner should handle <base> adjusted URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ensure init pointers at c-tor Created 5 years 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/CSSPreloadScanner.h
diff --git a/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.h b/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.h
index c75e4c79875633570c7e61ecc297c6ba564d4966..5943e90b2b4e502fb7896b1746736cb6e95c593c 100644
--- a/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.h
+++ b/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.h
@@ -44,8 +44,8 @@ public:
void reset();
- void scan(const HTMLToken::DataVector&, const SegmentedString&, PreloadRequestStream&);
- void scan(const String&, const SegmentedString&, PreloadRequestStream&);
+ void scan(const HTMLToken::DataVector&, const SegmentedString&, PreloadRequestStream&, const KURL&);
+ void scan(const String&, const SegmentedString&, PreloadRequestStream&, const KURL&);
void setReferrerPolicy(const ReferrerPolicy);
@@ -64,19 +64,20 @@ private:
};
template<typename Char>
- void scanCommon(const Char* begin, const Char* end, const SegmentedString&, PreloadRequestStream&);
+ void scanCommon(const Char* begin, const Char* end, const SegmentedString&, PreloadRequestStream&, const KURL&);
inline void tokenize(UChar, const SegmentedString&);
void emitRule(const SegmentedString&);
- State m_state;
+ State m_state = Initial;
StringBuilder m_rule;
StringBuilder m_ruleValue;
- // Only non-zero during scan()
- PreloadRequestStream* m_requests;
+ ReferrerPolicy m_referrerPolicy = ReferrerPolicyDefault;
- ReferrerPolicy m_referrerPolicy;
+ // Below members only non-null during scan()
+ PreloadRequestStream* m_requests = nullptr;
+ const KURL* m_predictedBaseElementURL = nullptr;
};
}

Powered by Google App Engine
This is Rietveld 408576698