Closed Bug 1972762 Opened 1 year ago Closed 1 year ago

Make `HTMLEditor` stop scanning visible character in `nsTextFragment` with calling `CharAt`

Categories

(Core :: DOM: Editor, task)

task

Tracking

()

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(7 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

A patch for bug 1951039 will introduce new "find" methods of visible first/last character in nsTextFragment. It's faster than for loops which use nsTextFragment::GetCharAt(). So, HTMLEditor should use the new APIs instead.

Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/480cd5408a0d https://hg.mozilla.org/integration/autoland/rev/a8fdd4e7a1ac part 1: Make `HTMLEditUtils::LineRequiresPaddingLineBreakToBeVisible` stop using `nsTextFragment::CharAt` r=m_kato
Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/a27f4d4df85c https://hg.mozilla.org/integration/autoland/rev/4db2b9760516 part 2: Make `HTMLEditUtils::IsVisiblePreformattedNewLine` stop using `nsTextFragment::CharAt` r=m_kato
Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/bd0ba1eeb32b https://hg.mozilla.org/integration/autoland/rev/dd375f98887e part 3: Make `HTMLEditUtils::GetPreviousNonCollapsibleCharOffset` stop using `nsTextFragment::CharAt` r=m_kato
Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/d0166b8c8561 https://hg.mozilla.org/integration/autoland/rev/7222ac2e728c part 4: Make `HTMLEditUtils::GetInclusiveNextNonCollapsibleCharOffset` stop using `nsTextFragment::CharAt` r=m_kato
Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/c73c3f394b1a https://hg.mozilla.org/integration/autoland/rev/324d5e54cf33 part 5: Make `HTMLEditUtils::GetPreviousPreformattedNewLineInTextNode` stop using `nsTextFragment::CharAt` r=m_kato,jjaschke,dom-core
Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/40052dc92207 https://hg.mozilla.org/integration/autoland/rev/292100fbcdc7 part 6: Make `HTMLEditUtils::GetInclusiveNextPreformattedNewLineInTextNode` stop using `nsTextFragment::CharAt` r=m_kato
Pushed by masayuki@d-toybox.com: https://github.com/mozilla-firefox/firefox/commit/e9f918fac012 https://hg.mozilla.org/integration/autoland/rev/6b2f8ee67c66 part 7: Make `WhiteSpaceVisibilityKeeper::NormalizeVisibleWhiteSpacesWithoutDeletingInvisibleWhiteSpaces` stop using `nsTextFragment::CharAt` within the loops r=m_kato
Regressions: 1974738
No longer regressions: 1974738
Regressions: 1977385
Regressions: 1977386
QA Whiteboard: [qa-triage-done-c143/b142]
No longer regressions: 2048095
No longer regressions: 2048095
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: