mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-23 17:58:59 +00:00
LibWeb: Create clip and scroll frame trees separately for each navigable
While introducing clip and scroll frame trees, I made a mistake by assuming that the paintable tree includes boxes from nested navigables. Therefore, this comment in the code was incorrect, and clip/scroll frames were simply not assigned for iframes: // NOTE: We only need to refresh the scroll state for traversables // because they are responsible for tracking the state of all // nested navigables. As a result, anything with "overflow: scroll" is currently not scrollable inside an iframe This change fixes that by ensuring clip and scroll frames are assigned and refreshed for each navigable. To achieve this, I had to modify the display list building process to record a separate display list for each navigable. This is necessary because scroll frame ids are local to a navigable, making it impossible to call `DisplayList::apply_scroll_offsets()` on a display list that contains ids from multiple navigables.
This commit is contained in:
parent
1b2f35c3af
commit
ea8d0304e9
Notes:
github-actions[bot]
2024-08-10 08:40:33 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: ea8d0304e9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1011
15 changed files with 156 additions and 46 deletions
|
@ -1156,12 +1156,10 @@ void Document::update_layout()
|
|||
navigable->set_needs_display();
|
||||
set_needs_to_resolve_paint_only_properties();
|
||||
|
||||
if (navigable->is_traversable()) {
|
||||
// NOTE: The assignment of scroll frames only needs to occur for traversables because they take care of all
|
||||
// nested navigable documents.
|
||||
paintable()->assign_scroll_frames();
|
||||
paintable()->assign_clip_frames();
|
||||
paintable()->assign_scroll_frames();
|
||||
paintable()->assign_clip_frames();
|
||||
|
||||
if (navigable->is_traversable()) {
|
||||
page().client().page_did_layout();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue