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

LibWeb/HTML: Resolve image decoding promises inside tasks #2229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AtkinsSJ
Copy link
Member

@AtkinsSJ AtkinsSJ commented Nov 8, 2024

This corresponds to whatwg/html#10753

While I was here, I've also implemented the check for the current request changing, and reformatted the spec comments to match our style.

This corresponds to whatwg/html#10753

While I was here, I've also implemented the check for the current
request changing, and reformatted the spec comments to match our style.
CurrentRequestCompletelyAvailable,
};
ImageState image_state;
auto previous_state = current_request().state();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This double event loop spin has always been truly puzzling. ... why do we need it?

CurrentRequestBroken,
CurrentRequestCompletelyAvailable,
};
ImageState image_state;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:/ not initialized at declaration.

return !this->document().is_fully_active() || state == ImageRequest::State::Broken || state == ImageRequest::State::CompletelyAvailable;
}));
if (state != previous_state) {
image_state = ImageState::CurrentRequestChanged;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the state of the current request changing really mean that the current request changed? What about ABA? Should we be storing the "Current request" and making sure the image element still has the same request instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"or is mutated" 🤔 How do we detect that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants