commit | 2cdce56d51dd48b27774907f062ae3f469c0df6d | [log] [tgz] |
---|---|---|
author | Kunihiko Sakamoto <ksakamoto@chromium.org> | Fri Dec 21 05:01:35 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Dec 21 05:01:35 2018 |
tree | 1bf67f99e6184b1ca7bc892bedd6c21f216c388a | |
parent | 195bb3ff859179faaa2ee6d087e97772486536c2 [diff] |
imagesrcset / imagesizes: Fix candidate selection when imagesizes is absent This fixes a bug where image source size is calculated to be zero when <link rel=preload imagesrcset=...> does not have an imagesizes attribute. If imagesizes attribute is absent or does not have a valid value, it should be treated as "100vw" [1]. In HTMLPreloadScanner, this is done by initializing |source_size_| in the StartTagScanner constructor, but we did not do that for <link> tags. [1] https://html.spec.whatwg.org/multipage/images.html#parsing-a-sizes-attribute Bug: 813452 Change-Id: Ib7609c7de2a305d3e7ca142c9ce7f0c5f8cf7e3a Reviewed-on: https://chromium-review.googlesource.com/c/1388047 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#618462}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .