[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

bdakin at apple.com bdakin at apple.com
Sun Feb 20 22:59:09 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit dcf838b04607ac9a31914ec2dcaa96b7d3cd53d5
Author: bdakin at apple.com <bdakin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 14 23:35:20 2011 +0000

    Fix for <rdar://problem/7793902> Artifacts when scrolling
    page in Safari while page is loading
    
    Reviewed by Mark Rowe.
    
    Call setDrawsBackground:YES on the scrollView in
    dispatchDidFirstLayout() rather than waiting until
    frameLoadCompleted(). Also suspend scrolling elasticity
    between provisionalLoadStarted() and dispatchDidFirstLayout()
    * WebCoreSupport/WebFrameLoaderClient.h:
    * WebCoreSupport/WebFrameLoaderClient.mm:
    (WebFrameLoaderClient::WebFrameLoaderClient):
    (WebFrameLoaderClient::dispatchDidFirstLayout):
    (WebFrameLoaderClient::provisionalLoadStarted):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75829 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 69384e0..5d5c0e3 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,20 @@
+2011-01-14  Beth Dakin  <bdakin at apple.com>
+
+        Reviewed by Mark Rowe.
+
+        Fix for <rdar://problem/7793902> Artifacts when scrolling
+        page in Safari while page is loading
+
+        Call setDrawsBackground:YES on the scrollView in 
+        dispatchDidFirstLayout() rather than waiting until
+        frameLoadCompleted(). Also suspend scrolling elasticity
+        between provisionalLoadStarted() and dispatchDidFirstLayout()
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::WebFrameLoaderClient):
+        (WebFrameLoaderClient::dispatchDidFirstLayout):
+        (WebFrameLoaderClient::provisionalLoadStarted):
+
 2011-01-12  Enrica Casucci  <enrica at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index 9de4246..83d3ab6 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -245,4 +245,9 @@ private:
 
     RetainPtr<WebFramePolicyListener> m_policyListener;
     WebCore::FramePolicyFunction m_policyFunction;
+
+#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+    NSScrollElasticity m_verticalElasticity;
+    NSScrollElasticity m_horizontalElasticity;
+#endif
 };
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 227d13a..ea90baf 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -210,6 +210,10 @@ static inline void applyAppleDictionaryApplicationQuirk(WebFrameLoaderClient* cl
 WebFrameLoaderClient::WebFrameLoaderClient(WebFrame *webFrame)
     : m_webFrame(webFrame)
     , m_policyFunction(0)
+#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+    , m_verticalElasticity(NSScrollElasticityAutomatic)
+    , m_horizontalElasticity(NSScrollElasticityAutomatic)
+#endif
 {
 }
 
@@ -687,6 +691,15 @@ void WebFrameLoaderClient::dispatchDidFirstLayout()
     WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
     if (implementations->didFirstLayoutInFrameFunc)
         CallFrameLoadDelegate(implementations->didFirstLayoutInFrameFunc, webView, @selector(webView:didFirstLayoutInFrame:), m_webFrame.get());
+    
+    // See WebFrameLoaderClient::provisionalLoadStarted.
+    WebDynamicScrollBarsView *scrollView = [m_webFrame->_private->webFrameView _scrollView];
+    if ([getWebView(m_webFrame.get()) drawsBackground])
+        [scrollView setDrawsBackground:YES];
+#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+    [scrollView setVerticalScrollElasticity:m_verticalElasticity];
+    [scrollView setHorizontalScrollElasticity:m_horizontalElasticity];
+#endif
 }
 
 void WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout()
@@ -1089,7 +1102,14 @@ void WebFrameLoaderClient::provisionalLoadStarted()
     // or 3) The view is moved out of the window: -[WebFrameView viewDidMoveToWindow].
     // Please keep the comments in these four functions in agreement with each other.
 
-    [[m_webFrame->_private->webFrameView _scrollView] setDrawsBackground:NO];
+    WebDynamicScrollBarsView *scrollView = [m_webFrame->_private->webFrameView _scrollView];
+    [scrollView setDrawsBackground:NO];
+#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+    m_verticalElasticity = [scrollView verticalScrollElasticity];
+    m_horizontalElasticity = [scrollView horizontalScrollElasticity];
+    [scrollView setVerticalScrollElasticity:NSScrollElasticityNone];
+    [scrollView setHorizontalScrollElasticity:NSScrollElasticityNone];
+#endif
 }
 
 void WebFrameLoaderClient::didFinishLoad()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list