OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2010 Google Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 static PassOwnPtr<CachedDocumentParameters> create(Document* document, PassR
efPtr<MediaValues> mediaValues = nullptr) | 49 static PassOwnPtr<CachedDocumentParameters> create(Document* document, PassR
efPtr<MediaValues> mediaValues = nullptr) |
50 { | 50 { |
51 return adoptPtr(new CachedDocumentParameters(document, mediaValues)); | 51 return adoptPtr(new CachedDocumentParameters(document, mediaValues)); |
52 } | 52 } |
53 | 53 |
54 bool doHtmlPreloadScanning; | 54 bool doHtmlPreloadScanning; |
55 RefPtr<MediaValues> mediaValues; | 55 RefPtr<MediaValues> mediaValues; |
56 Length defaultViewportMinWidth; | 56 Length defaultViewportMinWidth; |
57 bool viewportMetaZeroValuesQuirk; | 57 bool viewportMetaZeroValuesQuirk; |
58 bool viewportMetaEnabled; | 58 bool viewportMetaEnabled; |
| 59 ReferrerPolicy referrerPolicy; |
59 | 60 |
60 private: | 61 private: |
61 CachedDocumentParameters(Document*, PassRefPtr<MediaValues>); | 62 CachedDocumentParameters(Document*, PassRefPtr<MediaValues>); |
62 }; | 63 }; |
63 | 64 |
64 class TokenPreloadScanner { | 65 class TokenPreloadScanner { |
65 WTF_MAKE_NONCOPYABLE(TokenPreloadScanner); WTF_MAKE_FAST_ALLOCATED(TokenPrel
oadScanner); | 66 WTF_MAKE_NONCOPYABLE(TokenPreloadScanner); WTF_MAKE_FAST_ALLOCATED(TokenPrel
oadScanner); |
66 public: | 67 public: |
67 TokenPreloadScanner(const KURL& documentURL, PassOwnPtr<CachedDocumentParame
ters>); | 68 TokenPreloadScanner(const KURL& documentURL, PassOwnPtr<CachedDocumentParame
ters>); |
68 ~TokenPreloadScanner(); | 69 ~TokenPreloadScanner(); |
(...skipping 10 matching lines...) Expand all Loading... |
79 | 80 |
80 bool isSafeToSendToAnotherThread() | 81 bool isSafeToSendToAnotherThread() |
81 { | 82 { |
82 return m_documentURL.isSafeToSendToAnotherThread() | 83 return m_documentURL.isSafeToSendToAnotherThread() |
83 && m_predictedBaseElementURL.isSafeToSendToAnotherThread(); | 84 && m_predictedBaseElementURL.isSafeToSendToAnotherThread(); |
84 } | 85 } |
85 | 86 |
86 private: | 87 private: |
87 class StartTagScanner; | 88 class StartTagScanner; |
88 | 89 |
89 template<typename Token> | 90 template <typename Token> |
90 inline void scanCommon(const Token&, const SegmentedString&, PreloadRequestS
tream& requests); | 91 inline void scanCommon(const Token&, const SegmentedString&, PreloadRequestS
tream& requests); |
91 | 92 |
92 template<typename Token> | 93 template<typename Token> |
93 void updatePredictedBaseURL(const Token&); | 94 void updatePredictedBaseURL(const Token&); |
94 | 95 |
95 struct Checkpoint { | 96 struct Checkpoint { |
96 Checkpoint(const KURL& predictedBaseElementURL, bool inStyle, bool isApp
CacheEnabled, bool isCSPEnabled, size_t templateCount) | 97 Checkpoint(const KURL& predictedBaseElementURL, bool inStyle, bool isApp
CacheEnabled, bool isCSPEnabled, size_t templateCount) |
97 : predictedBaseElementURL(predictedBaseElementURL) | 98 : predictedBaseElementURL(predictedBaseElementURL) |
98 , inStyle(inStyle) | 99 , inStyle(inStyle) |
99 , isAppCacheEnabled(isAppCacheEnabled) | 100 , isAppCacheEnabled(isAppCacheEnabled) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 private: | 156 private: |
156 TokenPreloadScanner m_scanner; | 157 TokenPreloadScanner m_scanner; |
157 SegmentedString m_source; | 158 SegmentedString m_source; |
158 HTMLToken m_token; | 159 HTMLToken m_token; |
159 OwnPtr<HTMLTokenizer> m_tokenizer; | 160 OwnPtr<HTMLTokenizer> m_tokenizer; |
160 }; | 161 }; |
161 | 162 |
162 } | 163 } |
163 | 164 |
164 #endif | 165 #endif |
OLD | NEW |