Closed Bug 286143 Opened 20 years ago Closed 20 years ago

Content gets doubled when hovering over tbody which has style tbody:hover{display:table-caption;}

Categories

(Core :: Layout: Tables, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: martijn.martijn, Assigned: bernd_mozilla)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

The testcase comes from bug 281527. The content gets doubled when hovering over the text in the testcase. This should not happen.
Blocks: 286137
Attached patch patchSplinter Review
the patch does not fix the crash in the dependent bug 286137 but testcases 2 and 3 in that bug
Assignee: nobody → bernd_mozilla
Status: NEW → ASSIGNED
Attachment #177636 - Flags: superreview?(bzbarsky)
Attachment #177636 - Flags: review?(bzbarsky)
Comment on attachment 177636 [details] [diff] [review] patch So... it seems this code is just pretty confused, all told. Notice the call to GetCaptionAdjustedParent in the "aParent is not a table" branch of this if. That seems to be pretty bogus, no? Not only that, but how are we ending up in AppendFrames with a caption? What This function appends an entire list, of frames, no? Is it only called with lists of length 1? What happens when a caption is not the first element of the list? Or when a caption is first but a non-caption follows? All this apart from AppendFrames clearly saying it deals with _principal_ child lists, so we shouldn't be entering it with captions, table columns, etc! If we ever end up supporting :after on tables (which we need to do for CSS2.1 compliance), the very first block of code in this method will screw up the append for those frame types. If only lists of length one are passed in and AppendFrames is expected to handle non-principal child lists for some reason, I think some comments (asserts?) to that effect are in order, and I think the right logic here would be: nsIFrame* outerTableFrame; if (nsLayoutAtoms::tableFrame == aParentFrame->GetType() && nsLayoutAtoms::tableColFrame == aFrameList->GetType()) { // Do whatever with columns } else if (GetCaptionAdjustedParent(aParentFrame, aFrameList, &outerTableFrame)) { // append to outerTableFrame } else { // append to aParentFrame } Also, as long as we're here, GetCaptionAdjustedParent should probably call AdjustCaptionParentFrame or something... or we should only have one function that does this.
Attachment #177636 - Flags: superreview?(bzbarsky)
Attachment #177636 - Flags: superreview-
Attachment #177636 - Flags: review?(bzbarsky)
Attachment #177636 - Flags: review-
fixed by the checkin for bug 286137
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
(In reply to comment #0) > The testcase comes from bug 281527. What I see is an oscillating effect in which the line of text is formatted as a thin column, and then immediately re-formatted as a single line. I can certainly see how this happens, but is it the expected behaviour?
hmmm expected, the caption tries to minimize it size as the table that it should cover has 0 width (is nonexistent).That might be another bug but this one is fixed.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: