HTMLPreloadScanner should preload iframes
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Oct 2015 17:06:06 +0000 (17:06 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Oct 2015 17:06:06 +0000 (17:06 +0000)
commitcd3047e8dabb32d3eb74197060216558f285ab47
treefd18ab41d068b6b9d487532c050e8b860944c58c
parente285e8219d101aad73b455b07f9d9939de5bb32b
HTMLPreloadScanner should preload iframes
https://bugs.webkit.org/show_bug.cgi?id=150097
<rdar://problem/23094475>

Reviewed by Antti Koivisto.

Source/WebCore:

HTMLPreloadScanner should preload iframes to decrease page load time.

Tests:
- fast/preloader/frame-src.html
- http/tests/loading/preload-no-store-frame-src.html

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::tagIdFor):
(WebCore::TokenPreloadScanner::initiatorFor):
(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
(WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
(WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): Deleted.
(WebCore::TokenPreloadScanner::StartTagScanner::charset): Deleted.
* html/parser/HTMLPreloadScanner.h:

LayoutTests:

Add layout test to check that iframes are indeed preloaded.

* fast/preloader/frame-src-expected.txt: Added.
* fast/preloader/frame-src.html: Added.
* fast/preloader/resources/testFrame.html: Added.
* http/tests/loading/preload-no-store-frame-src-expected.txt: Added.
* http/tests/loading/preload-no-store-frame-src.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/preloader/frame-src-expected.txt [new file with mode: 0644]
LayoutTests/fast/preloader/frame-src.html [new file with mode: 0644]
LayoutTests/fast/preloader/resources/testFrame.html [new file with mode: 0644]
LayoutTests/http/tests/loading/preload-no-store-frame-src-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/loading/preload-no-store-frame-src.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLPreloadScanner.cpp
Source/WebCore/html/parser/HTMLPreloadScanner.h