summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Layout/LayoutWidget.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-05 19:13:27 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-05 19:15:20 +0200
commit4d5ecf6e3202b7c1f5bafe7e3ab98026c187b3cd (patch)
tree3d92417fec1973dcfd6575c5354302c6518dd81d /Libraries/LibWeb/Layout/LayoutWidget.h
parent7fcf61be358180365fb950fe7ba4f68314e39cad (diff)
downloadserenity-4d5ecf6e3202b7c1f5bafe7e3ab98026c187b3cd.zip
LibWeb: Start implementing proper layout of replaced elements
LayoutReplaced now has intrinsic width, height and ratio. Only some of the values may be present. The layout algorithm takes the various configurations into account per the CSS specification. This is still pretty immature but at least we're moving forward. :^)
Diffstat (limited to 'Libraries/LibWeb/Layout/LayoutWidget.h')
-rw-r--r--Libraries/LibWeb/Layout/LayoutWidget.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutWidget.h b/Libraries/LibWeb/Layout/LayoutWidget.h
index e11c31f5cd..6e3f3d0f09 100644
--- a/Libraries/LibWeb/Layout/LayoutWidget.h
+++ b/Libraries/LibWeb/Layout/LayoutWidget.h
@@ -30,7 +30,7 @@
namespace Web {
-class LayoutWidget : public LayoutReplaced {
+class LayoutWidget final : public LayoutReplaced {
public:
LayoutWidget(const Element&, GUI::Widget&);
virtual ~LayoutWidget() override;
@@ -43,9 +43,13 @@ public:
virtual bool is_widget() const final { return true; }
+ void update_widget();
+
private:
virtual const char* class_name() const override { return "LayoutWidget"; }
+ virtual void did_set_rect() override;
+
NonnullRefPtr<GUI::Widget> m_widget;
};