Closed
Bug 1483144
Opened 5 years ago
Closed 5 years ago
Make HTMLEditor::GetSelectionContainer() protected
Categories
(Core :: DOM: Editor, enhancement)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
HTMLEditor::GetSelectionContainer() is a public method, but it's not used by outer classes. So, we can make it a protected member.
Assignee | ||
Comment 1•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f07937c94f8fb0aaca47332c7abad4c453bc68b6
Assignee | ||
Comment 2•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2a556476de0f0d603b5a7c04c386283ade36323b
Assignee | ||
Comment 3•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=13d3623c267ba4a3a3527d265a3ee93455f559a8
Assignee | ||
Comment 4•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a091160139a677a6fda5612b58d32f6014803474
Assignee | ||
Comment 5•5 years ago
|
||
HTMLEditor::GetSelectionContainer() is a public method, but it's not used by outer classes. So, we can make it a protected member. Additionally, this patch cleans up the method. - Renames to GetSelectionContainerElement() for making clearer what will be returned. - Makes it const. - Makes it take Selection reference since most callers already have Selection. - Makes it use RangeBoundary to access start point and end point of range since nsRange::StartOffset() and nsRange::EndOffset() may be slow. - Makes it not use GetSelectedElement() since it requires unnecessary additional cost and the condition to call it means it uses only the first path in GetSelectedElement() which just returns start node of the range. - Makes it output warning when it returns nullptr since it reaches nullptr only when illegal cases, e.g., Selection is in orphan node.
Comment 6•5 years ago
|
||
Comment on attachment 9001461 [details] Bug 1483144 - Make HTMLEditor::GetSelectionContainer() protected Makoto Kato [:m_kato] has approved the revision.
Attachment #9001461 -
Flags: review+
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/a28cf4300f12 Make HTMLEditor::GetSelectionContainer() protected r=m_kato
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a28cf4300f12
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•