From 1e41589a7621c7b4afc8928793126db805aa67f9 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Mon, 15 Oct 2018 11:35:10 +0000 Subject: [PATCH] Bug 1484126 - part 18: Make HTMLEditor::InsertTableCellsWithTransaction() use CellData::NextColumnIndex() instead of |CellData::mCurrent::mColumn + CellData::mColSpan| r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D8355 --HG-- extra : moz-landing-system : lando --- editor/libeditor/HTMLTableEditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/libeditor/HTMLTableEditor.cpp b/editor/libeditor/HTMLTableEditor.cpp index 3c7f140e5e87..e6cd7211672c 100644 --- a/editor/libeditor/HTMLTableEditor.cpp +++ b/editor/libeditor/HTMLTableEditor.cpp @@ -217,8 +217,8 @@ HTMLEditor::InsertTableCellsWithTransaction(int32_t aNumberOfCellsToInsert, newCellIndex = cellDataAtSelection.mCurrent.mColumn; break; case InsertPosition::eAfterSelectedCell: - newCellIndex = - cellDataAtSelection.mCurrent.mColumn + cellDataAtSelection.mColSpan; + MOZ_ASSERT(!cellDataAtSelection.IsSpannedFromOtherRowOrColumn()); + newCellIndex = cellDataAtSelection.NextColumnIndex(); break; default: MOZ_ASSERT_UNREACHABLE("Invalid InsertPosition");