Get rid of `GetEditorRoot` because of unclear term
Categories
(Core :: DOM: Editor, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
GetEditorRoot()
must be designed when there is no contenteditable
attribute in the web. It returns the anonymous <div>
element in TextEditor
, but active editing host in HTMLEditor
. So, the result meaning is not unclear in some context, and now, all its users are HTMLEditor
's methods. So we can get rid of this API.
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
With this patch, there are some odd points. We should investigate them later...
Depends on D147501
Assignee | ||
Comment 3•3 years ago
|
||
It returns the anonymous <div>
element if the instance is a TextEditor
, and
compute editing host otherwise. So it's unclear what it returns. Additionally,
all users except EditorBase::CreateTransactionForCollapsedRange
are the
methods of HTMLEditor
. Therefore, we should remove it and unwrap the code
which it's done.
Depends on D147502
Assignee | ||
Comment 4•3 years ago
|
||
It's currently computes the corresponding editing host from the focus node of
Selection
with climbing up the DOM tree. So, it does not just return a stored
element. Therefore, some callers use it multiple times. For avoiding it, we
should rename it to explain that it computes the editing host.
Note that I think that we should make it takes a node to compute editing host
without Selection
for solving the case of no selection ranges. Therefore,
I don't like to include more information into the name.
Depends on D147503
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9ca2a9bf9473
https://hg.mozilla.org/mozilla-central/rev/01f6a58a854c
https://hg.mozilla.org/mozilla-central/rev/e9a1c5ca6707
https://hg.mozilla.org/mozilla-central/rev/07d2709e64fa
Description
•