mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibWeb: Generalize support for dimension attributes
Rather than each element which supports dimension attributes needing to implement parsing the attributes and setting the appropriate style, we can generalize this functionality. This will also make each element more closely resemble the spec text, as we will be effectively declaring, for example, "The img element supports dimension attributes" in code.
This commit is contained in:
committed by
Andreas Kling
parent
058dd225dd
commit
4b1abcf61d
@@ -107,6 +107,9 @@ private:
|
||||
|
||||
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element:dimension-attributes
|
||||
virtual bool supports_dimension_attributes() const override { return true; }
|
||||
|
||||
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
||||
|
||||
virtual void did_set_viewport_rect(CSSPixelRect const&) override;
|
||||
|
||||
Reference in New Issue
Block a user