mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 08:52:54 +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:
parent
058dd225dd
commit
4b1abcf61d
Notes:
sideshowbarker
2024-07-17 00:59:43 +09:00
Author: https://github.com/trflynn89
Commit: 4b1abcf61d
Pull-request: https://github.com/SerenityOS/serenity/pull/23928
Issue: https://github.com/SerenityOS/serenity/issues/23926
Reviewed-by: https://github.com/AtkinsSJ
8 changed files with 32 additions and 42 deletions
|
@ -208,7 +208,9 @@ private:
|
|||
|
||||
// ^DOM::Element
|
||||
virtual i32 default_tab_index_value() const override;
|
||||
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/input.html#image-button-state-(type=image):dimension-attributes
|
||||
virtual bool supports_dimension_attributes() const override { return type_state() == TypeAttributeState::ImageButton; }
|
||||
|
||||
// ^Layout::ImageProvider
|
||||
virtual bool is_image_available() const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue