Closed
Bug 4534
Opened 26 years ago
Closed 26 years ago
FIELDSET right border edge disappears, perhaps due to enclosed FLOAT element?
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
VERIFIED
FIXED
M7
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.)
Reporter | ||
Comment 1•26 years ago
|
||
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)."
Reporter | ||
Updated•26 years ago
|
Assignee: peterl → kipp
Reporter | ||
Comment 2•26 years ago
|
||
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)."
Comment 3•26 years ago
|
||
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> </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>
Updated•26 years ago
|
QA Contact: 4110 → 4137
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.
Updated•26 years ago
|
Status: NEW → ASSIGNED
Comment 5•26 years ago
|
||
Moving to M8.
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•26 years ago
|
||
This now works. I also added a test page at:
resource:/res/samples/fieldsets.html
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.
Description
•