|Summary:||ScrollBar::setProportion() calls updateThumbProportion() unnecessarily|
|Product:||WebKit||Reporter:||Don Gibson <dgibson77>|
|Component:||WebCore Misc.||Assignee:||Don Gibson <dgibson77>|
Description Don Gibson 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.
Comment 1 Don Gibson 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.
Comment 2 Alexey Proskuryakov 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?
Comment 3 Darin Adler 2006-12-07 15:42:03 PST
Comment on attachment 11731 [details] patch v1 Looks fine, r=me.