Bug 170747

Summary: Link preload HTMLPreloadScanner support
Product: WebKit Reporter: Yoav Weiss <yoav>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, buildbot, cdumez, commit-queue, dbates, esprehn+autocc, gyuyoung.kim, japhet, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Yoav Weiss 2017-04-11 13:55:27 PDT
Link preload HTMLPreloadScanner support
Comment 1 Yoav Weiss 2017-04-11 14:37:14 PDT
Created attachment 306853 [details]
Patch
Comment 2 Yoav Weiss 2017-04-11 14:57:10 PDT
Created attachment 306857 [details]
Patch
Comment 3 Yoav Weiss 2017-05-02 05:45:37 PDT
Friendly ping :)
Comment 4 youenn fablet 2017-05-02 08:00:16 PDT
Comment on attachment 306857 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=306857&action=review

> Source/WebCore/html/parser/HTMLPreloadScanner.cpp:149
> +        std::optional<CachedResource::Type> type = resourceType();

Use auto maybe?

> LayoutTests/http/tests/preload/preloadscanner_download_resources.html:7
> +    shouldBeTrue("internals.isPreloaded('../resources/dummy.js');");

Can you exit early if window.intrrnals is undefined?

> LayoutTests/http/tests/preload/preloadscanner_download_resources.html:8
> +    shouldBeTrue("internals.isPreloaded('../resources/dummy.css');");

Exit with a proper message..,
Comment 5 Yoav Weiss 2017-05-03 00:44:44 PDT
Created attachment 308891 [details]
Patch
Comment 6 Yoav Weiss 2017-05-03 00:46:21 PDT
(In reply to youenn fablet from comment #4)
> Comment on attachment 306857 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=306857&action=review
> 
> > Source/WebCore/html/parser/HTMLPreloadScanner.cpp:149
> > +        std::optional<CachedResource::Type> type = resourceType();
> 
> Use auto maybe?

done
> 
> > LayoutTests/http/tests/preload/preloadscanner_download_resources.html:7
> > +    shouldBeTrue("internals.isPreloaded('../resources/dummy.js');");
> 
> Can you exit early if window.intrrnals is undefined?

done
> 
> > LayoutTests/http/tests/preload/preloadscanner_download_resources.html:8
> > +    shouldBeTrue("internals.isPreloaded('../resources/dummy.css');");
> 
> Exit with a proper message..,

Not sure what you mean, as `shouldBeTrue` has no parameter for a more meaningful message. Can you elaborate?
Comment 7 Yoav Weiss 2017-05-03 14:07:03 PDT
Created attachment 308949 [details]
Patch
Comment 8 Yoav Weiss 2017-05-03 14:13:59 PDT
Comment on attachment 308949 [details]
Patch

Added a failure message when internals is not available. Thanks for reviewing! :)
Comment 9 WebKit Commit Bot 2017-05-03 14:55:29 PDT
Comment on attachment 308949 [details]
Patch

Clearing flags on attachment: 308949

Committed r216143: <http://trac.webkit.org/changeset/216143>
Comment 10 WebKit Commit Bot 2017-05-03 14:55:30 PDT
All reviewed patches have been landed.  Closing bug.