mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:17:44 +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:
parent
64ba289cfb
commit
bc15144972
7 changed files with 80 additions and 71 deletions
|
@ -83,21 +83,10 @@ public:
|
|||
String inner_html() const;
|
||||
void set_inner_html(StringView);
|
||||
|
||||
virtual bool is_editable() const final;
|
||||
String content_editable() const;
|
||||
void set_content_editable(const String&);
|
||||
|
||||
protected:
|
||||
RefPtr<LayoutNode> create_layout_node(const CSS::StyleProperties* parent_style) override;
|
||||
|
||||
private:
|
||||
enum class ContentEditableState {
|
||||
True,
|
||||
False,
|
||||
Inherit,
|
||||
};
|
||||
ContentEditableState content_editable_state() const;
|
||||
|
||||
Attribute* find_attribute(const FlyString& name);
|
||||
const Attribute* find_attribute(const FlyString& name) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue