mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
LibWeb: Make NavigableContainerViewport always have a NavigableContainer
Let's not limit this to only corresponding to an HTMLIFrameElement.
This commit is contained in:
parent
443a8539e9
commit
11d966f3ba
Notes:
github-actions[bot]
2024-11-26 17:59:36 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/11d966f3ba6 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2592
2 changed files with 5 additions and 5 deletions
|
@ -13,7 +13,7 @@ namespace Web::Layout {
|
|||
|
||||
GC_DEFINE_ALLOCATOR(NavigableContainerViewport);
|
||||
|
||||
NavigableContainerViewport::NavigableContainerViewport(DOM::Document& document, DOM::Element& element, CSS::StyleProperties style)
|
||||
NavigableContainerViewport::NavigableContainerViewport(DOM::Document& document, HTML::NavigableContainer& element, CSS::StyleProperties style)
|
||||
: ReplacedBox(document, element, move(style))
|
||||
{
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/HTML/HTMLIFrameElement.h>
|
||||
#include <LibWeb/HTML/NavigableContainer.h>
|
||||
#include <LibWeb/Layout/ReplacedBox.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
@ -16,13 +16,13 @@ class NavigableContainerViewport final : public ReplacedBox {
|
|||
GC_DECLARE_ALLOCATOR(NavigableContainerViewport);
|
||||
|
||||
public:
|
||||
NavigableContainerViewport(DOM::Document&, DOM::Element&, CSS::StyleProperties);
|
||||
NavigableContainerViewport(DOM::Document&, HTML::NavigableContainer&, CSS::StyleProperties);
|
||||
virtual ~NavigableContainerViewport() override;
|
||||
|
||||
virtual void prepare_for_replaced_layout() override;
|
||||
|
||||
const HTML::HTMLIFrameElement& dom_node() const { return verify_cast<HTML::HTMLIFrameElement>(ReplacedBox::dom_node()); }
|
||||
HTML::HTMLIFrameElement& dom_node() { return verify_cast<HTML::HTMLIFrameElement>(ReplacedBox::dom_node()); }
|
||||
[[nodiscard]] HTML::NavigableContainer const& dom_node() const { return verify_cast<HTML::NavigableContainer>(ReplacedBox::dom_node()); }
|
||||
[[nodiscard]] HTML::NavigableContainer& dom_node() { return verify_cast<HTML::NavigableContainer>(ReplacedBox::dom_node()); }
|
||||
|
||||
virtual GC::Ptr<Painting::Paintable> create_paintable() const override;
|
||||
|
||||
|
|
Loading…
Reference in a new issue