[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

timothy at apple.com timothy at apple.com
Thu Feb 4 21:21:54 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit f160ad248f3ae97b742a45bf6a0e881e8161249d
Author: timothy at apple.com <timothy at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 20 19:09:32 2010 +0000

    Fix erroneous page scrolls when trying to select text or use form elements
    with the Web Inspector docked.
    
    http://webkit.org/b/24403
    rdar://problem/6753925
    
    Reviewed by John Sullivan and Darin Adler.
    
    * WebCoreSupport/WebChromeClient.mm:
    (WebChromeClient::scrollRectIntoView): The scrollRect.move() call was
    incorrectly converting the rect under the assumption that the frame view
    is the same size as the WebView. Using convertRect:fromView: instead
    is enough to fix the bug, but that code isn't needed since WebCore
    already takes care of scrolling the main frame's document view, so it
    was redundant to do it here too.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53556 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 2e3f5d3..4b87f7c 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-19  Timothy Hatcher  <timothy at apple.com>
+
+        Fix erroneous page scrolls when trying to select text or use form elements
+        with the Web Inspector docked.
+
+        http://webkit.org/b/24403
+        rdar://problem/6753925
+
+        Reviewed by John Sullivan and Darin Adler.
+
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::scrollRectIntoView): The scrollRect.move() call was
+        incorrectly converting the rect under the assumption that the frame view
+        is the same size as the WebView. Using convertRect:fromView: instead
+        is enough to fix the bug, but that code isn't needed since WebCore
+        already takes care of scrolling the main frame's document view, so it
+        was redundant to do it here too.
+
 2010-01-20  Steve Falkenburg  <sfalken at apple.com>
 
         Reviewed by Darin Adler and Adam Roben.
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 58323bb..c4e9671 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -490,22 +490,14 @@ void WebChromeClient::scrollRectIntoView(const IntRect& r, const ScrollView* scr
 {
     // FIXME: This scrolling behavior should be under the control of the embedding client (rather than something
     // we just do ourselves).
-    
-    IntRect scrollRect = r;
-    NSView *startView = m_webView;
-    if ([m_webView _usesDocumentViews]) {
-        // We have to convert back to document view coordinates.
-        // It doesn't make sense for the scrollRectIntoView API to take document view coordinates.
-        scrollRect.move(scrollView->scrollOffset());
-        startView = [[[m_webView mainFrame] frameView] documentView];
-    }
-    NSRect rect = scrollRect;
-    for (NSView *view = startView; view; view = [view superview]) { 
-        if ([view isKindOfClass:[NSClipView class]]) { 
-            NSClipView *clipView = (NSClipView *)view; 
-            NSView *documentView = [clipView documentView]; 
-            [documentView scrollRectToVisible:[documentView convertRect:rect fromView:startView]]; 
-        } 
+
+    NSRect rect = r;
+    for (NSView *view = m_webView; view; view = [view superview]) {
+        if ([view isKindOfClass:[NSClipView class]]) {
+            NSClipView *clipView = (NSClipView *)view;
+            NSView *documentView = [clipView documentView];
+            [documentView scrollRectToVisible:[documentView convertRect:rect fromView:m_webView]];
+        }
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list