Consult the dimension attributes for width and height when not rendered - #12840
Consult the dimension attributes for width and height when not rendered#12840annevk wants to merge 1 commit into
Conversation
The width and height IDL attributes of img elements, and of input elements in the Image Button state, returned the natural dimensions when the element was not being rendered. All browsers instead return the width and height content attributes. Drop the "has density-corrected natural width and height" condition as 4ff60b0 gave every available image a 300x150 fallback. Tests: web-platform-tests/wpt#61080 Closes #12573.
|
Opus+Codex review: 1. The This is not hypothetical.
Chromium and Gecko apply the default sizing algorithm; WebKit doesn't. The spec should say which, presumably by routing 2. Nothing bounds the parsed attribute value to
No engine wraps. Steps 4.2 and 5.2 should treat an out-of-range value as an error and fall through to the natural dimension. 3. Step 1 lost the "of the image" precision. The old 4. Both domintros are stale. Minor: step 3 says "in CSS pixels" but steps 4–5 don't; and the |
The width and height IDL attributes of img elements, and of input
elements in the Image Button state, returned the natural dimensions when
the element was not being rendered. All browsers instead return the width
and height content attributes.
Drop the "has density-corrected natural width and height" condition as
4ff60b0 gave every available image a
300x150 fallback.
Tests: web-platform-tests/wpt#61080
Closes #12573.
(See WHATWG Working Mode: Changes for more details.)
/embedded-content-other.html ( diff )
/embedded-content.html ( diff )
/input.html ( diff )