Closed Bug 4534 Opened 26 years ago Closed 25 years ago

FIELDSET right border edge disappears, perhaps due to enclosed FLOAT element?

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ekrock, Assigned: eric)

References

()

Details

URGENT: we want to use this demo in current builds at Internet World if possible; we can't use M3/DP2 because of a different, now-fixed bug. Compare display of this page in Gecko DP1 and 4/2 build and you'll see the problem right away. The FIELDSET right border edge disappears, perhaps due to enclosed FLOAT element. Can we fix in time for Internet World? Tested in AppRunner 04/04 build on WinNT 4.0. (We want to use Apprunner, not Viewer, so people see a browser-like UI for the demo.)
Temporarily reassigning to Kipp, per peterl; is there *any* way we can get this one fixed before the trade show next week? "FYI: I'm on leave through 4/9, if you want these bugs looked at, I suggest you assign them to someone else (Troy, Kipp and Chris Karnaze are good candidates)."
Assignee: peterl → kipp
Temporarily reassigning to Kipp, per peterl; is there *any* way we can get this one fixed before the trade show next week? "FYI: I'm on leave through 4/9, if you want these bugs looked at, I suggest you assign them to someone else (Troy, Kipp and Chris Karnaze are good candidates)."
Eric, as a workaround, set the margin-left of the fieldset to 0 in the style rule. If you need margins, since the fieldset is in a table, create a blank cell to the left of the fieldset and give it a width (e.g. <TD width=10>&nbsp;</TD>). Kipp, I put some code like the following in nsFieldSetFrame.cpp #ifndef bug4534_not_fixed FieldSetHack(legendReflowState, "fieldset's legend frame", PR_FALSE); #endif If FieldsetHack is called the html below has its right border on top of the div's border. If it is not called then there is too much space on the right border. The reflow state coming into nsFieldSetFrame::Reflow needs to be fixed so that FieldsetHack does not need to be called, and then the remaining problems in the fieldset code can be solved. <html><body> <div style="width:300px; border:1px solid black;"> <form> <fieldset style="border:1px solid red; margin-left:2px;"><legend>foo</legend> <p>bar</p> </fieldset> </form> </body></html>
Status: NEW → ASSIGNED
Target Milestone: M6
QA Contact: 4110 → 4137
Assignee: kipp → karnaze
Status: ASSIGNED → NEW
Here is some data to help chris fix the bugs in the field-set layout code. 1. the computedWidth and computedHeight are the content-area for your frame (inside the border and padding). the mComputedBorderPadding are available to save reflow time - you should use them instead of calling CalcBorder and CalcPadding (in fact you have to when percentages are involved). 2. The available space for the legend should be width = computed-width minus legends left+right margins height = NS_UNCONSTRAINEDSIZE the reason for the unconstrained height is that you aren't prepared to paginated your legends, so don't bother giving them a fixed height. 3. The available area for the content frame (the area frame you use) is identical to the legend available area except there are no margins to account for. width = computed-width height = NS_UNCONSTRAINEDSIZE The height is, again, unconstrained because you aren't prepared to paginate fieldsets. However, because you are (sometimes) a block element, you should see if your height is limited (computed-height != NS_AUTOHEIGHT) and if it is, then that should be your exact height when finished (don't forget to add in your borders and padding - remember that the exact height is the exact content height). Hopefully with all of this info, fieldset can be brought into line. The simple test case is a good one to make right. Regarding borders/padding and sizing: don't put in any hacks here as may be in other form elements - since fieldsets are new, we shouldn't need any hacks.
Status: NEW → ASSIGNED
Moving to M8.
Reassigning to Eric.
Assignee: karnaze → evaughan
Status: ASSIGNED → NEW
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
This now works. I also added a test page at: resource:/res/samples/fieldsets.html
Status: RESOLVED → VERIFIED
Well, this bug is fixed - but erkrock, you may have to file another bug if this is going to be used as a demo. In the 1999060208 build under NT, the FIELDSET right border edge is now there, but the image that says 'jump!Travel' &c. now displays underneath the drop-down lists. Ouch. Marking this bug as verified fixed however.
You need to log in before you can comment on or make changes to this bug.