Closed Bug 1445569 Opened 2 years ago Closed 2 years ago

Get rid of EditorBase::GetStartNodeAndOffset() and EditorBase::GetEndNodeAndOffset()

Categories

(Core :: DOM: Editor, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Calling EditorBase::GetStartNodeAndOffset() and EditorBase::GetEndNodeAndOffset() may cause calling nsINode::IndexOf() even if the callers don't need the offset actually.  So, let's get rid of them and use GetStartPoint() and GetEndPoint() instead.
Comment on attachment 8959412 [details]
Bug 1445569 - part 1: Create WSRunObject constructor which takes |const Editor(Raw)DOMPoint&| instead of |nsINode*| and offset in it

https://reviewboard.mozilla.org/r/228234/#review234082
Attachment #8959412 - Flags: review?(m_kato) → review+
Comment on attachment 8959413 [details]
Bug 1445569 - part 2: Make WSRunObject::PriorVisibleNode() and WSRunObject::NextVisibleNode() take |const Editor(Raw)DOMPoint&| instead of a pair of |nsINode*| and offset in it

https://reviewboard.mozilla.org/r/228236/#review234084
Attachment #8959413 - Flags: review?(m_kato) → review+
Comment on attachment 8959414 [details]
Bug 1445569 - part 3: Make TextEditRules::CheckBidiLevelForDeletion() take |const EditorRawDOMPoint&| instead of |nsINode*| and offset in it

https://reviewboard.mozilla.org/r/228238/#review234086
Attachment #8959414 - Flags: review?(m_kato) → review+
Comment on attachment 8959415 [details]
Bug 1445569 - part 4: Get rid of EditorBase::GetStartNodeAndOffset() and EditorBase::GetEndNodeAndOffset()

https://reviewboard.mozilla.org/r/228240/#review234094
Attachment #8959415 - Flags: review?(m_kato) → review+
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/918ae45e7198
part 1: Create WSRunObject constructor which takes |const Editor(Raw)DOMPoint&| instead of |nsINode*| and offset in it r=m_kato
https://hg.mozilla.org/integration/autoland/rev/78b6dcb16d04
part 2: Make WSRunObject::PriorVisibleNode() and WSRunObject::NextVisibleNode() take |const Editor(Raw)DOMPoint&| instead of a pair of |nsINode*| and offset in it r=m_kato
https://hg.mozilla.org/integration/autoland/rev/d8ffb2c205d5
part 3: Make TextEditRules::CheckBidiLevelForDeletion() take |const EditorRawDOMPoint&| instead of |nsINode*| and offset in it r=m_kato
https://hg.mozilla.org/integration/autoland/rev/2c6beffd290b
part 4: Get rid of EditorBase::GetStartNodeAndOffset() and EditorBase::GetEndNodeAndOffset() r=m_kato
You need to log in before you can comment on or make changes to this bug.