Summary: | Fieldset layout incorrect when styled by CSS | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Blundell <david.blundell> | ||||||||||||||
Component: | Layout and Rendering | Assignee: | Dave Hyatt <hyatt> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | ian | ||||||||||||||
Priority: | P2 | Keywords: | HasReduction | ||||||||||||||
Version: | 412 | ||||||||||||||||
Hardware: | Mac | ||||||||||||||||
OS: | OS X 10.4 | ||||||||||||||||
Attachments: |
|
Description
David Blundell
2005-07-07 14:54:00 PDT
Created attachment 2852 [details]
Safari screenshot showing incorrect rendering
Created attachment 2853 [details]
Firefox screenshot showing correct rendering
Created attachment 2854 [details]
Explorer screenshot showing correct rendering
Confirmed, i will attach the code below as a minimal testcase. Created attachment 5312 [details]
Test case as attachment
This really could use some further reduction. Created attachment 5324 [details]
Minimal Testcase
This is very small, and should allow for some easy fixing :)
Changed NeedsReduction to HasReduction, since i just added it. This is a fun bug. Apparently there's an unspecified behavior for fieldsets, which is that they behave in a fashion similar to floats. If the height of a fieldset is auto then it expands to encompass overhanging floats (just as an enclosing float might). This would be an interesting thing to note in the HTML5 WhatWG spec, as this behavior is not documented anywhere that I can find. Created attachment 10510 [details]
Patch that fixes the bug
Create a new method, allowOverhangingFloats(), and better factor the code so that fieldsets and table cells can subclass for their respective specialized behaviors.
Comment on attachment 10510 [details]
Patch that fixes the bug
I would consider reversing the sense of allowOverhangingFloats and naming it something like expandsForOverhangingFloats().
In any case r=me
Fixed. (In reply to comment #12) > Fixed. In r16319. Tests in r16320. |