Closed Bug 6630 Opened 26 years ago Closed 26 years ago

{css1} Incorrect sizing of HTML if BODY has no content

Categories

(Core :: Layout, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: vidur, Assigned: troy)

References

()

Details

(Keywords: css1)

You'll notice that the top-left frame of the frameset from this example exhibits whacky behavior. It's a page with a body background image, but no content. I believe fixing this problem will fix the page, but the redundant drawing that's a manifestation of the problem is scary in itself. (cc:ing Chris Karnaze to see if he can explain the redundant drawing problem).
Status: NEW → ASSIGNED
Assignee: rickg → karnaze
Status: ASSIGNED → NEW
Chris -- I'm seeing the drawing problem too, and that appears to be the only issue. If you make a quick pass through, you may be able to tell if this is a frame bug or a rendering bug.
Actually I believe that this is a core layout bug. If you view a document that has a BODY with a background, but no content, the sizing of the area frame (which I believe is responsible for drawing the background) is incorrect.
Assignee: karnaze → kipp
I think Vidur is right. http://www.medanet.de/der.html is the top left frame doc, and if it is brought up alone in Viewer, nothing displays. Reassigning to Kipp and CCing Troy.
Per CSS, if BODY has no content and no height given, it gets a zero height, just like an empty P or DIV would.
Actually, maybe not, if you read section 4.5 of CSS1. There are some arguments for preventing BODY and HTML from filling less than the canvas. It makes them exceptions from the normal CSS rules, but it fits better with traditional behavior. CSS really should have had a way to address the canvas...
Summary: Incorrect sizing for documents with a body background and no content → Incorrect sizing of HTML if BODY has no content
Target Milestone: M15
HTML is not particularly special, apart from being the root element. BODY is not special at all. (HTML has some special rules w.r.t. working out its value for the background property, but these do not apply here.) Root elements should, for best effect, have the width of the viewport and the height of max(viewport, content). In general, HTML does. However, if BODY has no content, borders, padding or height, or has display set to none, or if it is floated, then HTML sizes itself with the minimum possible width. This is bad. For example, put the following in a file on its own and pipe it through viewer: <STYLE type="text/css"> HTML { border: 1em aqua solid; padding: 1em; background: teal; } </STYLE> You will see that the HTML element does not extend all the way across the viewport (it only fits itself in the vertical dimension). This is also visible on this page: http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/htmlbodyrendering2.html This is a relatively recent regression.
*** Bug 6948 has been marked as a duplicate of this bug. ***
Summary: Incorrect sizing of HTML if BODY has no content → {css1} Incorrect sizing of HTML if BODY has no content
*** Bug 6793 has been marked as a duplicate of this bug. ***
Blocks: 6713
*** Bug 7977 has been marked as a duplicate of this bug. ***
QA Contact: petersen → chrisd
Assignee: kipp → troy
Status: NEW → ASSIGNED
Yeah, this used to work fine, but it's broken now. Kipp must have broken it while I was on sabbatical. Re-assigning to me...
The HTML for the top-left frame is: <HTML> <HEAD> <BASE HREF="http://http://www.medanet.de/"> </HEAD> <BODY background="logoobenani2.gif" BGCOLOR="#ffffff"> </BODY> </HTML>
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Using 8/2 Apprunner with test cases from 5/23, verify bug fixed.
Keywords: css1
Migrating from {css1} to css1 keyword. The {css1}, {css2}, {css3} and {css-moz} radars should now be considered deprecated in favour of keywords. I am *really* sorry about the spam...
You need to log in before you can comment on or make changes to this bug.