Bug 13568

Summary: [CSS21] Make XHTML <body> magic just like HTML <body>
Product: WebKit Reporter: Simon Pieters <zcorpan>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Major CC: ap, emacemac7, gavin.sharp, hyatt, nickshanks, webkit, zcorpan
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
URL: http://simon.html5.org/test/css/magic-body/
Attachments:
Description Flags
background-color/001.xht: background on body should fill the canvas
none
background-color/003.htm: background on body should not fill the canvas when root is not html:html
none
background-color/005-declarative.xht: background on body should fill the canvas even when it has bogus siblings
none
background-color/006.htm: background on subsequent bodys should not cover the canvas
none
background-color/008.xht: when background on body is propagated to the canvas, it shouldn't have a background itself
none
background-image/009.htm: background on body when propagated to the canvas should be anchored at the root element
none
background-image/009.xht: background on body when propagated to the canvas should be anchored at the root element
none
overflow/001.xht: overflow on body should propagate to the viewport
none
overflow/002.htm: overflow on body should not propagate to the viewport when root has overflow
none
overflow/003.htm: overflow on body should not propagate to the viewport when root is not html:html
none
overflow/005-declarative.xht: overflow on body should propagate to the viewport even when it has bogus siblings
none
overflow/006.htm: overflow on subsequent bodys should not propagate to the viewport
none
overflow/007.htm: overflow on body should not propagate to the viewport when not child of root none

Description Simon Pieters 2007-05-02 07:41:53 PDT
<body> is magic in HTML but not in XHTML, and there are bugs in some edge
cases. (Note that this bug is invalid per the current spec, but the plan is to
change the spec:
http://lists.w3.org/Archives/Public/www-style/2007Apr/0196.html )

Reproducible: Always

Steps to Reproduce:
1. Run the test cases.
2.
3.
Actual Results:  
'background-color', 'background-image' and 'overflow' is not handled
equivalently between HTML and XHTML, and there are some bugs in the edge cases
as well.

Expected Results:  
'background-color', 'background-image' and 'overflow' should work the same in
both HTML and XHTML when applied to <body>. Edge cases should be handled as
what the current spec says should happen for HTML.
Comment 1 Alexey Proskuryakov 2007-05-03 12:46:21 PDT
This is also in b.m.o. as <https://bugzilla.mozilla.org/show_bug.cgi?id=379461>.
Comment 2 Dave Hyatt 2007-05-03 22:12:26 PDT
There are two isHTMLDocument background checks in RenderBox and then the overflow isHTMLDocument check is in FrameView I think.  This was all done on purpose following the spec of course, but I suppose we could change it.
Comment 3 Dave Hyatt 2007-05-03 22:15:23 PDT
Apparently background behavior matches Firefox more or less, overflow behavior doesn't.  We're following the curent spec more closely than anyone it seems.
Comment 4 Simon Pieters 2007-05-04 05:42:16 PDT
Created attachment 14326 [details]
background-color/001.xht: background on body should fill the canvas
Comment 5 Simon Pieters 2007-05-04 05:43:25 PDT
Created attachment 14328 [details]
background-color/003.htm: background on body should not fill the canvas when root is not html:html
Comment 6 Simon Pieters 2007-05-04 05:44:27 PDT
Created attachment 14329 [details]
background-color/005-declarative.xht: background on body should fill the canvas even when it has bogus siblings
Comment 7 Simon Pieters 2007-05-04 05:45:18 PDT
Created attachment 14331 [details]
background-color/006.htm: background on subsequent bodys should not cover the canvas
Comment 8 Simon Pieters 2007-05-04 05:46:11 PDT
Created attachment 14332 [details]
background-color/008.xht: when background on body is propagated to the canvas, it shouldn't have a background itself
Comment 9 Simon Pieters 2007-05-04 05:49:34 PDT
Created attachment 14334 [details]
background-image/009.htm: background on body when propagated to the canvas should be anchored at the root element
Comment 10 Simon Pieters 2007-05-04 05:50:54 PDT
Created attachment 14335 [details]
background-image/009.xht: background on body when propagated to the canvas should be anchored at the root element
Comment 11 Simon Pieters 2007-05-04 05:52:20 PDT
Created attachment 14336 [details]
overflow/001.xht: overflow on body should propagate to the viewport
Comment 12 Simon Pieters 2007-05-04 05:52:59 PDT
Created attachment 14337 [details]
overflow/002.htm: overflow on body should not propagate to the viewport when root has overflow
Comment 13 Simon Pieters 2007-05-04 05:53:46 PDT
Created attachment 14338 [details]
overflow/003.htm: overflow on body should not propagate to the viewport when root is not html:html
Comment 14 Simon Pieters 2007-05-04 05:54:33 PDT
Created attachment 14339 [details]
overflow/005-declarative.xht: overflow on body should propagate to the viewport even when it has bogus siblings
Comment 15 Simon Pieters 2007-05-04 05:55:38 PDT
Created attachment 14340 [details]
overflow/006.htm: overflow on subsequent bodys should not propagate to the viewport
Comment 16 Simon Pieters 2007-05-04 05:56:29 PDT
Created attachment 14341 [details]
overflow/007.htm: overflow on body should not propagate to the viewport when not child of root
Comment 17 Robert Blaut 2008-02-21 12:16:21 PST
I can confirm the bug. In my opinion we should change behavior to align other browsers since Gecko has the bug https://bugzilla.mozilla.org/show_bug.cgi?id=379461 already fixed!
Comment 18 Simon Pieters 2008-06-18 11:51:13 PDT
FWIW, Opera 9.5 treats HTML and XHTML the same here.
Comment 19 Nicholas Shanks 2008-08-13 05:18:15 PDT
And for what it's worth, I'd like XHTML to be always nonā€magical, just as every other XML format. There is a reason we have both, and it's not so that you can add slashes to the end of empty element tags. If you need magical behaviour, which only exists for legacy reasons, then you should be using HTML, not XML.
Comment 20 Simon Pieters 2008-10-15 04:44:49 PDT
Was this fixed now, David?