[CSS21] Make XHTML <body> magic just like HTML <body>
https://bugs.webkit.org/show_bug.cgi?id=13568
Summary [CSS21] Make XHTML <body> magic just like HTML <body>
Simon Pieters
Reported 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.
Attachments
background-color/001.xht: background on body should fill the canvas (337 bytes, application/xhtml+xml)
2007-05-04 05:42 PDT, Simon Pieters
no flags
background-color/003.htm: background on body should not fill the canvas when root is not html:html (799 bytes, text/html)
2007-05-04 05:43 PDT, Simon Pieters
no flags
background-color/005-declarative.xht: background on body should fill the canvas even when it has bogus siblings (379 bytes, application/xhtml+xml)
2007-05-04 05:44 PDT, Simon Pieters
no flags
background-color/006.htm: background on subsequent bodys should not cover the canvas (706 bytes, text/html)
2007-05-04 05:45 PDT, Simon Pieters
no flags
background-color/008.xht: when background on body is propagated to the canvas, it shouldn't have a background itself (564 bytes, application/xhtml+xml)
2007-05-04 05:46 PDT, Simon Pieters
no flags
background-image/009.htm: background on body when propagated to the canvas should be anchored at the root element (832 bytes, text/html)
2007-05-04 05:49 PDT, Simon Pieters
no flags
background-image/009.xht: background on body when propagated to the canvas should be anchored at the root element (832 bytes, application/xhtml+xml)
2007-05-04 05:50 PDT, Simon Pieters
no flags
overflow/001.xht: overflow on body should propagate to the viewport (573 bytes, application/xhtml+xml)
2007-05-04 05:52 PDT, Simon Pieters
no flags
overflow/002.htm: overflow on body should not propagate to the viewport when root has overflow (599 bytes, text/html)
2007-05-04 05:52 PDT, Simon Pieters
no flags
overflow/003.htm: overflow on body should not propagate to the viewport when root is not html:html (987 bytes, text/html)
2007-05-04 05:53 PDT, Simon Pieters
no flags
overflow/005-declarative.xht: overflow on body should propagate to the viewport even when it has bogus siblings (720 bytes, application/xhtml+xml)
2007-05-04 05:54 PDT, Simon Pieters
no flags
overflow/006.htm: overflow on subsequent bodys should not propagate to the viewport (705 bytes, text/html)
2007-05-04 05:55 PDT, Simon Pieters
no flags
overflow/007.htm: overflow on body should not propagate to the viewport when not child of root (973 bytes, text/html)
2007-05-04 05:56 PDT, Simon Pieters
no flags
Alexey Proskuryakov
Comment 1 2007-05-03 12:46:21 PDT
Dave Hyatt
Comment 2 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.
Dave Hyatt
Comment 3 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.
Simon Pieters
Comment 4 2007-05-04 05:42:16 PDT
Created attachment 14326 [details] background-color/001.xht: background on body should fill the canvas
Simon Pieters
Comment 5 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
Simon Pieters
Comment 6 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
Simon Pieters
Comment 7 2007-05-04 05:45:18 PDT
Created attachment 14331 [details] background-color/006.htm: background on subsequent bodys should not cover the canvas
Simon Pieters
Comment 8 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
Simon Pieters
Comment 9 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
Simon Pieters
Comment 10 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
Simon Pieters
Comment 11 2007-05-04 05:52:20 PDT
Created attachment 14336 [details] overflow/001.xht: overflow on body should propagate to the viewport
Simon Pieters
Comment 12 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
Simon Pieters
Comment 13 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
Simon Pieters
Comment 14 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
Simon Pieters
Comment 15 2007-05-04 05:55:38 PDT
Created attachment 14340 [details] overflow/006.htm: overflow on subsequent bodys should not propagate to the viewport
Simon Pieters
Comment 16 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
Robert Blaut
Comment 17 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!
Simon Pieters
Comment 18 2008-06-18 11:51:13 PDT
FWIW, Opera 9.5 treats HTML and XHTML the same here.
Nicholas Shanks
Comment 19 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.
Simon Pieters
Comment 20 2008-10-15 04:44:49 PDT
Was this fixed now, David?
Note You need to log in before you can comment on or make changes to this bug.