Closed
Bug 1484124
Opened 6 years ago
Closed 6 years ago
Split HTMLEditor::GetCellIndexes() for internal use
Categories
(Core :: DOM: Editor, enhancement)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
No description provided.
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
HTMLEditor::GetCellIndexes() is an XPCOM method and used a lot internally. So, we need alternative way to retrieve indexes of a cell without virtual calls. In a lot of places, receiving indexes with 2 int32_t variables causes the code messy and that causes making it harder to understand which are index for same cell and where they come from. So, making both of them stored one variable makes the callers simpler. Therefore, this patch creates CellIndexes stack class to get and store the result simply. Then, this makes all callers of GetCellIndexes() use this new class and makes GetCellIndexes() also use this new class. FYI: This patch does NOT put ErrorResult instances in small block scope as far as possible. The reason is, I see its destructor in profile sometimes. I don't think that we should use nsresult& instead of ErrorResult& only for this performance reason, but I think that creating each instance in loops does not make sense.
Comment 3•6 years ago
|
||
Comment on attachment 9002645 [details] Bug 1484124 - part 1: Create HTMLEditor::GetCellIndexes() class to get and store indexes of a table cell Makoto Kato [:m_kato] has approved the revision.
Attachment #9002645 -
Flags: review+
Comment 4•6 years ago
|
||
Comment on attachment 9002644 [details] Bug 1484124 - part 0: Add automated tests for nsITableEditor::GetCellIndexes() Makoto Kato [:m_kato] has approved the revision.
Attachment #9002644 -
Flags: review+
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/325f0f4b0f11 part 0: Add automated tests for nsITableEditor::GetCellIndexes() r=m_kato
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/2dcfee19716d part 1: Create HTMLEditor::GetCellIndexes() class to get and store indexes of a table cell r=m_kato
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/325f0f4b0f11 https://hg.mozilla.org/mozilla-central/rev/2dcfee19716d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Assignee | ||
Updated•6 years ago
|
Blocks: add-scriptable-editor-API-tests
You need to log in
before you can comment on or make changes to this bug.
Description
•