WebCore:
[WebKit-https.git] / WebKit / WebView / WebDynamicScrollBarsView.m
index c7ff77cc2c29744f8aba82d96bd94025e4ef7198..e30bad8e52d700819fe06137df85a4248260eb88 100644 (file)
 - (void)setScrollBarsSuppressed:(BOOL)suppressed repaintOnUnsuppress:(BOOL)repaint
 {
     suppressScrollers = suppressed;
 - (void)setScrollBarsSuppressed:(BOOL)suppressed repaintOnUnsuppress:(BOOL)repaint
 {
     suppressScrollers = suppressed;
-    if (suppressed || repaint) {
-        [[self verticalScroller] setNeedsDisplay: !suppressed];
-        [[self horizontalScroller] setNeedsDisplay: !suppressed];
+    if (suppressed) {
+        [[self verticalScroller] setNeedsDisplay:NO];
+        [[self horizontalScroller] setNeedsDisplay:NO];
     }
     }
+        
+    if (!suppressed && repaint)
+        [super reflectScrolledClipView:[self contentView]];
 }
 
 - (void)updateScrollers
 }
 
 - (void)updateScrollers
         if (!inUpdateScrollers && [[NSGraphicsContext currentContext] isDrawingToScreen])
             [self updateScrollers];
     }
         if (!inUpdateScrollers && [[NSGraphicsContext currentContext] isDrawingToScreen])
             [self updateScrollers];
     }
-    [super reflectScrolledClipView:clipView];
 
 
-    // Validate the scrollers if they're being suppressed.
-    if (suppressScrollers) {
-        [[self verticalScroller] setNeedsDisplay: NO];
-        [[self horizontalScroller] setNeedsDisplay: NO];
-    }
+    // Update the scrollers if they're not being suppressed.
+    if (!suppressScrollers)
+        [super reflectScrolledClipView:clipView];
 }
 
 - (void)setAllowsScrolling:(BOOL)flag
 }
 
 - (void)setAllowsScrolling:(BOOL)flag