Bug 119464 - Add srcset support to HTMLPreloadScanner
Summary: Add srcset support to HTMLPreloadScanner
Status: RESOLVED DUPLICATE of bug 119360
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-02 23:52 PDT by Yoav Weiss
Modified: 2013-08-04 12:53 PDT (History)
4 users (show)

See Also:


Attachments
Patch (18.40 KB, patch)
2013-08-03 00:14 PDT, Yoav Weiss
dino: review-
Details | Formatted Diff | Diff
Patch (18.48 KB, patch)
2013-08-03 04:02 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 2013-08-02 23:52:15 PDT
Add srcset support to HTMLPreloadScanner
Comment 1 Yoav Weiss 2013-08-03 00:14:56 PDT
Created attachment 208058 [details]
Patch
Comment 2 Yoav Weiss 2013-08-03 00:19:57 PDT
The recently landed srcset support (https://bugs.webkit.org/show_bug.cgi?id=110252) lack a HTMlPreloadScanner support.
That means that for pages with a script tag at the page's top, images with both "src" and "srcset" attributes will have 2 resources downloaded when only one is needed. (Because the "src" resource is downloaded by the preload scanner).

This patch fixes that by adding srcset support to HTMLPreloadScanner.
Comment 3 Joseph Pecoraro 2013-08-03 01:28:07 PDT
Comment on attachment 208058 [details]
Patch

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

> LayoutTests/fast/hidpi/image-srcset-preload-expected.txt:1
> +WARN: shouldBe() expects string arguments

(Just passing by) Looks like an unexpected use of shouldBe below. You should pass the argument as a string and shouldBeFalse will eval it.
Comment 4 Dean Jackson 2013-08-03 04:00:27 PDT
This is a duplicate of Bug 119360 which has a similar patch (that I'm currently reworking).

I'll merge the two patches.

*** This bug has been marked as a duplicate of bug 119360 ***
Comment 5 Yoav Weiss 2013-08-03 04:02:25 PDT
Created attachment 208061 [details]
Patch
Comment 6 Dean Jackson 2013-08-03 04:05:26 PDT
Comment on attachment 208058 [details]
Patch

Merging with the existing patch and review from 119360. It's very similar.