1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:17:35 +00:00

LibWeb: Remove WidgetBox layout node

The approach of attaching sub-widgets to the web view widget was only
ever going to work in single-process mode, and that's not what we're
about anymore, so let's just get rid of WidgetBox so we don't have the
dead-end architecture hanging over us.

The next step here is to re-implement <input type=text> using LibWeb
primitives.
This commit is contained in:
Andreas Kling 2021-02-10 08:58:26 +01:00
parent 1ad65b173b
commit 5e91e61900
10 changed files with 2 additions and 172 deletions

View file

@ -30,7 +30,6 @@
#include <LibWeb/Layout/BreakNode.h>
#include <LibWeb/Layout/InitialContainingBlockBox.h>
#include <LibWeb/Layout/TextNode.h>
#include <LibWeb/Layout/WidgetBox.h>
#include <LibWeb/Page/Frame.h>
namespace Web {
@ -167,18 +166,6 @@ void Frame::set_needs_display(const Gfx::IntRect& rect)
host_element()->layout_node()->set_needs_display();
}
void Frame::did_scroll(Badge<InProcessWebView>)
{
if (!m_document)
return;
if (!m_document->layout_node())
return;
m_document->layout_node()->for_each_in_subtree_of_type<Layout::WidgetBox>([&](auto& layout_widget) {
layout_widget.update_widget();
return IterationDecision::Continue;
});
}
void Frame::scroll_to_anchor(const String& fragment)
{
if (!document())

View file

@ -75,15 +75,12 @@ public:
Gfx::IntRect viewport_rect() const { return { m_viewport_scroll_offset, m_size }; }
void set_viewport_rect(const Gfx::IntRect&);
void did_scroll(Badge<InProcessWebView>);
FrameLoader& loader() { return m_loader; }
const FrameLoader& loader() const { return m_loader; }
EventHandler& event_handler() { return m_event_handler; }
const EventHandler& event_handler() const { return m_event_handler; }
void scroll_to(const Gfx::IntPoint&);
void scroll_to_anchor(const String&);
Frame& main_frame() { return m_main_frame; }