Open Bug 459924 Opened 16 years ago Updated 2 years ago

[CSS21] magic body element handling not stopped when body element removed

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

People

(Reporter: dbaron, Unassigned)

References

(Blocks 1 open bug, )

Details

This is spun off from bug 421469.

We fail the following tests:
http://simon.html5.org/test/css/magic-body/overflow/004.htm
http://simon.html5.org/test/css/magic-body/overflow/004.xht

Actual results: scrollbars present on box and viewport

Expected results: scrollbars present on box, but not on viewport, as in http://simon.html5.org/test/css/magic-body/overflow/004-declarative.xht


It seems like we have problems detecting the dynamic change when a body element is removed.  (Once it's removed, it's harder to test if it *was* the body, since it's no longer the body (i.e., the first <body> element child of the root <html> element).

We probably ought to test what happens to:
 (a) background propagation
 (b) overflow propagation
when:
 (1) the root element is removed or added
 (2) the document's body changes due to insertion or removal of an additional body
element (before or after)
 (3) when the only body element is removed or added


We have some code to handle dynamic changes for background propagation in ApplyRenderingChangeToTree in nsCSSFrameConstructor.cpp .  I'm not sure where any existing code for dynamic changes to overflow propagation is.
(And note that one way to avoid having to handle dynamic changes is to avoid caching stuff that we don't really need to cache; that might be a possibility here.)
OS: Linux → All
Hardware: PC → All
Some of the background stuff will also get fixed in bug 480880.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.