Bug 1484126 - part 20: Replace |CellData::mFirst.mColumn + CellData::mEffectiveColSpan| with CellData::NextColumnIndex() r=m_kato
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 15 Oct 2018 11:37:38 +0000
changeset 499845 19605351b3612103810730b1ce7fdee53d2e3b33
parent 499844 35c3aff251f06de9cd80cb5193abc5cb80d33166
child 499846 92c8efea77140bc65e183d4c560550bc91d58eb4
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersm_kato
bugs1484126
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1484126 - part 20: Replace |CellData::mFirst.mColumn + CellData::mEffectiveColSpan| with CellData::NextColumnIndex() r=m_kato Differential Revision: https://phabricator.services.mozilla.com/D8357
editor/libeditor/HTMLTableEditor.cpp
--- a/editor/libeditor/HTMLTableEditor.cpp
+++ b/editor/libeditor/HTMLTableEditor.cpp
@@ -2327,19 +2327,18 @@ HTMLEditor::SplitCellIntoRows(Element* a
         !cellDataAtInsertionPoint.IsSpannedFromOtherRow()) {
       if (!insertAfter) {
         // Inserting before, so stop at first cell in row we want to insert
         // into.
         break;
       }
       // New cell isn't first in row,
       // so stop after we find the cell just before new cell's column
-      if (cellDataAtInsertionPoint.mFirst.mColumn +
-            cellDataAtInsertionPoint.mEffectiveColSpan ==
-              cellData.mFirst.mColumn) {
+      if (cellDataAtInsertionPoint.NextColumnIndex() ==
+            cellData.mFirst.mColumn) {
         break;
       }
       // If cell found is AFTER desired new cell colum,
       //  we have multiple cells with rowspan > 1 that
       //  prevented us from finding a cell to insert after...
       if (cellDataAtInsertionPoint.mFirst.mColumn > cellData.mFirst.mColumn) {
         // ... so instead insert before the cell we found
         insertAfter = false;