mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Move contentEditable from Element to HTMLElement
HTMLElement is the only interface that includes ElementContentEditable in the HTML specification. This makes sense, as Element is also a base class for elements in other specifications such as SVG, which definitely shouldn't be editable. Also adds a test for the attribute based on what Andreas did in the video that added it.
This commit is contained in:
@@ -39,8 +39,19 @@ public:
|
||||
|
||||
String title() const { return attribute(HTML::AttributeNames::title); }
|
||||
|
||||
virtual bool is_editable() const final;
|
||||
String content_editable() const;
|
||||
void set_content_editable(const String&);
|
||||
|
||||
private:
|
||||
virtual bool is_html_element() const final { return true; }
|
||||
|
||||
enum class ContentEditableState {
|
||||
True,
|
||||
False,
|
||||
Inherit,
|
||||
};
|
||||
ContentEditableState content_editable_state() const;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user