`Selection` should treat offset and range count/index with `uint32_t` instead of `int32_t`
Categories
(Core :: DOM: Selection, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(5 files)
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Since size_t
is the best type to access C++ array.
Depends on D128844
Assignee | ||
Comment 3•3 years ago
|
||
Since it's the standard manner of nsTArray
.
Depends on D128845
Assignee | ||
Comment 4•3 years ago
|
||
It's an internal API corresponding to Selection.getRangeAt
DOM API.
I think that it should use uint32_t
rather than size_t
because of the
consistency with the DOM API and Selection::RangeCount()
.
This patch fixes all callers of GetRangeAt()
, and rewrites it with ranged-
loops unless original ones do not refer RangeCount()
every time and may run
script in the loop.
Depends on D128846
Assignee | ||
Comment 5•3 years ago
|
||
It has two methods which take (signed) long
argument to specify offset in a
DOM node, but it's declared as "unsigned long" in the standards. And now,
they work with rewritten Selection API which take uint32_t
so that they should
use unsigned long
for making the handling simpler and safer.
Depends on D128848
Assignee | ||
Updated•3 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/e6de69a93ae7 part 1: Make `Selection` use `uint32_t` for handling offset in DOM nodes r=smaug
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/877ee15662d4 part 2: Make `Selection::SetAnchorFocusRange()` take `size_t` for range index instead of `int32_t` r=mbrodesser
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/86b416bbfb56 part 3: Make `Selection` use `size_t` and `Maybe<size_t>` for handling index of array of the ranges r=smaug
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/6723340819e9 part 4: Make `Selection::GetRangeAt()` take `uint32_t` instead of `int32_t` r=smaug
Comment 10•2 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/c0bbe23d100a part 5: Make `nsIInlineSpellChecker` use `unsigned long` as offset in node r=m_kato
Comment 11•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Comment 12•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/86b416bbfb56
https://hg.mozilla.org/mozilla-central/rev/6723340819e9
https://hg.mozilla.org/mozilla-central/rev/c0bbe23d100a
Description
•