Closed Bug 490182 Opened 11 years ago Closed 11 years ago

[FIX]Removing width attribute of <col> doesn't affect layout in this case

Categories

(Core :: Layout: Tables, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(3 files)

Attached file testcase (dynamic)
No description provided.
Attached file reference (static)
Attached patch Proposed fixSplinter Review
This is great fun.  Basically, when we insert the <col> into the table we put the colframe in the colgroup and then call FrameNeedsReflow() on the _table_.  We don't set any dirty bits on the colgroup.  The table's reflow ends up not reflowing the colgroup, so in particular we never reflow the <col> so we don't clear the NS_FRAME_IS_DIRTY bit or NS_FRAME_FIRST_REFLOW bit on it.

Then we change the "width" attribute, which computes a reflow change hint for the col, which calls nsCSSFrameConstructor::StyleChangeReflow, which does nothing because NS_FRAME_FIRST_REFLOW is set.

The bounce() call is not involved here; the bug is still there even if that's taken out.

The proposed patch just makes us mark the right dirty bits on the colgroup.  The removal of the FrameNeedsReflow call in nsTableColGroupFrame::RemoveFrame is ok because the RemoveChild call we make immediately above that handles calling it.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #374864 - Flags: superreview?(dbaron)
Attachment #374864 - Flags: review?(bernd_mozilla)
Summary: Removing width attribute of <col> doesn't affect layout in this case → [FIX]Removing width attribute of <col> doesn't affect layout in this case
Comment on attachment 374864 [details] [diff] [review]
Proposed fix

Maybe leave a comment in RemoveFrame pointing out that the call in question handles the necessary marking dirty?

sr=dbaron
Attachment #374864 - Flags: superreview?(dbaron) → superreview+
Good idea.  Done.
Attachment #374864 - Flags: review?(bernd_mozilla) → review+
Pushed http://hg.mozilla.org/mozilla-central/rev/c532f17489f7
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.