Closed Bug 205725 Opened 22 years ago Closed 16 years ago

Scrollbars don't appear when replacing document element

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: peterv, Unassigned)

References

Details

Attachments

(2 files, 2 obsolete files)

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.
Attached file Testcase (no scrollbars) (obsolete) —
Attached file Testcase (scrollbars) (obsolete) —
Attachment #123326 - Attachment is obsolete: true
Attached file 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...
So... this worksforme on trunk, for whatever reason. No idea how to write a test for this, though.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: