[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:17:49 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 4fe4aec784423601c10f17975e5e3892f840aa73
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 11 01:47:13 2003 +0000

    WebCore:
    
            - WebCore part of fix for:
            <rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading
    
            Reviewed by Darin.
    
            * kwq/KWQNSViewExtras.h:
            * kwq/KWQNSViewExtras.m:
            (-[NSView _KWQ_scrollPointRecursive:]):
            (-[NSView _KWQ_scrollPointRecursive:inView:]):
            new methods, similar to existing scrollRect methods
            except that the preferred position for the point is
            the top-left corner rather than centered in the visible area
    
            * kwq/KWQScrollView.h:
            * kwq/KWQScrollView.mm:
            (QScrollView::setContentsPosRecursive):
            new method, calls _KWQ_scrollPointRecursive:
    
            * khtml/khtml_part.cpp:
            (KHTMLPart::gotoAnchor):
            call setContentsPosRecursive instead of setContentsPos; also remove
            the 50 pixel offset that upset Hyatt so.
    
    WebKit:
    
            - WebKit part of fix for:
            <rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading
    
            Reviewed by Darin
    
            * Misc.subproj/WebNSViewExtras.h:
            * Misc.subproj/WebNSViewExtras.m:
            removed _web_scrollPointToVisible:fromView:
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView scrollPoint:]):
            removed call to _web_scrollPointToVisible:fromView:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index afb74b0..73bfee4 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,29 @@
+2003-12-10  John Sullivan  <sullivan at apple.com>
+
+        - WebCore part of fix for:
+        <rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading
+
+        Reviewed by Darin.
+
+        * kwq/KWQNSViewExtras.h:
+        * kwq/KWQNSViewExtras.m:
+        (-[NSView _KWQ_scrollPointRecursive:]):
+        (-[NSView _KWQ_scrollPointRecursive:inView:]):
+        new methods, similar to existing scrollRect methods
+        except that the preferred position for the point is
+        the top-left corner rather than centered in the visible area
+        
+        * kwq/KWQScrollView.h:
+        * kwq/KWQScrollView.mm:
+        (QScrollView::setContentsPosRecursive):
+        new method, calls _KWQ_scrollPointRecursive:
+
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::gotoAnchor):
+        call setContentsPosRecursive instead of setContentsPos; also remove
+        the 50 pixel offset that upset Hyatt so.
+        
+
 2003-12-10  Chris Blumenberg  <cblu at apple.com>
 
         * kwq/KWQKSSLKeyGen.mm:
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 35cb283..6b9c57b 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -2062,7 +2062,13 @@ bool KHTMLPart::gotoAnchor( const QString &name )
   int x = 0, y = 0;
   HTMLElementImpl *a = static_cast<HTMLElementImpl *>(n);
   a->getUpperLeftCorner(x, y);
+#if APPLE_CHANGES
+  // Remove the 50 pixel slop factor; some pages expect anchors to be exactly scrolled to.
+  // Also, call recursive version so this will expose correctly from within nested frames.
+  d->m_view->setContentsPosRecursive(x, y);
+#else
   d->m_view->setContentsPos(x-50, y-50);
+#endif
 
   return true;
 }
diff --git a/WebCore/kwq/KWQNSViewExtras.h b/WebCore/kwq/KWQNSViewExtras.h
index 5261c00..7192c21 100644
--- a/WebCore/kwq/KWQNSViewExtras.h
+++ b/WebCore/kwq/KWQNSViewExtras.h
@@ -31,4 +31,6 @@
 - (void)_KWQ_scrollRectToVisible:(NSRect)rect;
 - (void)_KWQ_scrollRectToVisible:(NSRect)rect inView:(NSView *)view;
 
+- (void)_KWQ_scrollPointRecursive:(NSPoint)p;
+- (void)_KWQ_scrollPointRecursive:(NSPoint)p inView:(NSView *)view;
 @end
diff --git a/WebCore/kwq/KWQNSViewExtras.m b/WebCore/kwq/KWQNSViewExtras.m
index 7c58217..0bf05ba 100644
--- a/WebCore/kwq/KWQNSViewExtras.m
+++ b/WebCore/kwq/KWQNSViewExtras.m
@@ -42,6 +42,18 @@
     [[self superview] _KWQ_scrollRectToVisible:rect inView:view];
 }
 
+- (void)_KWQ_scrollPointRecursive:(NSPoint)p
+{
+    [self _KWQ_scrollPointRecursive:p inView:self];
+}
+
+- (void)_KWQ_scrollPointRecursive:(NSPoint)p inView:(NSView *)view
+{
+    p = [self convertPoint: p fromView:view];
+    [self scrollPoint: p];
+    [[self superview] _KWQ_scrollPointRecursive:p inView:self];
+}
+
 @end
 
 @implementation NSClipView (KWQNSViewExtras)
@@ -78,4 +90,5 @@
     [super _KWQ_scrollRectToVisible:rect inView:view];
 }
 
+
 @end
diff --git a/WebCore/kwq/KWQScrollView.h b/WebCore/kwq/KWQScrollView.h
index 87e7b5b..a86dc0d 100644
--- a/WebCore/kwq/KWQScrollView.h
+++ b/WebCore/kwq/KWQScrollView.h
@@ -50,6 +50,7 @@ public:
     void scrollBy(int dx, int dy);
 
     void setContentsPos(int x, int y);
+    void setContentsPosRecursive(int,int);
 
     virtual void setVScrollBarMode(ScrollBarMode vMode);
     virtual void setHScrollBarMode(ScrollBarMode hMode);
@@ -90,7 +91,7 @@ public:
 
     void ensureVisible(int,int);
     void ensureVisible(int,int,int,int);
-    
+        
     NSView *getDocumentView() const;
 };
 
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index d2dacfd..35db7e9 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -27,6 +27,7 @@
 
 #import "KWQExceptions.h"
 #import "KWQLogging.h"
+#import "KWQNSViewExtras.h"
 #import "WebCoreFrameView.h"
 
 /*
@@ -443,6 +444,13 @@ void QScrollView::resizeEvent(QResizeEvent *)
 {
 }
 
+void QScrollView::setContentsPosRecursive(int x, int y)
+{
+    KWQ_BLOCK_EXCEPTIONS;
+    [getDocumentView() _KWQ_scrollPointRecursive:NSMakePoint(x, y)];
+    KWQ_UNBLOCK_EXCEPTIONS;
+}
+
 void QScrollView::ensureVisible(int x, int y)
 {
     KWQ_BLOCK_EXCEPTIONS;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ce30149..636ac53 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,18 @@
+2003-12-10  John Sullivan  <sullivan at apple.com>
+
+        - WebKit part of fix for:
+        <rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading
+
+        Reviewed by Darin
+
+        * Misc.subproj/WebNSViewExtras.h:
+        * Misc.subproj/WebNSViewExtras.m:
+        removed _web_scrollPointToVisible:fromView:
+        
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView scrollPoint:]):
+        removed call to _web_scrollPointToVisible:fromView:
+
 2003-12-10  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: <rdar://problem/3505537>: certificates downloaded from Verisign are multipart/mixed, must be parsed out
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.h b/WebKit/Misc.subproj/WebNSViewExtras.h
index 69520e7..d402679 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.h
+++ b/WebKit/Misc.subproj/WebNSViewExtras.h
@@ -46,6 +46,4 @@
                    URL:(NSURL *)URL
                  title:(NSString *)title
                  event:(NSEvent *)event;
-
-- (void)_web_scrollPointToVisible:(NSPoint)p fromView:(NSView *)view;
 @end
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.m b/WebKit/Misc.subproj/WebNSViewExtras.m
index 6d0ceed..279c00c 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.m
+++ b/WebKit/Misc.subproj/WebNSViewExtras.m
@@ -63,13 +63,6 @@
     return nil;
 }
 
-- (void)_web_scrollPointToVisible:(NSPoint)p fromView:(NSView *)view
-{
-    p = [self convertPoint: p fromView:view];
-    [self scrollPoint: p];
-    [[self superview] _web_scrollPointToVisible:p fromView: self];
-}
-
 /* Determine whether a mouse down should turn into a drag; started as copy of NSTableView code */
 - (BOOL)_web_dragShouldBeginFromMouseDown:(NSEvent *)mouseDownEvent
                            withExpiration:(NSDate *)expiration
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 843dc88..7a955d5 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -343,7 +343,6 @@ static BOOL forceRealHitTest = NO;
     }
     
     [super scrollPoint:point];
-    [[self superview] _web_scrollPointToVisible:point fromView: self];
 }
 
 - (NSView *)hitTest:(NSPoint)point

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list