1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:47:35 +00:00

LibWeb: Add support for 'definite size' determination

This is pretty naive and there are more nuances in the spec but should
be enough for now.
This commit is contained in:
Tobias Christiansen 2021-05-30 13:43:47 +02:00 committed by Ali Mohammad Pur
parent ead864acf3
commit 27704f5f9e
2 changed files with 18 additions and 1 deletions

View file

@ -204,6 +204,9 @@ public:
NonnullRefPtr<NodeWithStyle> create_anonymous_wrapper() const;
bool has_definite_height() const { return m_has_definite_height; }
bool has_definite_width() const { return m_has_definite_width; }
protected:
NodeWithStyle(DOM::Document&, DOM::Node*, NonnullRefPtr<CSS::StyleProperties>);
NodeWithStyle(DOM::Document&, DOM::Node*, CSS::ComputedValues);
@ -216,6 +219,9 @@ private:
RefPtr<CSS::ImageStyleValue> m_background_image;
CSS::Position m_position;
bool m_has_definite_height { false };
bool m_has_definite_width { false };
};
class NodeWithStyleAndBoxModelMetrics : public NodeWithStyle {