Closed Bug 1484121 Opened 6 years ago Closed 6 years ago

Split HTMLEditor::DeleteTableColumn() for internal use

Categories

(Core :: DOM: Editor, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox63 --- wontfix
firefox64 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

No description provided.
Priority: -- → P3
Oh, this method is completely broken since the fix of bug 671417... HTMLEditor::GetNumberOfCellsInRow() returned non-false before the fix. So, the callers continued to handling something. However, after the fix, it returns 0 and all callers check whether the result is 1 or not. I.e., before the fix, the callers always treated as there were 2 or more columns since nsresult values are not 1. I'll fix this bug for writing automated tests.
Blocks: 671417
This add automated tests for nsITableEditor.deleteTableColumn(). However, this contains some fixes of existing code since with those bugs, the test isn't passed even in the simplest case.
nsITableEditor::DeleteTableColumn() is an XPCOM method but used internally. So, it should be implemented with non-virtual method and internal users should use it. Note that this changes only one thing. This moves |AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(...| from below DeleteTableElementAndChildrenWithTransaction() to above it. I.e., DeleteTableElementAndChildrenWithTransaction() works under EditSubAction::eDeleteNode as the top level sub-action now. This is same as DeleteSelectedTableRowsWithTransaction(). Therefore, the difference with it when it removes <table> is now fixed.
This patch renames HTMLEditor::DeleteColumn() to HTMLEditor::DeleteTableColumnWithTransaction() and cleans up its implementation.
Makoto-san: I guess that this bug's request was dropped from your todo list. All other review requests depend on this, so, I'd like you to review this first.
Comment on attachment 9009322 [details] Bug 1484121 - part 0: Add automated tests for nsITableEditor.deleteTableColumn() Makoto Kato [:m_kato] has approved the revision.
Attachment #9009322 - Flags: review+
Comment on attachment 9009323 [details] Bug 1484121 - part 1: Create HTMLEditor::DeleteSelectedTableColumnsWithTransaction() for internal use of nsITableEditor::DeleteTableColumn() Makoto Kato [:m_kato] has approved the revision.
Attachment #9009323 - Flags: review+
Comment on attachment 9009324 [details] Bug 1484121 - part 2: Clean up HTMLEditor::DeleteColumn() Makoto Kato [:m_kato] has approved the revision.
Attachment #9009324 - Flags: review+
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/d3f152e4c6cf part 0: Add automated tests for nsITableEditor.deleteTableColumn() r=m_kato https://hg.mozilla.org/integration/autoland/rev/d2025ca568f7 part 1: Create HTMLEditor::DeleteSelectedTableColumnsWithTransaction() for internal use of nsITableEditor::DeleteTableColumn() r=m_kato https://hg.mozilla.org/integration/autoland/rev/a0f7c46838a0 part 2: Clean up HTMLEditor::DeleteColumn() r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: