Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Issue 23604035: Enable srcset support in HTMLImageElement (Closed)

Created:
7 years, 3 months ago by Yoav Weiss
Modified:
7 years, 2 months ago
Reviewers:
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org, do-not-use
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Enable srcset support in HTMLImageElement BUG= The `srcset` attribute enables authors to adapt image resources to the device's display characteristics. It is specified at http://www.w3.org/TR/html-srcset/ This change is a port of WebKit's srcset implementation, comprised from patches by Romain Perier <romain.perier@gmail.com>;, Dean Jackson <dino@apple.com>; and myself. The implementation adds the srcset parsing algorithm to HTMLParserIdioms, adds preloading support to HTMLPreloadScanner and adds srcset support to HTMLImageElement. It implements only the 'x' qualifier of srcset, which handles DPR switching, and has rough consensus around it.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+600 lines, -14 lines) Patch
A LayoutTests/fast/hidpi/dpr-setting.html View 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/dpr-setting-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x.html View 1 chunk +36 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-1x-expected.txt View 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html View 1 chunk +33 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x-expected.txt View 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-data-src.html View 1 chunk +19 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-data-src-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-data-srcset.html View 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-data-srcset-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-fraction.html View 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-fraction-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-invalid-inputs.html View 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src.html View 1 chunk +21 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one.html View 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-nomodifier.html View 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-only-src-attribute.html View 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js.html View 1 chunk +31 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes.html View 1 chunk +25 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt View 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-simple-1x.html View 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-simple-1x-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-simple-2x.html View 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-simple-2x-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-src-selection-1x.html View 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-src-selection-1x-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-src-selection-2x.html View 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-src-selection-2x-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-viewport-modifiers.html View 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/image-srcset-viewport-modifiers-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/fast/hidpi/resources/image-set-1x.png View Binary file 0 comments Download
A LayoutTests/fast/hidpi/resources/image-set-2x.png View Binary file 0 comments Download
A LayoutTests/fast/hidpi/resources/srcset-helper.js View 1 chunk +29 lines, -0 lines 0 comments Download
M Source/core/html/HTMLAttributeNames.in View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLImageElement.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/html/HTMLImageElement.cpp View 2 chunks +12 lines, -1 line 0 comments Download
M Source/core/html/HTMLImageElement.idl View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/parser/HTMLDocumentParser.cpp View 2 chunks +10 lines, -3 lines 0 comments Download
M Source/core/html/parser/HTMLParserIdioms.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLParserIdioms.cpp View 2 chunks +71 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLPreloadScanner.h View 3 chunks +3 lines, -2 lines 0 comments Download
M Source/core/html/parser/HTMLPreloadScanner.cpp View 7 chunks +27 lines, -8 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698