RESOLVED FIXED 11749
ScrollBar::setProportion() calls updateThumbProportion() unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=11749
Summary ScrollBar::setProportion() calls updateThumbProportion() unnecessarily
Don Gibson
Reported 2006-12-04 15:00:43 PST
setProportion() blindly calls updateThumbProportion() even when nothing has changed. Depending on how platforms implement updateThumbProportion(), this can lead to anything from too much work to infinite loops. Rather than force updateThumbProportion() to realize when the proportion has not been updated, we should just make setProportion() be like setPosition() and do nothing when appropriate. Patch coming shortly.
Attachments
patch v1 (1.01 KB, patch)
2006-12-04 15:10 PST, Don Gibson
darin: review+
Don Gibson
Comment 1 2006-12-04 15:10:47 PST
Created attachment 11731 [details] patch v1 The simplest possible fix. I could have made setProportion() return a bool (like setPosition() does) or check that its arguments were positive, but I didn't have a particular reason to do so.
Alexey Proskuryakov
Comment 2 2006-12-05 01:13:50 PST
(In reply to comment #0) > Depending on how platforms implement updateThumbProportion(), this > can lead to anything from too much work to infinite loops. Sounds like this fix needs a layout test then (especially if the latter is the Windows behavior). Is it possible to make one?
Darin Adler
Comment 3 2006-12-07 15:42:03 PST
Comment on attachment 11731 [details] patch v1 Looks fine, r=me.
Mark Rowe (bdash)
Comment 4 2006-12-07 16:23:06 PST
Landed in r18066.
Note You need to log in before you can comment on or make changes to this bug.