Closed Bug 24195 Opened 25 years ago Closed 24 years ago

Infinite reflow after adding content to scrollable frame

Categories

(Core :: Layout, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: rginda, Assigned: eric)

Details

Attachments

(2 files)

The attached testcase causes an infinite reflow loop when a piece of content is
dynamically appended to a scrollable div.

scrollflow.xul defines an HTML:DIV, named 'scrolldiv', with an explicit width of
50px (any width seems to work) and a style of 'overflow: auto'.  Next to the div
is a box containing an HTML:INPUT control (this box is vertically aligned, h
alignment does not exibhit the failure.)  The onLoad handler inserts a
dynamically created HTML:SPAN tag into 'scrolldiv'.

The scrollflow.html file displays a button used to window.open the
scrollflow.xul chrome.  The failure does not appear to happen for non-chrome
urls.

Steps to reproduce:
1) save the first attachment as scrollflow.html to some directory
2) save the second attachment as scrollflow.xul in the same directory used in
step 1
3) click the 'click to open window' button.

Actual Results:
When the onLoad handler inserts the span, the window is reflowed forever,
causing Mozilla to freeze, and CPU usage to spike.  Each pass through the loop
in
http://lxr.mozilla.org/seamonkey/source/layout/html/base/src/nsPresShell.cpp:1902
adds two reflow commands to the mReflowCommands array.  The reflow commands are
inserted from the line
http://lxr.mozilla.org/seamonkey/source/layout/html/base/src/nsGfxScrollFrame.cpp:1474
.  This function appears to run twice during each reflow, oscillating between
two possible values for scrollAreaSize.height.

Expected Results:
A new window appears, with the text "dynamic span" on the left half, and a text
entry box on the right.


This bug is blocking chatzilla, although I've found that not specifying a width
for the scrolldiv is a temporary workaround.

This occurs on Linux and Windows, havn't tested on Mac.  The bustage is fairly
recent (I'd guess within a week or less.)
Assignee: troy → evaughan
Scrolling problem so re-assigning to Eric
Status: NEW → ASSIGNED
Target Milestone: M14
targeting
putting on beta1 radar
The scrollflow.xul file is a LXR html file it is not a XUL file. Please supply 
another test case and reassign this back to me if it still happens.
Assignee: evaughan → rginda
Status: ASSIGNED → NEW
No, its a text file.  Both attachments work for me here.
Did you right click on scrollflow.xul and do a "save as..."?

Assignee: rginda → evaughan
targeting
Status: NEW → ASSIGNED
Target Milestone: M14 → M15
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Fixed in the July 6th build.
Status: RESOLVED → VERIFIED
Depends on: 30942
No longer depends on: 30942
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: