Skip to content
Snippets Groups Projects
user avatar
Masayuki Nakano authored
Bug 1730442 - part 6: Make `HTMLEditor::InsertTableColumnsWithTransaction()` collect all necessary data before touching the DOM tree r=m_kato

It needs to work with the latest layout information to consider which cell
element is the insertion point due to rowspan and colspan.  Therefore,
this patch makes it collects all cell data before touching the DOM except
the case that it needs to normalize the table to make it rectanble.

Note that the case requiring the normalizer should be fixed in a later patch.

This method is corresponding to an XPCOM method.  Therefore, this is tested
by `test_nsITableEditor_insertTableColumn.html`.

And also it's used by the inline table editor, but we don't have automated tests
for this because of no API to get the buttons.  Therefore, I tested it by my
hand.

Note that the old code fails to put caret to newly inserted cell at the reftest
situation.  This fixes the bug too.  Therefore, this changes the reftest's
reference.

Differential Revision: https://phabricator.services.mozilla.com/D146364
bc4493c7
History