diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-15 13:01:48 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-15 13:41:19 +0100 |
commit | b34dd0fb24fe74cd3686540c5f71c3c45c0641a8 (patch) | |
tree | 11afc1bb2789f12a1b23701e34b6c04111d58ea3 /Userland/Libraries/LibWeb | |
parent | 93f656119cff56154e6c6125f3573859facf0c19 (diff) | |
download | serenity-b34dd0fb24fe74cd3686540c5f71c3c45c0641a8.zip |
LibWeb: Repaint entire viewport after document layout
This fixes an issue with the eyes on ACID2 not appearing until the
page is repainted after loading.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Document.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/BrowsingContext.h | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index fc49ffa2e0..cdafa8eee3 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -420,7 +420,7 @@ void Document::update_layout() root_formatting_context.run(*m_layout_root, Layout::LayoutMode::Default); - m_layout_root->set_needs_display(); + browsing_context()->set_needs_display(); if (browsing_context()->is_top_level()) { if (auto* page = this->page()) diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index 76a7ec5999..285aef278e 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -128,6 +128,11 @@ void BrowsingContext::set_viewport_scroll_offset(Gfx::IntPoint const& offset) client->browsing_context_did_set_viewport_rect(viewport_rect()); } +void BrowsingContext::set_needs_display() +{ + set_needs_display(viewport_rect()); +} + void BrowsingContext::set_needs_display(Gfx::IntRect const& rect) { if (!viewport_rect().intersects(rect)) diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h index b9b71debd5..bcb621a3a1 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h @@ -50,6 +50,7 @@ public: Gfx::IntSize const& size() const { return m_size; } void set_size(Gfx::IntSize const&); + void set_needs_display(); void set_needs_display(Gfx::IntRect const&); Gfx::IntPoint const& viewport_scroll_offset() const { return m_viewport_scroll_offset; } |