mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:57:45 +00:00
LibWeb: Add a way to make a DOM::Text always editable
This will be useful for input element purposes.
This commit is contained in:
parent
2eddd74e85
commit
41ff7268db
1 changed files with 6 additions and 0 deletions
|
@ -39,10 +39,16 @@ public:
|
||||||
explicit Text(Document&, const String&);
|
explicit Text(Document&, const String&);
|
||||||
virtual ~Text() override;
|
virtual ~Text() override;
|
||||||
|
|
||||||
|
// ^Node
|
||||||
virtual FlyString node_name() const override { return "#text"; }
|
virtual FlyString node_name() const override { return "#text"; }
|
||||||
|
virtual bool is_editable() const override { return m_always_editable || CharacterData::is_editable(); }
|
||||||
|
|
||||||
|
void set_always_editable(bool b) { m_always_editable = b; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual RefPtr<Layout::Node> create_layout_node() override;
|
virtual RefPtr<Layout::Node> create_layout_node() override;
|
||||||
|
|
||||||
|
bool m_always_editable { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue