mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
LibWeb: Make Layout::Box::set_needs_display() work for all boxes
For inline-blocks and inline replaced elements, we previously fell into a code path that tried to find a corresponding line box fragment to invalidate. However, we don't need to do any of that, all we need to do is get the absolute rect from our paintable, and invalidate that. This makes CRC2D invalidations happen immediately instead of as a side effect of some other invalidation.
This commit is contained in:
parent
7e18d1c078
commit
b3d85afd92
Notes:
sideshowbarker
2024-07-17 12:04:18 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b3d85afd92
@ -31,12 +31,8 @@ Box::~Box()
|
||||
|
||||
void Box::set_needs_display()
|
||||
{
|
||||
if (!is_inline()) {
|
||||
if (paint_box())
|
||||
browsing_context().set_needs_display(enclosing_int_rect(paint_box()->absolute_rect()));
|
||||
return;
|
||||
}
|
||||
|
||||
Node::set_needs_display();
|
||||
}
|
||||
|
||||
bool Box::is_body() const
|
||||
|
Loading…
Reference in New Issue
Block a user