html: Do not update the image data inside legacy <image> constructor#39635
Conversation
|
🔨 Triggering try run (#18193487623) for Linux (WPT) |
|
JFYI < The mentioned WPT decode test If replace the legacy constructor to HTML constructor this test will FAILED (without PR) |
|
Test results for linux-wpt from try job (#18193487623): Flaky unexpected result (18)
Stable unexpected results that are known to be intermittent (34)
Stable unexpected results (2)
|
|
|
|
🔨 Triggering try run (#18194476562) for Linux (WPT) |
|
Test results for linux-wpt from try job (#18194476562): Flaky unexpected result (19)
Stable unexpected results that are known to be intermittent (31)
|
|
✨ Try run (#18194476562) succeeded. |
TimvdLippe
left a comment
There was a problem hiding this comment.
Straightforward and nice addition of spec comments 😄
I think we should expend the test to test both cases? |
The legacy 'image' constructor (new Image()) doesn't have any step in specification which require to run `update the image data` algorithm. See https://html.spec.whatwg.org/multipage/#dom-image This non-conformant behavior was added in the PR servo#31269 to follow https://html.spec.whatwg.org/multipage/#when-to-obtain-images (.. whenever that element is created or has experienced relevant mutations) to handle the edge case of `decode()` with 'image' without "src" and "srcset" attributes. See html/semantics/embedded-content/the-img-element/decode/image-decode.html#L87 Testing: No changes in test expectations Signed-off-by: Andrei Volykhin <[email protected]>
0e0b3b8 to
65aec21
Compare
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#55305) with upstreamable changes. |
|
|
🔨 Triggering try run (#18347060959) for Linux (WPT) |
|
Test results for linux-wpt from try job (#18347060959): Flaky unexpected result (38)
Stable unexpected results that are known to be intermittent (24)
|
|
✨ Try run (#18347060959) succeeded. |
|
FYI, looking at the bencher.dev plot, this PR seems to have significantly reduced / improved memory usage on servo.org, and slightly on google.com (we don't test any other pages ATM): |
|
@jschwe < Sounds too good to be truth... I didn't see so much images on https://www.google.com to reduce memory footprint on 10 MB... I think the hero of the occasion is #39687 (pack of commits ~ 6months from upstream WebRender) |
The legacy 'image' constructor (new Image()) doesn't have any step in specification which require to run
update the image dataalgorithm.See https://html.spec.whatwg.org/multipage/#dom-image
This non-conformant behavior was added in the PR #31269 to follow https://html.spec.whatwg.org/multipage/#when-to-obtain-images (.. whenever that element is created or has experienced relevant mutations) to handle the edge case of
decode()with 'image' without "src" and "srcset" attributes.See html/semantics/embedded-content/the-img-element/decode/image-decode.html#L87
Testing: No changes in test expectations