Closed Bug 1734771 Opened 3 years ago Closed 3 years ago

Make ContentEventHandler methods take reference and concrete class

Categories

(Core :: DOM: Editor, task, P3)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

Details

Attachments

(12 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
48 bytes, text/x-phabricator-request
Details | Review

ContentEventHandler methods are designed before webidl binding is available. Therefore, these methods take pointer and abstract class of nodes, and it causes a little bit harder to read. So I'd like to do some clean up of them.

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/364de39c7f6e
part 1: Make `ContentEventHandler::InitRootContent()` take `const Selection&` instead of `Selection*` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/0a92a462ce49
part 2: Make `IsContentBR()` and `IsPaddingBR()` take `const nsIContent&` instead of `nsIContent*` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/03413ab3b354
part 3: Make `AppendString()` and `AppendSubString()` take `const Text&` instead of `Text*` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/0596e2a9ba36
part 4: Make `ContentEventHandler::GetTextLength()` take `const Text&` instead of `nsIContent*` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/c29d1b721cea
part 5: Make `ContentEventHandler::GetNativeTextLength()` take `const Text&` instead of `nsIContent*` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/ecad09d79683
part 6: Make `ContentEventHandler::ShouldBreakLineBefore()` take `const nsIContent&` and `const nsINode*` instead of `nsIContent*` and `nsINode*` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/05ece20876da
part 7: Get rid of `ContentEventHandler::GetNativeTextLengthBefore()` due to unused r=m_kato
https://hg.mozilla.org/integration/autoland/rev/b3c27cb7bc27
part 8: Make `ConvertToXPOffset()` take `const Text&` instead of `nsIContent*` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/43e36dcb09d6
part 9: Make `ContentEventHandler::GetTextLengthInRange()` and `ContentEventHandler::AppendFontRanges()` take `const Text&` instead of `nsIContent*` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/0ea14d85076d
part 10: Make `ContentEventHandler::ExpandToClusterBoundary()` take `Text&` instead of `nsIContent*` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/e12b7be9dd7a
part 11: Make `ContentEventHandler::SetRawRangeFromFlatTextOffset()` take `Text**` instead of `nsIContent**` r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/1be001bc058b
part 12: Make `ContentEventHandler::GuessLineBreakerRectAfter()` take `const Text&` instead of `nsIContent*` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: