Open Bug 292379 Opened 19 years ago Updated 2 years ago

DT in DL is cut short (DT has display: block but width is too narrow

Categories

(Core :: Layout: Block and Inline, defect)

defect

Tracking

()

People

(Reporter: dhtmlkitchen, Unassigned)

References

()

Details

(Whiteboard: [reflow-refactor])

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

You can see that the DT elements do not fill the width of the containing DL
element. 

What would cause that? 

Reproducible: Always



Expected Results:  
The DD element should behave as any other block level element behaves. 

kwd: dd | definition list
Component: General → Layout: Block and Inline
OS: MacOS X → All
Product: Firefox → Core
QA Contact: general → layout.block-and-inline
Hardware: Macintosh → All
Version: unspecified → Trunk
The <dl> is absolutely positioned and has auto width.  This means its width is
shrink-wrap.  Thus its width depends on the widths of the kids, which would
depend on its width, etc.  So we make the whole thing shrink-wrap...

Once the reflow branch lands we may be able to make the kids the right width
(since I think per spec they should in fact be the width of the parent here).
Whiteboard: [reflow-refactor]
A little more complex than the first example, which unfortunately, cannot be found.
What exactly is the problem in that testcase?  There's no explanation in the testcase itself, and no screenshot of the "right" width should be here.
It seems like a few things are wrong.

The nested DL gets its width wrong. 

The width of the nested DL is not set (auto), so it should look to the container, div.dfn.

div.dfn gets its width from the nested DL, which gets its width from the DT plus I don't know what else. The DD is ignored in the DLs width calculation.

but div.dfn's red border covers the DT and the DD, not just the DD.

The widths of the DTs are cut short. This can be seen if outline is applied to them.

Console:
document.styleSheets[0].insertRule("div.dfn dt{outline: 1px dotted chartreuse}",7);
> The nested DL gets its width wrong. 

What width do you think it should get?  It looks to me like it's getting the same width as the <div class="dfn">, as expected.

> The widths of the DTs are cut short. This can be seen if outline is applied to
> them.

If I run the javascript in question, the <dt>s have the border going around them.

What am I missing?  Care to post a screenshot of what you see, after applying that rule?
And we _are_ talking trunk here, right?
Yes,2.(In reply to comment #6)
> And we _are_ talking trunk here, right?
> 
Yes.

buildID: 2007091417


DT is in Yellow background, in DL, but DD is outside of it. 

div.dfn has red border that surrounds the DDs and yellow background that surrounds only the DT area only.

The div.dfn should surround the whole list. Instead, only its border does.

(The DT is short in this case because it is inline).
I also see this in any recent trunk build on Linux, and in current tip on Mac. To get what you see I have to go back to builds from before the reflow branch landed, as expected.

Please double-check that this is really a trunk build?  If so, does it still happen in safe mode?
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: