Scrollbars don't appear when replacing document element

RESOLVED WORKSFORME

Status

()

Core
Layout
RESOLVED WORKSFORME
15 years ago
9 years ago

People

(Reporter: peterv, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Reporter)

Description

15 years ago
I have a testcase where I'm adding text to a document and then remove and re-add
the documentElement, all in the onload handler. If I don't remove and re-add the
document element, the scrollbars appear correctly if the content doesn't fit in
the window, if I do remove and re-add they don't appear. While trying to make a
better testcase I noticed that it seems to be important that the document
doesn't need scrollbars before the onload handler runs and adds the content and
that the replacing of the documentElement needs to happen in the onload handler too.
(Reporter)

Comment 1

15 years ago
Created attachment 123326 [details]
Testcase (no scrollbars)
(Reporter)

Comment 2

15 years ago
Created attachment 123327 [details]
Testcase (scrollbars)
(Reporter)

Comment 3

15 years ago
Created attachment 123329 [details]
Testcase (no scrollbars)
Attachment #123326 - Attachment is obsolete: true
(Reporter)

Comment 4

15 years ago
Created attachment 123331 [details]
Testcase (scrollbars)
Attachment #123327 - Attachment is obsolete: true
This is the same old problem that we've hacked around before:

http://lxr.mozilla.org/seamonkey/source/content/html/document/src/nsHTMLDocument.cpp#2436
It wouldn't surprise me if this is the result of someone mindlessly
null-checking the result of GetParent rather than thinking about what to do if
it's null.  I've seen it happen before...
Depends on: 78070
So... this worksforme on trunk, for whatever reason.

No idea how to write a test for this, though.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.