mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb: Add Page abstraction between PageView and main Frame
* A PageView is a view onto a Page object. * A Page always has a main Frame (root of Frame tree.) * Page has a PageClient. PageView is a PageClient. The goal here is to allow building another kind of view onto a Page while keeping the rest of LibWeb intact.
This commit is contained in:
@@ -50,8 +50,7 @@ RefPtr<LayoutNode> HTMLInputElement::create_layout_node(const StyleProperties*)
|
||||
{
|
||||
ASSERT(document().frame());
|
||||
auto& frame = *document().frame();
|
||||
ASSERT(frame.page_view());
|
||||
auto& page_view = const_cast<PageView&>(*frame.page_view());
|
||||
auto& page_view = const_cast<PageView&>(static_cast<const PageView&>(frame.page().client()));
|
||||
|
||||
if (type() == "hidden")
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user