mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 07:18:51 +00:00
Revert "LibWeb: Cache intrinsic sizes across layout runs"
This reverts commit 12c6ac78e2
.
Very large performance regression when viewing GitHub repository pages.
This commit is contained in:
parent
12c6ac78e2
commit
73a4b176cf
Notes:
github-actions[bot]
2025-03-08 11:10:16 +00:00
Author: https://github.com/awesomekling
Commit: 73a4b176cf
13 changed files with 102 additions and 108 deletions
|
@ -762,7 +762,7 @@ void HTMLImageElement::add_callbacks_to_image_request(GC::Ref<ImageRequest> imag
|
|||
document().list_of_available_images().add(key, *image_data, true);
|
||||
|
||||
set_needs_style_update(true);
|
||||
set_needs_layout_update(DOM::SetNeedsLayoutReason::HTMLImageElementUpdateTheImageData);
|
||||
document().set_needs_layout(DOM::SetNeedsLayoutReason::HTMLImageElementUpdateTheImageData);
|
||||
|
||||
// 4. If maybe omit events is not set or previousURL is not equal to urlString, then fire an event named load at the img element.
|
||||
if (!maybe_omit_events || previous_url != url_string.serialize())
|
||||
|
@ -902,7 +902,7 @@ void HTMLImageElement::react_to_changes_in_the_environment()
|
|||
image_request->prepare_for_presentation(*this);
|
||||
// FIXME: This is ad-hoc, updating the layout here should probably be handled by prepare_for_presentation().
|
||||
set_needs_style_update(true);
|
||||
set_needs_layout_update(DOM::SetNeedsLayoutReason::HTMLImageElementReactToChangesInTheEnvironment);
|
||||
document().set_needs_layout(DOM::SetNeedsLayoutReason::HTMLImageElementReactToChangesInTheEnvironment);
|
||||
|
||||
// 7. Fire an event named load at the img element.
|
||||
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::load));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue