mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +00:00
LibWeb: Remove incomplete attempt to avoid repaints outside viewport
This code didn't account for position:fixed elements, which meant that we'd swallow repaints for such elements when the viewport wasn't scrolled to the top of the page. We replace the incomplete optimization with a FIXME noting that this needs to be handled correctly when reintroduced.
This commit is contained in:
parent
1f9942fede
commit
0c7b1d27b4
1 changed files with 2 additions and 2 deletions
|
@ -1981,8 +1981,8 @@ void Navigable::set_needs_display()
|
||||||
|
|
||||||
void Navigable::set_needs_display(CSSPixelRect const& rect)
|
void Navigable::set_needs_display(CSSPixelRect const& rect)
|
||||||
{
|
{
|
||||||
if (!viewport_rect().intersects(rect))
|
// FIXME: Ignore updates outside the visible viewport rect.
|
||||||
return;
|
// This requires accounting for fixed-position elements in the input rect, which we don't do yet.
|
||||||
|
|
||||||
if (is<TraversableNavigable>(*this)) {
|
if (is<TraversableNavigable>(*this)) {
|
||||||
static_cast<TraversableNavigable*>(this)->page().client().page_did_invalidate(to_top_level_rect(rect));
|
static_cast<TraversableNavigable*>(this)->page().client().page_did_invalidate(to_top_level_rect(rect));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue