From: hyatt Date: Thu, 3 Mar 2005 23:54:13 +0000 (+0000) Subject: Fix for 3841186, scrollbar shows up disabled when it should not appear at all. ... X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=179aed2a0aa950d8d688238d9cbccfbbe2d55a41 Fix for 3841186, scrollbar shows up disabled when it should not appear at all. Make sure updateScrollers is never allowed to be re-entrant from any call point by moving the guard inside the function itself. Reviewed by John Sullivan * WebView.subproj/WebDynamicScrollBarsView.m: (-[WebDynamicScrollBarsView updateScrollers]): (-[WebDynamicScrollBarsView reflectScrolledClipView:]): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8765 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog index f24ddc015319..13ccd4322432 100644 --- a/WebKit/ChangeLog +++ b/WebKit/ChangeLog @@ -1,3 +1,14 @@ +2005-03-01 David Hyatt + + Fix for 3841186, scrollbar shows up disabled when it should not appear at all. Make sure updateScrollers + is never allowed to be re-entrant from any call point by moving the guard inside the function itself. + + Reviewed by John Sullivan + + * WebView.subproj/WebDynamicScrollBarsView.m: + (-[WebDynamicScrollBarsView updateScrollers]): + (-[WebDynamicScrollBarsView reflectScrolledClipView:]): + 2005-03-02 Chris Blumenberg Fixed: Expose method to retrieve drag image for WebView's selection @@ -31,6 +42,7 @@ === Safari-401 === +>>>>>>> 1.3057 2005-03-01 John Sullivan Reviewed by Darin. diff --git a/WebKit/WebView.subproj/WebDynamicScrollBarsView.m b/WebKit/WebView.subproj/WebDynamicScrollBarsView.m index 18febec39810..71fca9448ae6 100644 --- a/WebKit/WebView.subproj/WebDynamicScrollBarsView.m +++ b/WebKit/WebView.subproj/WebDynamicScrollBarsView.m @@ -33,7 +33,11 @@ // twice would indicate some kind of infinite loop, so we do it at most twice. // It's quite efficient to do this work twice in the normal case, so we don't bother // trying to figure out of the second pass is needed or not. + if (inUpdateScrollers) + return; + inUpdateScrollers = true; + int pass; BOOL hasVerticalScroller = [self hasVerticalScroller]; BOOL hasHorizontalScroller = [self hasHorizontalScroller]; @@ -92,6 +96,8 @@ [[self verticalScroller] setNeedsDisplay: NO]; [[self horizontalScroller] setNeedsDisplay: NO]; } + + inUpdateScrollers = false; } // Make the horizontal and vertical scroll bars come and go as needed. @@ -104,11 +110,8 @@ // http://www.linuxpowered.com/archive/howto/Net-HOWTO-8.html. // The underlying cause is some problem in the NSText machinery, but I was not // able to pin it down. - if (!inUpdateScrollers && [[NSGraphicsContext currentContext] isDrawingToScreen]) { - inUpdateScrollers = YES; + if (!inUpdateScrollers && [[NSGraphicsContext currentContext] isDrawingToScreen]) [self updateScrollers]; - inUpdateScrollers = NO; - } } [super reflectScrolledClipView:clipView];