Changeset 191180 in webkit
- Timestamp:
- Oct 16, 2015, 10:06:06 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r191179 r191180 1 2015-10-16 Chris Dumez <cdumez@apple.com> 2 3 HTMLPreloadScanner should preload iframes 4 https://bugs.webkit.org/show_bug.cgi?id=150097 5 <rdar://problem/23094475> 6 7 Reviewed by Antti Koivisto. 8 9 Add layout test to check that iframes are indeed preloaded. 10 11 * fast/preloader/frame-src-expected.txt: Added. 12 * fast/preloader/frame-src.html: Added. 13 * fast/preloader/resources/testFrame.html: Added. 14 * http/tests/loading/preload-no-store-frame-src-expected.txt: Added. 15 * http/tests/loading/preload-no-store-frame-src.html: Added. 16 1 17 2015-10-16 Csaba Osztrogonác <ossy@webkit.org> 2 18 -
trunk/Source/WebCore/ChangeLog
r191178 r191180 1 2015-10-16 Chris Dumez <cdumez@apple.com> 2 3 HTMLPreloadScanner should preload iframes 4 https://bugs.webkit.org/show_bug.cgi?id=150097 5 <rdar://problem/23094475> 6 7 Reviewed by Antti Koivisto. 8 9 HTMLPreloadScanner should preload iframes to decrease page load time. 10 11 Tests: 12 - fast/preloader/frame-src.html 13 - http/tests/loading/preload-no-store-frame-src.html 14 15 * html/parser/HTMLPreloadScanner.cpp: 16 (WebCore::TokenPreloadScanner::tagIdFor): 17 (WebCore::TokenPreloadScanner::initiatorFor): 18 (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): 19 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): 20 (WebCore::TokenPreloadScanner::StartTagScanner::resourceType): 21 (WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): Deleted. 22 (WebCore::TokenPreloadScanner::StartTagScanner::charset): Deleted. 23 * html/parser/HTMLPreloadScanner.h: 24 1 25 2015-10-16 David Hyatt <hyatt@apple.com> 2 26 -
trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp
r190755 r191180 45 45 { 46 46 AtomicString tagName(data); 47 if (tagName == iframeTag) 48 return TagId::Iframe; 47 49 if (tagName == imgTag) 48 50 return TagId::Img; … … 67 69 { 68 70 switch (tagId) { 71 case TagId::Iframe: 72 return "iframe"; 69 73 case TagId::Img: 70 74 return "img"; … … 154 158 { 155 159 switch (m_tagId) { 160 case TagId::Iframe: 161 if (match(attributeName, srcAttr)) 162 setUrlToLoad(attributeValue); 163 break; 156 164 case TagId::Img: 157 165 if (match(attributeName, srcsetAttr) && m_srcSetAttribute.isNull()) { … … 223 231 CachedResource::Type resourceType() const 224 232 { 225 if (m_tagId == TagId::Script) 233 switch (m_tagId) { 234 case TagId::Iframe: 235 return CachedResource::MainResource; 236 case TagId::Script: 226 237 return CachedResource::Script; 227 if (m_tagId == TagId::Img || (m_tagId == TagId::Input && m_inputIsImage)) 238 case TagId::Img: 239 case TagId::Input: 240 ASSERT(m_tagId != TagId::Input || m_inputIsImage); 228 241 return CachedResource::ImageResource; 229 if (m_tagId == TagId::Link && m_linkIsStyleSheet) 242 case TagId::Link: 243 ASSERT(m_linkIsStyleSheet); 230 244 return CachedResource::CSSStyleSheet; 245 case TagId::Meta: 246 case TagId::Unknown: 247 case TagId::Style: 248 case TagId::Base: 249 case TagId::Template: 250 break; 251 } 231 252 ASSERT_NOT_REACHED(); 232 253 return CachedResource::RawResource; … … 238 259 return false; 239 260 240 if (protocolIs(m_urlToLoad, "data") )261 if (protocolIs(m_urlToLoad, "data") || protocolIs(m_urlToLoad, "about")) 241 262 return false; 242 263 -
trunk/Source/WebCore/html/parser/HTMLPreloadScanner.h
r183951 r191180 46 46 enum class TagId { 47 47 // These tags are scanned by the StartTagScanner. 48 Iframe, 48 49 Img, 49 50 Input,
Note:
See TracChangeset
for help on using the changeset viewer.