Closed
Bug 1447213
Opened 7 years ago
Closed 7 years ago
Get rid of EditorDOMPoint::AsRaw()
Categories
(Core :: DOM: Editor, enhancement)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Currently, a lot of methods take |const EditorRawDOMPoint&| as their argument. However, some of them are called with EditorDOMPoint::AsRaw(). This is not good for performance because:
1. Needs to create temporary instance of EditorRawDOMPoint.
2. EditorRawDOMPoint::AsRaw() may be used by simple mistake.
3. Such methods may call EditorRawDOMPoint::Offset(), however, it's not copied to the original EditorDOMPoint instance. So, callers may need to compute offset again.
So, such methods should be changed to template methods if they are not virtual method and get rid of AsRaw() methods for prevent its looks not expensive.
Assignee | ||
Comment 1•7 years ago
|
||
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•7 years ago
|
||
Comment on attachment 8960587 [details]
Bug 1447213 - Change editor methods which take |const EditorRawDOMPoint&| but called with EditorDOMPoint.AsRaw() to template methods
Oops, not enough. Needs some more explicit declaration.
https://treeherder.mozilla.org/logviewer.html#?job_id=169206719&repo=try&lineNumber=32800
Attachment #8960587 -
Flags: review?(m_kato) → review-
Assignee | ||
Comment 4•7 years ago
|
||
Comment hidden (mozreview-request) |
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8960587 [details]
Bug 1447213 - Change editor methods which take |const EditorRawDOMPoint&| but called with EditorDOMPoint.AsRaw() to template methods
https://reviewboard.mozilla.org/r/229336/#review235988
Attachment #8960587 -
Flags: review?(m_kato) → review+
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/e381311f2847
Change editor methods which take |const EditorRawDOMPoint&| but called with EditorDOMPoint.AsRaw() to template methods r=m_kato
Comment 8•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•