Closed Bug 18189 Opened 25 years ago Closed 24 years ago

[INC CONTENT SINK] select scrollbars display multiple times on js enhanced form

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 30091

People

(Reporter: sidr, Assigned: eric)

References

()

Details

(Keywords: perf)

Summary:
At the eBay ListItemForSale page (URL above) multiple scrollbars appear without
previous scrollbars being cleared in <select>s as the <option> list is built up
by javascript enhancing the form. Once the <select> is finished, display is
fine, but the problem reoccurs if another category is selected.

Steps to Reproduce:
1. Go to the above URL and scroll down to the "Category" part of the form.
2. Click on "Books, Movies, Music ->" in the leftmost <select>
3. Click on "Magazines ->" in the second-from-leftmost <select>, watch closely.
4. When the options for the third select have finished appearing,
   click on "Antiques ->" in the leftmost <select> and watch closely.

Actual Results:
A. In step 3, three successive scrollbars without arrowheads at the top and
   bottom will appear, each one further to the right, before the options and
   the final scrollbar display.
B. In step 4, three successive scrollbars without arrowheads will appear
   in both the second and the third select before the second select is
   updated with the correct options for "Antiques ->". (The third select
   will still show the options for "Magazines ->", rather than being blanked,
   but that is probably another bug.)

Expected Results:
For both A. and B., the scrollbars will be drawn (redrawn) once only, in the
correct position docked at the right hand side of the select widget.

Tested with:
Windows NT 4.0sp3, 120MHz Pentium, mozilla.exe, 1999-11-06-08-M11 binary.
(If the computer is too fast, the multiple scrollbars may be displayed
 for only a moment)

Additional Information:
[4.xP] [Perf] The performance of the javascript-updating of the "Category"
part of the form is hideously slower than with NN 4.7 (this bug probably
would not be visible if it was as fast, but part of the slowdown must be the
incremental display).

Although the symptom is different, this bug may have the same underlying cause
as bug 17519, whose fix has been purposefully regressed due to crash problems.
Quoting: "This problem is caused by the incremental switch being thrown. There
was an assumption made that when the select gets its initial child list it can
be initialized. This is no longer true. The last item of the list may come in
afterward and the entire list will then need to be reinitialized. Which is what
my fix is."

Query:
Is the list being re-initialized every time the javascript adds another
<option>? That would certainly slow down performance, and explain the multiple
scrollbars.
Needless to say, there could be a DOM level 0 bug hiding somewhere in here
as well as a Form Control Bug.
Assignee: karnaze → rods
Reassigning to Rod.
Assignee: rods → karnaze
The URL:
http://cgi5.ebay.com/aw-cgi/eBayISAPI.dll?ListItemForSale
Chris, this is crashing for me in table frame code with an assert. Could you
take a look at the crash and then assign it back to me when you are done.
Assignee: karnaze → rods
I have fixed the crash. Back to you Rod.
Assignee: rods → karnaze
Severity: normal → critical
Depends on: 18201
Summary: select scrollbars display multiple times on js enhanced form → [CRASH] select scrollbars display multiple times on js enhanced form
Whiteboard: DOGFOOD
I had to back out that change due to regressions in mail/news. Adding crash
to summary and dogfood to status whiteboard. This won't get fixed until 18201 is
fixed and I can run regression tests.
Status: NEW → ASSIGNED
Summary: [CRASH] select scrollbars display multiple times on js enhanced form → [INC CONTENT SINK] select scrollbars display multiple times on js enhanced form
Whiteboard: DOGFOOD
This is temporarily fixed because I reverted nsPresShell.cpp back before the
delayed processing of reflow commands. Please leave this bug open, because
delayed reflow commands will be turned back on. Removing CRASH from summary,
DOGFOOD from whiteboard and adding INC CONTENT SINK to summary.
QA Contact update.
Target Milestone: M13
Target Milestone: M13 → M14
mass move to m14.
Rod, the table assert is gone, and I'm seeing the multiple scroll bars. Back to 
you.
Assignee: karnaze → rods
Status: ASSIGNED → NEW
Target Milestone: M14
I am not seeing mulitple scrollbars, what is the problem here?
Status: NEW → ASSIGNED
setting to M15
Target Milestone: M15
This same problem is showing very clearly on the Bugzilla Query form:

1. Load http://bugzilla.mozilla.org/query.cgi
2. Select "Browser" in the "Program" <SELECT>
3. Watch the "Component" and "Version" <SELECT>s

Expected:
The <SELECT>s for "Component" and "Version" will be updated completely by
the js, then displayed in their new state, as with NN 4.x.

Actual Results:
The <SELECT>s are redisplayed dozens of times, never completely before the
next redisplay, leaving bits of many partial renderings visible, until the
final update -- presumably one redisplay per reinitialization per change to 
each <SELECT>. The whole process takes much longer (seconds) with Mozilla than
4.x

Retested with the 2000-02-28-08-M15 nightly binary on WinNT 4.0
Keywords: 4xp, perf
Eric I think your were on a related bug for printing.
Assignee: rods → evaughan
Status: ASSIGNED → NEW
*** Bug 30268 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Target Milestone: M15 → M16
Mass-moving all M16 non-feature bugs to M17, which we still consider to be 
part of beta2
Target Milestone: M16 → M17
reducing severity to normal, there is no crash, data loss or severe leak here.
Severity: critical → normal
This problem happens because the reflows caused by appending option elements to 
the select are not coalesced.  Marking this as a dup of 30091.  Rod and I will 
work towards fixing this.

*** This bug has been marked as a duplicate of 30091 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Verified duplicate.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.