Make `OffsetEntry` in `TextServicesDocument.cpp` clearer
Categories
(Core :: Spelling checker, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox92 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(18 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
Bug 1718924 - part 12: Move `TextServicesDocument::FindWordBounds()` to `OffsetEntryArray` r=m_kato!
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
Bug 1718924 - part 14: Move `TextServicesDocument::SplitOffsetEntry` to `OffsetEntryArray` r=m_kato!
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
It seems that it treats mainly a text node in various places, but it's not
guaranteed by any variable declarations. So, first of all, I'd like to make
it clearer.
TextServicesDocument::IsTextNode() isn't necessary because nsINode::IsText()
is enough useful. And AsText() should be zero cost at runtime. So, in blocks
which guarantee specific content node is a text node, this patch appends
AsText() for making the code clearer.
| Assignee | ||
Comment 2•4 years ago
|
||
Now, mNode is always a text node, and it may store across "can run script"
boundaries. So, it should be OwningNonNull<Text>.
Depends on D119148
| Assignee | ||
Comment 3•4 years ago
|
||
Depends on D119149
| Assignee | ||
Comment 4•4 years ago
|
||
Depends on D119150
| Assignee | ||
Comment 5•4 years ago
|
||
Depends on D119151
| Assignee | ||
Comment 6•4 years ago
|
||
Depends on D119152
| Assignee | ||
Comment 7•4 years ago
|
||
Depends on D119153
| Assignee | ||
Comment 8•4 years ago
|
||
Depends on D119154
| Assignee | ||
Comment 9•4 years ago
|
||
Now, the meaning of OffsetEntry is clear. Therefore, this patch adds comment
explaining the class and its members.
Then, the meaning of TextServicesDocument::mSelStartOffset and
TextServicesDocument::mSelEndOffset becomes clearer since they are used to
create OffsetEntry instances. Therefore, this patch renames them.
Depends on D119155
| Assignee | ||
Comment 10•4 years ago
|
||
Now, it stores dom::Text with OwningNonNull. So, once it's leaked, it
wastes a lot of memory spaces. Therefore, we should make mOffsetTable
store UniquePtr<OffsetEntry> instead of OffsetEntry*.
Depends on D119156
| Assignee | ||
Comment 11•4 years ago
|
||
There are some methods in TextServicesDocument which work only with
TextServicesDocument::mOffsetTable. Once we move such methods to custom
class of nsTArray<UniquePtr<OffsetEntry>>, we can make TextServicesDocument
simpler.
Depends on D119157
| Assignee | ||
Comment 12•4 years ago
|
||
Depends on D119158
| Assignee | ||
Comment 13•4 years ago
|
||
Depends on D119159
| Assignee | ||
Comment 14•4 years ago
|
||
Depends on D119160
| Assignee | ||
Comment 15•4 years ago
|
||
They are indices of OffsetEntryArray. Therefore, they should be managed in it.
Depends on D119161
| Assignee | ||
Comment 16•4 years ago
|
||
Depends on D119162
| Assignee | ||
Comment 17•4 years ago
|
||
Depends on D119163
| Assignee | ||
Comment 18•4 years ago
|
||
Depends on D119164
Comment 19•4 years ago
|
||
Comment 20•4 years ago
|
||
Updated•4 years ago
|
Comment 21•4 years ago
|
||
Comment 22•4 years ago
|
||
Comment 23•4 years ago
|
||
Comment 24•4 years ago
|
||
Comment 25•4 years ago
|
||
Comment 26•4 years ago
|
||
Comment 27•4 years ago
|
||
Comment 28•4 years ago
|
||
Comment 29•4 years ago
|
||
Comment 30•4 years ago
|
||
Comment 31•4 years ago
|
||
Comment 32•4 years ago
|
||
Comment 33•4 years ago
|
||
Comment 34•4 years ago
|
||
| Assignee | ||
Updated•4 years ago
|
Comment 35•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ade9a3381ccb
https://hg.mozilla.org/mozilla-central/rev/58608619e491
https://hg.mozilla.org/mozilla-central/rev/3857f3a91edb
https://hg.mozilla.org/mozilla-central/rev/3e43427ec342
https://hg.mozilla.org/mozilla-central/rev/87409043c8f8
https://hg.mozilla.org/mozilla-central/rev/8d3b1cd13597
https://hg.mozilla.org/mozilla-central/rev/790a5005cdbe
https://hg.mozilla.org/mozilla-central/rev/5a72fb7d3da4
https://hg.mozilla.org/mozilla-central/rev/3ba594b4b02d
https://hg.mozilla.org/mozilla-central/rev/42ff08e8e796
https://hg.mozilla.org/mozilla-central/rev/77740303aae0
https://hg.mozilla.org/mozilla-central/rev/622d9feefc23
https://hg.mozilla.org/mozilla-central/rev/0bffa7979736
https://hg.mozilla.org/mozilla-central/rev/3ffbb88fe641
https://hg.mozilla.org/mozilla-central/rev/b771c6d7f21a
https://hg.mozilla.org/mozilla-central/rev/da317e009565
https://hg.mozilla.org/mozilla-central/rev/1232d34c7296
https://hg.mozilla.org/mozilla-central/rev/6af3e577108b
Description
•