Bug 170747 - Link preload HTMLPreloadScanner support
Summary: Link preload HTMLPreloadScanner support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-11 13:55 PDT by Yoav Weiss
Modified: 2017-05-03 14:55 PDT (History)
9 users (show)

See Also:


Attachments
Patch (9.46 KB, patch)
2017-04-11 14:37 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (11.22 KB, patch)
2017-04-11 14:57 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (11.33 KB, patch)
2017-05-03 00:44 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff
Patch (11.40 KB, patch)
2017-05-03 14:07 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.