Open Bug 477415 Opened 14 years ago Updated 14 years ago

Canvas background not propagated from the "body" element for XHTML document served as generic XML

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

People

(Reporter: stanio, Unassigned)

References

Details

(Keywords: css2)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14 (Spidey; Mnenhy 0.7.6)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090207 Shiretoko/3.1b3pre

According to the latest CSS spec updates [1]:

> For documents whose root element is an HTML "HTML" element or an 
> XHTML "html" element that has computed values of 'transparent' for 
> 'background-color' and 'none' for 'background-image', user agents 
> must instead use the computed value of those properties from that 
> element's first HTML "BODY" element or XHTML "body" element child 
> when painting backgrounds for the canvas, and must not paint a 
> background for that child element.

The given behavior is not observed when served an XHTML document as generic application/xml (or text/xml), although the described rules still apply: the root element is "html" in the XHTML namespace and it has a child "body" element in the XHTML namespace.  May be this has something to do with Bug 349308?

This happens with latest-trunk builds, also:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090207 Minefield/3.2a1pre

Reproducible: Always

Steps to Reproduce:
1. Open the attached test case;
2. Observe the canvas background.
Actual Results:  
The canvas is not fully filled with the background color given for the "body" element - the default background color "shine" through the "body" margins and the area not covered by the "body".

Expected Results:  
The canvas should be fully filled with the background color given for the "body" element.

[1] http://www.w3.org/Style/css2-updates/issues-4-20061106.html#issue-31
Attached file Sample test
Blocks: 379461
(In reply to comment #0)
> May be this has something to do with Bug 349308?

Probably.  FindCanvasBackground and FindElementBackground depend on the document implementing nsIHTMLDocument in this case.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Keywords: css2
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.