Add srcset support to HTMLPreloadScanner
Created attachment 208058 [details] Patch
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 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.
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 ***
Created attachment 208061 [details] Patch
Comment on attachment 208058 [details] Patch Merging with the existing patch and review from 119360. It's very similar.