WebCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Aug 2007 03:48:59 +0000 (03:48 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Aug 2007 03:48:59 +0000 (03:48 +0000)
        Reviewed by Darin.

        - WebCore part of fix to scrollbar suppression hack for Leopard

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::transitionToCommitted): Suppress scrollbars earlier, so it happens
        before any potential view swap.

WebKit:

        Reviewed by Darin.

        - WebKit part of fix to scrollbar suppression hack for Leopard

        * WebView/WebDynamicScrollBarsView.m:
        (-[WebDynamicScrollBarsView reflectScrolledClipView:]): Don't call the superclass method
        when scrollbars are suppressed.
        (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]): Instead call it
        here, when unsuppressing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25142 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/FrameLoader.cpp
WebKit/ChangeLog
WebKit/WebView/WebDynamicScrollBarsView.m

index a627739..d72a2ef 100644 (file)
@@ -1,3 +1,13 @@
+2007-08-17  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+
+        - WebCore part of fix to scrollbar suppression hack for Leopard
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::transitionToCommitted): Suppress scrollbars earlier, so it happens
+        before any potential view swap.
+
 2007-08-17  Antti Koivisto  <antti@apple.com>
 
         Reviewed by Hyatt.
index 69ed952..3934acc 100644 (file)
@@ -2505,6 +2505,8 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
 
         case FrameLoadTypeStandard:
             updateHistoryForStandardLoad();
+            if (m_frame->view())
+                m_frame->view()->suppressScrollbars(true);
             m_client->makeDocumentView();
             break;
 
index b5f062a..a06a69e 100644 (file)
@@ -1,3 +1,15 @@
+2007-08-17  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+
+        - WebKit part of fix to scrollbar suppression hack for Leopard
+
+        * WebView/WebDynamicScrollBarsView.m:
+        (-[WebDynamicScrollBarsView reflectScrolledClipView:]): Don't call the superclass method
+        when scrollbars are suppressed.
+        (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]): Instead call it
+        here, when unsuppressing.
+
 2007-08-17  Darin Adler  <darin@apple.com>
 
         Reviewed by Maciej.
index c7ff77c..e30bad8 100644 (file)
 - (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
         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