Stop storing text node in `DeleteTextTransaction`, `InsertTextTransaction` and `ReplaceTextTransaction` if editor is a `TextEditor`
Categories
(Core :: DOM: Editor, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox138 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 4 open bugs)
Details
Attachments
(2 files)
I've not checked instance size of the transaction, we could reduce the footprint of them if they store dom::Text in derived class of them only when the editor is an HTMLEditor. Otherwise, just stopping storing text node is also fine.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Anyway, we need to fix this for making TextEditor can work after recreating the native anonymous subtree.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
The anonymous <div> of TextEditor has only one Text as its first child.
Therefore, we can make TextEditor simpler to access the Text node.
| Assignee | ||
Comment 3•1 year ago
|
||
So, Text editor can access the Text node quickly and it's not needed to
be grabbed by a lot of transactions. Additionally, when we support keeping
TextEditor instance even if the text control is reflowed (bug 1922141,
bug 1339052 and bug 1620050), transactions need to work with new anonymous
nodes. Therefore, retrieving Text node of TextEditor each time does make
sense rather than storing the node.
Depends on D240419
Comment 5•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7b4beaa4fab1
https://hg.mozilla.org/mozilla-central/rev/7672cad7ff78
| Assignee | ||
Updated•1 year ago
|
Description
•