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

Side by Side Diff: Source/core/html/parser/HTMLPreloadScanner.h

Issue 1220443004: Revert of Revert of Fix CH Width header when preloadScanner and <picture> are involved (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/html/parser/HTMLPreloadScanner.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 { 102 {
103 } 103 }
104 104
105 KURL predictedBaseElementURL; 105 KURL predictedBaseElementURL;
106 bool inStyle; 106 bool inStyle;
107 bool isAppCacheEnabled; 107 bool isAppCacheEnabled;
108 bool isCSPEnabled; 108 bool isCSPEnabled;
109 size_t templateCount; 109 size_t templateCount;
110 }; 110 };
111 111
112 struct PictureData {
113 PictureData()
114 : sourceSize(0.0)
115 , sourceSizeSet(false)
116 , picked(false)
117 {
118 }
119 String sourceURL;
120 float sourceSize;
121 bool sourceSizeSet;
122 bool picked;
123 };
124
112 CSSPreloadScanner m_cssScanner; 125 CSSPreloadScanner m_cssScanner;
113 const KURL m_documentURL; 126 const KURL m_documentURL;
114 KURL m_predictedBaseElementURL; 127 KURL m_predictedBaseElementURL;
115 bool m_inStyle; 128 bool m_inStyle;
116 bool m_inPicture; 129 bool m_inPicture;
117 bool m_isAppCacheEnabled; 130 bool m_isAppCacheEnabled;
118 bool m_isCSPEnabled; 131 bool m_isCSPEnabled;
119 String m_pictureSourceURL; 132 PictureData m_pictureData;
120 size_t m_templateCount; 133 size_t m_templateCount;
121 OwnPtr<CachedDocumentParameters> m_documentParameters; 134 OwnPtr<CachedDocumentParameters> m_documentParameters;
122 ClientHintsPreferences m_clientHintsPreferences; 135 ClientHintsPreferences m_clientHintsPreferences;
123 136
124 Vector<Checkpoint> m_checkpoints; 137 Vector<Checkpoint> m_checkpoints;
125 }; 138 };
126 139
127 class CORE_EXPORT HTMLPreloadScanner { 140 class CORE_EXPORT HTMLPreloadScanner {
128 WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner); WTF_MAKE_FAST_ALLOCATED(HTMLPreloa dScanner); 141 WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner); WTF_MAKE_FAST_ALLOCATED(HTMLPreloa dScanner);
129 public: 142 public:
(...skipping 12 matching lines...) Expand all
142 private: 155 private:
143 TokenPreloadScanner m_scanner; 156 TokenPreloadScanner m_scanner;
144 SegmentedString m_source; 157 SegmentedString m_source;
145 HTMLToken m_token; 158 HTMLToken m_token;
146 OwnPtr<HTMLTokenizer> m_tokenizer; 159 OwnPtr<HTMLTokenizer> m_tokenizer;
147 }; 160 };
148 161
149 } 162 }
150 163
151 #endif 164 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/parser/HTMLPreloadScanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698