Closed
Bug 1484126
Opened 6 years ago
Closed 6 years ago
Split HTMLEditor::GetCellDataAt() for internal use
Categories
(Core :: DOM: Editor, enhancement, P3)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla64
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(22 files)
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review | |
46 bytes,
text/x-phabricator-request
|
Details | Review |
No description provided.
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Assignee | ||
Comment 13•6 years ago
|
||
Assignee | ||
Comment 14•6 years ago
|
||
Assignee | ||
Comment 15•6 years ago
|
||
Assignee | ||
Comment 16•6 years ago
|
||
Assignee | ||
Comment 17•6 years ago
|
||
Assignee | ||
Comment 18•6 years ago
|
||
nsITableEditor::GetCellDataAt() is an XPCOM method but used internally a lot.
Additionally, it scatters a lot of variables (including unused) since it takes
a lot of out arguments to return. Therefore, this should be implemented as
struct and users should refer each member as result.
This does not replaces the callers yet since it's too risky if the caller is
not tested by automated test. Following patches will replace the method call
and each variable step by step.
Assignee | ||
Comment 19•6 years ago
|
||
This patch makes all nsITableEditor::GetCellDataAt() use CellData, and if
each caller checks the result of GetCellDataAt() with NS_FAILED(), this
replaces it with CellData::FailedOrNotFound() since GetCellDataAt() returns
error even when it does not find a cell element. Finally, copies each
CellData member to the variable which received corresponding value from
GetCellDataAt() for making this change safe. Note that for easier to review,
the copying blocks have odd indent. Those variables will be removed or
corrected the indent by the following patches.
Assignee | ||
Comment 20•6 years ago
|
||
Assignee | ||
Comment 21•6 years ago
|
||
Assignee | ||
Comment 22•6 years ago
|
||
Assignee | ||
Comment 23•6 years ago
|
||
Assignee | ||
Comment 24•6 years ago
|
||
Assignee | ||
Comment 25•6 years ago
|
||
Assignee | ||
Comment 26•6 years ago
|
||
Assignee | ||
Comment 27•6 years ago
|
||
Assignee | ||
Comment 28•6 years ago
|
||
Assignee | ||
Comment 29•6 years ago
|
||
Assignee | ||
Comment 30•6 years ago
|
||
Assignee | ||
Comment 31•6 years ago
|
||
Assignee | ||
Comment 32•6 years ago
|
||
Assignee | ||
Comment 33•6 years ago
|
||
Assignee | ||
Comment 34•6 years ago
|
||
Assignee | ||
Comment 35•6 years ago
|
||
Assignee | ||
Comment 36•6 years ago
|
||
Assignee | ||
Comment 37•6 years ago
|
||
Assignee | ||
Comment 38•6 years ago
|
||
A lot of loops in HTMLTableEditor.cpp scans cells along column-axis or
row-axis. In those cases, they need to skip columns/rows which are spanned
from prior column/row. So, we can rewrite them with CellData::NextColumnIndex()
or CellData::NextRowColumn().
Comment 39•6 years ago
|
||
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/d7f0492bf262
part 0: Add automated tests for nsITableEditor.getCellDataAt() r=m_kato
https://hg.mozilla.org/integration/autoland/rev/bf74fc63e816
part 1: Create CellData struct which implements nsITableEditor::GetCellDataAt() r=m_kato
https://hg.mozilla.org/integration/autoland/rev/d3609fcd3c88
part 2: Make all nsITableEditor::GetCellDataAt() use CellData r=m_kato
https://hg.mozilla.org/integration/autoland/rev/24e31e2070fa
part 3: Make all CellData users use CellData::mCurrent.mRow r=m_kato
https://hg.mozilla.org/integration/autoland/rev/539a4c3e1946
part 4: Make all CellData users use CellData::mCurrent.mColumn r=m_kato
https://hg.mozilla.org/integration/autoland/rev/181c07ae07c5
part 5: Make all CellData users refer CellData::mElement directly r=m_kato
https://hg.mozilla.org/integration/autoland/rev/0f9a168cb7c8
part 6: Make all CellData users refer CellData::mFirst.mRow directly r=m_kato
https://hg.mozilla.org/integration/autoland/rev/448d887560d4
part 7: Replace all comparisons of CellData::mFirst.mRow and CellData::mCurrent.mRow with CellData::IsSpannedFromOtherRow() r=m_kato
https://hg.mozilla.org/integration/autoland/rev/b23363aa593d
part 8: Replace |CellData::mCurrent.mRow - CellData::mFirst.mRow| with CellData::NumberOfPrecedingRows() r=m_kato
https://hg.mozilla.org/integration/autoland/rev/8f7afde0a6f6
part 9: Make all CellData users refer CellData::mFirst.mColumn directly r=m_kato
https://hg.mozilla.org/integration/autoland/rev/3e9c08f4f705
part 10: Replace all comparisons of CellData::mFirst.mColumn and CellData::mCurrent.mColumn with CellData::IsSpannedFromOtherColumn() or CellData::IsSpannedFromOtherRowOrColumn() r=m_kato
https://hg.mozilla.org/integration/autoland/rev/6ab5dd75fbf4
part 11: Make all CellData users refer CellData.mRowSpan directly r=m_kato
https://hg.mozilla.org/integration/autoland/rev/e0cea47221b8
part 12: Make all CellData users refer CellData::mColSpan directly r=m_kato
https://hg.mozilla.org/integration/autoland/rev/3e1b1e01e6a4
part 13: Make all CellData users refer CellData::mEffectiveRowSpan directly r=m_kato
https://hg.mozilla.org/integration/autoland/rev/ed17432df28c
part 14: Replace |CellData::mEffectiveRowSpan - 1| with CellData::NumberOfFollowingRows() r=m_kato
https://hg.mozilla.org/integration/autoland/rev/e5c8e5cbaf3d
part 15: Make all CellData users refer CellData::mEffectiveColspan directly r=m_kato
https://hg.mozilla.org/integration/autoland/rev/4c70964d90fd
part 16: Replace |CellData::mEffectiveColSpan - 1| with CellData::NumberOfFollowingColumns() r=m_kato
https://hg.mozilla.org/integration/autoland/rev/cbb895793f89
part 17: Make all CellData users refer CellData::mIsSelected directly r=m_kato
https://hg.mozilla.org/integration/autoland/rev/8a2722c90ac9
part 18: Make HTMLEditor::InsertTableCellsWithTransaction() use CellData::NextColumnIndex() instead of |CellData::mCurrent::mColumn + CellData::mColSpan| r=m_kato
https://hg.mozilla.org/integration/autoland/rev/35c3aff251f0
part 19: Replace |CellData::mCurrent.mColumn + CellData::NumberOfFollowingColumns()| with CellData::LastColumnIndex() r=m_kato
https://hg.mozilla.org/integration/autoland/rev/19605351b361
part 20: Replace |CellData::mFirst.mColumn + CellData::mEffectiveColSpan| with CellData::NextColumnIndex() r=m_kato
https://hg.mozilla.org/integration/autoland/rev/92c8efea7714
part 21: Rewrite some loops in HTMLTableEditor.cpp with CellData::NextColumnIndex() or CellData::NextRowIndex() r=m_kato
Comment 40•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d7f0492bf262
https://hg.mozilla.org/mozilla-central/rev/bf74fc63e816
https://hg.mozilla.org/mozilla-central/rev/d3609fcd3c88
https://hg.mozilla.org/mozilla-central/rev/24e31e2070fa
https://hg.mozilla.org/mozilla-central/rev/539a4c3e1946
https://hg.mozilla.org/mozilla-central/rev/181c07ae07c5
https://hg.mozilla.org/mozilla-central/rev/0f9a168cb7c8
https://hg.mozilla.org/mozilla-central/rev/448d887560d4
https://hg.mozilla.org/mozilla-central/rev/b23363aa593d
https://hg.mozilla.org/mozilla-central/rev/8f7afde0a6f6
https://hg.mozilla.org/mozilla-central/rev/3e9c08f4f705
https://hg.mozilla.org/mozilla-central/rev/6ab5dd75fbf4
https://hg.mozilla.org/mozilla-central/rev/e0cea47221b8
https://hg.mozilla.org/mozilla-central/rev/3e1b1e01e6a4
https://hg.mozilla.org/mozilla-central/rev/ed17432df28c
https://hg.mozilla.org/mozilla-central/rev/e5c8e5cbaf3d
https://hg.mozilla.org/mozilla-central/rev/4c70964d90fd
https://hg.mozilla.org/mozilla-central/rev/cbb895793f89
https://hg.mozilla.org/mozilla-central/rev/8a2722c90ac9
https://hg.mozilla.org/mozilla-central/rev/35c3aff251f0
https://hg.mozilla.org/mozilla-central/rev/19605351b361
https://hg.mozilla.org/mozilla-central/rev/92c8efea7714
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Blocks: add-scriptable-editor-API-tests
You need to log in
before you can comment on or make changes to this bug.
Description
•