Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does the value of img.complete can thus change while a script is executing? #1055

Closed
EdgarChen opened this issue Apr 15, 2016 · 7 comments · Fixed by #4934
Closed

Why does the value of img.complete can thus change while a script is executing? #1055

EdgarChen opened this issue Apr 15, 2016 · 7 comments · Fixed by #4934
Labels
compat Standard is not web compatible or proprietary feature needs standardizing needs tests Moving the issue forward requires someone to write tests normative change topic: img

Comments

@EdgarChen
Copy link
Member

See https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-complete.
Is there any particular purpose for this behavior?

@zcorpan
Copy link
Member

zcorpan commented Apr 15, 2016

The purpose is to match what (some) browsers did when this was specified (I believe IE at least). But I think this can probably be changed without breaking the Web, in particular because some other browsers (Gecko?) don't match the current spec.

Also see
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26113
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27484

@zcorpan zcorpan self-assigned this Apr 15, 2016
@EdgarChen
Copy link
Member Author

EdgarChen commented Apr 15, 2016

Thanks for your reply, @zcorpan.
Yes, you are right. It looks like Gecko and Blink don't support this, given that they get failure result in IDL attribute complete returns true when image resource has been fetched but not run yet & image is not in broken state test in http://w3c-test.org/html/semantics/embedded-content/the-img-element/img.complete.html.
Does that mean the test can be removed, too?

@zcorpan
Copy link
Member

zcorpan commented Apr 15, 2016

We shouldn't remove the test, but the pass condition can be flipped.

@EdgarChen
Copy link
Member Author

I see, thanks.

@jdm
Copy link
Member

jdm commented Sep 19, 2018

It would be nice if the specification reflected reality here.

@bzbarsky
Copy link
Contributor

bzbarsky commented Sep 3, 2019

@annevk It would be good to address this if we can. Right now every single browser fails the relevant web platform test (see web-platform-tests/wpt#4195) so either the test is wrong or the spec doesn't really match reality.

annevk added a commit to web-platform-tests/wpt that referenced this issue Sep 25, 2019
Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop.

Helps with whatwg/html#1055 and issues pointed out from there.
annevk added a commit that referenced this issue Sep 25, 2019
These changes are in line with all three browsers. Chrome still diverges significantly from the standard & tests though on other aspects.

Tests: web-platform-tests/wpt#19298.

Fixes #1055, fixes #4475. #4476 remains outstanding.
@annevk
Copy link
Member

annevk commented Sep 25, 2019

@bzbarsky please review #4934.

annevk added a commit to web-platform-tests/wpt that referenced this issue Sep 25, 2019
Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop.

Helps with whatwg/html#1055 and issues pointed out from there.

whatwg/html#4934 has proposed HTML Standard changes.
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 30, 2019
…tonly

Automatic update from web-platform-tests
HTML: update <img>.complete tests

Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop.

Helps with whatwg/html#1055 and issues pointed out from there.

whatwg/html#4934 has proposed HTML Standard changes.
--

wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd
wpt-pr: 19298
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Sep 30, 2019
…tonly

Automatic update from web-platform-tests
HTML: update <img>.complete tests

Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop.

Helps with whatwg/html#1055 and issues pointed out from there.

whatwg/html#4934 has proposed HTML Standard changes.
--

wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd
wpt-pr: 19298
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…tonly

Automatic update from web-platform-tests
HTML: update <img>.complete tests

Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop.

Helps with whatwg/html#1055 and issues pointed out from there.

whatwg/html#4934 has proposed HTML Standard changes.
--

wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd
wpt-pr: 19298

UltraBlame original commit: c775395917748fc6bf05f54e385767b974109d4a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…tonly

Automatic update from web-platform-tests
HTML: update <img>.complete tests

Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop.

Helps with whatwg/html#1055 and issues pointed out from there.

whatwg/html#4934 has proposed HTML Standard changes.
--

wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd
wpt-pr: 19298

UltraBlame original commit: c775395917748fc6bf05f54e385767b974109d4a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 5, 2019
…tonly

Automatic update from web-platform-tests
HTML: update <img>.complete tests

Align them somewhat with more modern practices and fix one test that expects img.complete to change during a while loop.

Helps with whatwg/html#1055 and issues pointed out from there.

whatwg/html#4934 has proposed HTML Standard changes.
--

wpt-commits: dc2e245a955c832e88d24e6a1af5f718da5491bd
wpt-pr: 19298

UltraBlame original commit: c775395917748fc6bf05f54e385767b974109d4a
annevk added a commit that referenced this issue Oct 15, 2019
These changes are in line with all three browsers. Chrome still diverges significantly from the standard & tests though on other aspects.

Tests: web-platform-tests/wpt#19298.

Fixes #1055, fixes #4475. #4476 remains outstanding.
zcorpan pushed a commit that referenced this issue Nov 6, 2019
These changes are in line with all three browsers. Chrome still diverges significantly from the standard & tests though on other aspects.

Tests: web-platform-tests/wpt#19298.

Fixes #1055, fixes #4475. #4476 remains outstanding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat Standard is not web compatible or proprietary feature needs standardizing needs tests Moving the issue forward requires someone to write tests normative change topic: img
Development

Successfully merging a pull request may close this issue.

5 participants