Closed Bug 1484113 Opened 3 years ago Closed 3 years ago

Split HTMLEditor::GetFirstRow() for internal use

Categories

(Core :: DOM: Editor, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

nsITableEditor::GetFirstRow() is an XPCOM method, so, for internal use,
we should create non-virtual method, that is GetFirstTableRowElement().

This patch makes it never return NS_SUCCESS_EDITOR_ELEMENT_NOT_FOUND since
nobody refers it and it's detectable.  If the method returns nullptr without
error, it's the case of NS_SUCCESS_EDITOR_ELEMENT_NOT_FOUND.

Additionally, this patch changes the return type of GetFirstRow() from
Node to Element since it always return an Element node if not null.
Comment on attachment 9002438 [details]
Bug 1484113 - part 0: Create automated tests for nsITableEditor::GetFirstRow()

Makoto Kato [:m_kato] has approved the revision.
Attachment #9002438 - Flags: review+
Comment on attachment 9002439 [details]
Bug 1484113 - part 1: Create HTMLEditor::GetFirstTableRowElement() for internal use of nsITableEditor::GetFirstRow()

Makoto Kato [:m_kato] has approved the revision.
Attachment #9002439 - Flags: review+
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/af33be3aee82
part 0: Create automated tests for nsITableEditor::GetFirstRow() r=m_kato
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/090edc3b798b
part 1: Create HTMLEditor::GetFirstTableRowElement() for internal use of nsITableEditor::GetFirstRow() r=m_kato
https://hg.mozilla.org/mozilla-central/rev/af33be3aee82
https://hg.mozilla.org/mozilla-central/rev/090edc3b798b
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.