Closed
Bug 366892
Opened 18 years ago
Closed 18 years ago
[FIX]nsCellMap::Synchronize should be smarter about calling GetMapFor
Categories
(Core :: Layout: Tables, defect)
Core
Layout: Tables
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
bernd_mozilla
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
We can make the safe assumption that _most_ of the cellmaps are in the right order, I think. That should allow us to do a lot better here.
The testcase is in bug 313295. See bug 313295 comment 35 for details.
Assignee | ||
Comment 1•18 years ago
|
||
Attachment #251355 -
Flags: review?(bernd_mozilla)
Assignee | ||
Updated•18 years ago
|
OS: Linux → All
Hardware: PC → All
Summary: nsCellMap::Synchronize should be smarter about calling GetMapFor → [FIX]nsCellMap::Synchronize should be smarter about calling GetMapFor
Target Milestone: --- → mozilla1.9alpha
+ // XXXbz we just cast |frame| to nsTableRowGroupFrame*. Why are
+ // we bothering to call mTableFrame.GetRowGroup()?
NEVER EVER miss the GetRowGroup() call, sometimes scrollframes wrap around the rowgroup frame and then it will certainly crash
Assignee | ||
Comment 3•18 years ago
|
||
> NEVER EVER miss the GetRowGroup() call, sometimes scrollframes wrap around
The point is that the code looks like:
nsIFrame* frame = (nsTableRowGroupFrame*)mRowGroups.ElementAt(mRowGroupIndex); if (!frame) ABORT1(PR_FALSE);
mRowGroup = mTableFrame.GetRowGroupFrame(frame); if (!mRowGroup) ABORT1(PR_FALSE);
If mRowGroups.ElementAt(mRowGroupIndex) returns a scrollframe, then we're dead as soon as we cast it to nsTableRowGroupFrame* and proceed to call virtual methods on it (which is what GetRowGroupFrame does). Having the cast here be a cast to nsIFrame* would make a lot more sense to me.
What would make even more sense is having nsTableFrame::OrderRowGroups fill an nsTPtrArray<nsIFrame> (and having that as a member in the iterator). I'd be happy to do that in a separate bug.
Assignee | ||
Comment 4•18 years ago
|
||
Assignee: nobody → bzbarsky
Attachment #251355 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #251491 -
Flags: review?(bernd_mozilla)
Attachment #251355 -
Flags: review?(bernd_mozilla)
Assignee | ||
Updated•18 years ago
|
QA Contact: bzbarsky → layout.tables
Attachment #251491 -
Flags: review?(bernd_mozilla) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #251491 -
Flags: superreview?(roc)
Attachment #251491 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 5•18 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•