1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-12 22:41:00 +00:00
serenity/Userland
Andreas Kling 990e7219d6 LibWeb: Fix iframes flickering on window resize
After finishing layout, iframe layout boxes (FrameBox) get notified
about their new size by LayoutState::commit(). This information is
forwarded to the nested browsing context, where it can be used for
layout of the nested document.

The problem here was that we notified the FrameBox twice. Once when
assigning the used offset to its paintable, and once when assigning its
size. Because the offset was assigned first, we ended up telling the
FrameBox "btw, your size is 0x0". This caused us to throw away all
the layout information we had for the nested document.

We'd then say "actually, your size is 300x200" (or something) but by
then it was already too late, and we had to do a full relayout.
This caused iframes to flicker as every time their containing document
was laid out, we'd nuke the iframe layout and redo it (on a zero timer).

The fix is pleasantly simple: we didn't need to inform the nested
document of its offset in the containing document's layout anyway. Only
its size is relevant. So we can simply remove the first call, which
removes the bogus 0x0 temporary size.

Note that iframes may still flicker if they change size in the
containing document. That's a separate issue that will require more
finesse to solve. However, this fixes a very noticeable common case.
2023-05-15 14:08:08 +02:00
..
Applets Userland: Port Model::column_name() to String 2023-05-15 06:42:10 +02:00
Applications Userland: Silence or resolve new GCC 13 warnings 2023-05-15 07:00:29 +02:00
BuggieBox Everywhere: Use LibFileSystem where trivial 2023-03-21 19:03:21 +00:00
Demos Userland: Port Model::column_name() to String 2023-05-15 06:42:10 +02:00
DevTools LibGUI+Userland: Store column names in JsonArrayModel as String 2023-05-15 06:42:10 +02:00
DynamicLoader DynamicLoader: Ensure that backtrace computation stops at _start 2023-04-23 14:30:59 +02:00
Games Chess+GameSettings: Optionally highlight the king when in check 2023-05-10 12:13:35 +01:00
Libraries LibWeb: Fix iframes flickering on window resize 2023-05-15 14:08:08 +02:00
Services WindowServer: Catch more Window stealing misbehavior 2023-05-15 12:15:39 +02:00
Shell Shell: Prefer FileSystem over DeprecatedFile 2023-05-15 06:50:43 +02:00
Utilities Ladybird+LibWebView: Move backing store management code to LibWebView 2023-05-15 12:13:34 +02:00
CMakeLists.txt Userland: Add the BuggieBox program 2022-11-26 12:41:47 -07:00