-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update the image data - setting src to the same value logic seems incorrect #8080
Comments
Sounds reasonable to me! |
I think i am capable of solving this issue, Can you please assign this to me? |
I will just need some of your guidance as it will my first issue. |
@Parthmahajan29 - I believe Simon is OOO for the next month or so. If you're interested in sending a PR for this, I'm happy to help with reviews :) |
I am able to do the chances asked for, but i unable to find the file where i have to make the chances, can you help me with that |
I just want to know where i have to do the chances? |
https://github.com/whatwg/html-build can be a good place to start. The HTML source is where you want to apply the changes. |
Also, the WHATWG matrix may be a good place to ask for assistance. |
Ohk i will try my best for this project |
Ohk Sir now i had solved the issue what should i do now? |
Fix the 'update the image data' algorithm when src is set to the same value. Fixes #8080.
Hmmm, actually I think the current spec may be correct. If the image is completely available, it will be in the "list of available images", and so step 6.3.7.1 restarts the animation. (This step is exercised by web-platform-tests/wpt#35468 ) If the image is still loading, the step here will restart the animation. I'm not sure if browsers start to animate images before they're completely loaded, though. This probably needs some more testing. |
Here's a demo (with a local
In Chrome, it starts playing the animation while the image is still loading. Setting In Safari, the animation is stuck on the first frame while loading. When setting In Firefox, it starts playing the animation while the image is still loading. Setting In all browsers, after the image is fully loaded, setting I think Chrome's behavior seems best. |
Why would you want to restart animation if there isn't a re-fetch? If setting src to src doesn't re-fetch, I wouldn't expect it to do anything else either. |
It's in the spec because it's something all browsers do. |
But you just said it isn't, didn't you :) I mean in the comment above. |
Ah, yeah, I wasn't talking about the fully loaded and you are. |
Right, setting |
https://html.spec.whatwg.org/multipage/images.html#updating-the-image-data
step 13:
So this only restarts the animation / returns if current request's state is partially available, not if it's completely available. That seems wrong. cc @yoavweiss
I think it should be:
The text was updated successfully, but these errors were encountered: