Bug 134664 - [test case] background on root not propagated to canvas if root is of table display
Summary: [test case] background on root not propagated to canvas if root is of table d...
Status: CONFIRMED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.8.4
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL: http://test.csswg.org/suites/css2.1/l...
Keywords: reproducible, testcase, triaged
Depends on:
Blocks:
 
Reported: 2006-09-26 05:18 UTC by khtmltest
Modified: 2012-06-21 21:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (322 bytes, text/html)
2006-09-26 05:18 UTC, khtmltest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description khtmltest 2006-09-26 05:18:16 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    FreeBSD Ports
Compiler:          gcc 3.4.6 
OS:                FreeBSD

If the root element is of table display, and both root and body elements have background specified of non-initial value, then background on root element is applied to body, and body background is applied to root.

This is a spec violation in KHTML 3.5.4. Testcase below.

<!DOCTYPE html>
<html>
<head>
<title>root table and backgrounds</title>
<style type="text/css">
html {
	background: gray;
	width: 500px;
	display: table;
}
body {
	background: white;
	margin: 100px;
}
</style>
</head>

<body>
<div>The page should be gray, and only this text should be in a white box.</div>
</body>
</html>

Note: might be related to Bug 134304
Comment 1 khtmltest 2006-09-26 05:18:47 UTC
Created attachment 17915 [details]
testcase
Comment 2 Tommi Tervo 2006-09-26 09:48:09 UTC
Confirmed, r588485.
Comment 3 khtmltest 2006-09-26 17:40:40 UTC
The high value of the body margin provides additional insight into the nature of the problem. Margins do not collapse between the root element any other element, therefore the gray box as evidenced in Konqueror 3.5.4 has dimensions equivalent to the box of computed height and width for the root element, and the background is correct (gray). 

However, the background on the root element should be propagated to viewport, if the dimensions of the root element are smaller than the dimensions of the viewport. Body background (white) is instead propagated to viewport, whereas the body element itself loses the white background. The white box should be shrink-to-fit, covering the two lines of text only.

Visually, this presents itself as if the body and root backgrounds were exchanged, but that statement is not precise enough.
Comment 4 Allan Sandfeld 2006-11-10 14:44:38 UTC
The background on body has no effect. 
Comment 5 Frank Reininghaus 2008-04-24 19:34:28 UTC
I can confirm this in 3.5.9 and SVN trunk rev. 798811. 

Interesting:
1. If you have several tabs open in SVN trunk 798811 and change from another tab to the one with the test case, only the grey box around the text is drawn. The rest of the page still shows the contents of the previous tab. This is not the case in 3.5.9: the page background is white except for the grey box.
2. Firefox 2.0.0.13 doesn't draw a white box around the text either - the whole page is grey, i.e., the background specified for body doesn't have any effect here either (see comment #4).
Comment 6 Gérard Talbot (no longer involved) 2010-04-24 19:38:41 UTC
Hello all,

I submitted the bug reporter's testcase to CSS 2.1 test suite:

http://test.csswg.org/source/contributors/gtalbot/submitted/background-root-003.htm

and

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/background-root-003.html

and it will be included into the next snapshot of the CSS 2.1 test suite.

khtmltest (annavoy), I tried to reach you via email so that I could add your name and credit your testcase (provided you would sign up the W3C form). Your email address is broken. If you ever read this, please visit

http://wiki.csswg.org/test/css2.1/contribute

and

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

and then contact me.

------------------

I can still confirm the bug: Konqueror 4.4.2, under Linux 2.6.31-19-generic, Qt 4.6.2, KDE 4.4.2 platform here.

regards, Gérard Talbot
Comment 7 Gérard Talbot (no longer involved) 2011-01-31 02:48:11 UTC
Testcase url in the CSS 2.1 test suite (build January 11th 2011: Release Candidate 5) :

http://test.csswg.org/suites/css2.1/20110111/html4/background-root-003.htm

The bug still happens in Konqueror 4.5.5, under Linux 2.6.35-25-generic-pae (i686: 32bit), Qt 4.7.0 under KDE 4.5.5 platform.

Gérard
Comment 8 Gérard Talbot (no longer involved) 2012-06-21 21:29:03 UTC
This bug is still reproduceable.

Latest version of test in CSS 2.1 test suite:
http://test.csswg.org/suites/css2.1/20110323/html4/background-root-003.htm
or
http://test.csswg.org/suites/css2.1/latest/html4/background-root-003.htm

I am using
KDE Platform Version: 4.8.4
Konqueror version: 4.8.4 (with KHTML rendering engine)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-25-generic-pae i686 (32bits)
Distribution: Kubuntu 12.04 LTS
here.

Summary field, Component field, Version field, URL field and Keywords field have been updated.

Gérard