Sort out `WSScanResult::Point`
Categories
(Core :: DOM: Editor, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox127 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(3 files)
The method returns previous point (from scanning start point of view) rather than the point at reached content. This is really error-prone, and it's impossible to understand the meaning from the name.
Assignee | ||
Comment 1•18 days ago
|
||
They point the found character point if scanning forward. However, they point
the next character point if scanning backward. Therefore, I don't have any
good idea to name them. Therefore, I rename them to *_Deprecated()
and the
callers should use better name method later.
Depends on D207684
Assignee | ||
Comment 2•18 days ago
|
||
When it's called, it just returns at the reached content node. However, this
does not make sense when it reached a character in the text node.
Depends on D207685
Assignee | ||
Comment 3•18 days ago
|
||
Point_Deprecated()
is really error-prone since its result meaning is different
whether the scan direction is backward or forward. Therefore, if a caller wants
a point in a text node and the direction is only one of them, we can change it
to use WSScanResult::PointAtReachedContent()
or
WSScanResult::PointAfterReachedContent()
.
Depends on D207686
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/d5989f64e5ea part 1: Rename `WSScanResult::Offset()` and `WSScanResult::Point()` r=m_kato https://hg.mozilla.org/integration/autoland/rev/7f2596d16f75 part 2: Make `WSScanResult::PointAtContent()` return a point in a text node r=m_kato https://hg.mozilla.org/integration/autoland/rev/669dafe4d5a9 part 3: Make some callers of `WSScanResult::Point_Deprecated()` use new methods r=m_kato
Comment 5•10 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d5989f64e5ea
https://hg.mozilla.org/mozilla-central/rev/7f2596d16f75
https://hg.mozilla.org/mozilla-central/rev/669dafe4d5a9
Description
•