Open
Bug 1616225
Opened 6 years ago
Updated 3 years ago
Apparent copy-paste error in table selection code
Categories
(Core :: DOM: Selection, defect, P3)
Core
DOM: Selection
Tracking
()
NEW
People
(Reporter: jfkthame, Unassigned)
References
(Regression)
Details
(Keywords: regression)
This code looks broken to me:
// Move to next cell in cellmap, skipping spanned locations
if (aTarget == TableSelection::Row)
colIndex += tableFrame->GetEffectiveRowSpanAt(rowIndex, colIndex);
else
rowIndex += tableFrame->GetEffectiveRowSpanAt(rowIndex, colIndex);
Note the use of GetEffectiveRowSpanAt in both lines; ISTM one of these should refer to Col rather than Row.
Looking back, this seems to have originated in bug 781409, where the code was changed from
if (aTarget == nsISelectionPrivate::TABLESELECTION_ROW)
colIndex += actualColSpan;
else
rowIndex += actualRowSpan;
using values retrieved from tableLayout->GetCellDataAt() earlier to the current form calling GetEffective... methods.
(I'm not sure I know how to create a test for this, as I don't know much about how table selection is supposed to behave. Apparently no existing tests depend on correctness here.)
Priority: -- → P3
Updated•5 years ago
|
Has Regression Range: --- → yes
Keywords: regression
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•