mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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
|
@ -30,8 +30,6 @@ public:
|
|||
Optional<HighResolutionTime::DOMHighResTimeStamp> const& pending_resource_start_time() const { return m_pending_resource_start_time; }
|
||||
void set_pending_resource_start_time(Optional<HighResolutionTime::DOMHighResTimeStamp> time) { m_pending_resource_start_time = time; }
|
||||
|
||||
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
private:
|
||||
|
@ -45,6 +43,9 @@ private:
|
|||
virtual void attribute_changed(FlyString const& name, Optional<String> const& value) override;
|
||||
virtual i32 default_tab_index_value() const override;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:dimension-attributes
|
||||
virtual bool supports_dimension_attributes() const override { return true; }
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes
|
||||
void process_the_iframe_attributes(bool initial_insertion = false);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue