[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:18:42 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 0095d06e79dab47bf5f110ea4cb5dff329f87fb2
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 12 22:01:33 2003 +0000
- fixed <rdar://problem/3508760>: tabbing to out-of-sight link behaves
differently than tabbing to out-of-sight form control
Reviewed by Dave.
* kwq/KWQScrollView.h:
* kwq/KWQScrollView.mm:
(QScrollView::ensureVisible):
added comments and changed parameter names to reveal differences between
what we've implemented and what QScrollView was intended to do.
(QScrollView::ensureRectVisibleCentered):
New method that calls _KWQ_scrollRectToVisible, which is the method
we use when scrolling to reveal form controls.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewInFrame):
call ensureRectVisibleCentered so tabbing to a link will use the
same scroll-to-reveal code as tabbing to a form control
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8057b9f..9455f32 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2003-12-12 John Sullivan <sullivan at apple.com>
+
+ - fixed <rdar://problem/3508760>: tabbing to out-of-sight link behaves
+ differently than tabbing to out-of-sight form control
+
+ Reviewed by Dave.
+
+ * kwq/KWQScrollView.h:
+ * kwq/KWQScrollView.mm:
+ (QScrollView::ensureVisible):
+ added comments and changed parameter names to reveal differences between
+ what we've implemented and what QScrollView was intended to do.
+ (QScrollView::ensureRectVisibleCentered):
+ New method that calls _KWQ_scrollRectToVisible, which is the method
+ we use when scrolling to reveal form controls.
+
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::nextKeyViewInFrame):
+ call ensureRectVisibleCentered so tabbing to a link will use the
+ same scroll-to-reveal code as tabbing to a form control
+
2003-12-11 Maciej Stachowiak <mjs at apple.com>
Reviewed by John.
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 70fa367..ca2ec43 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -957,10 +957,7 @@ NSView *KWQKHTMLPart::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirection d
else {
doc->setFocusNode(node);
if (view()) {
- QRect rect = node->getRect();
- int offset = 50; // same offset we use for jumping to anchors in a document
- view()->ensureVisible(rect.right() + offset, rect.bottom() + offset);
- view()->ensureVisible(rect.left() - offset, rect.top() - offset);
+ view()->ensureRectVisibleCentered(node->getRect());
}
[_bridge makeFirstResponder:[_bridge documentView]];
return [_bridge documentView];
diff --git a/WebCore/kwq/KWQScrollView.h b/WebCore/kwq/KWQScrollView.h
index a86dc0d..452d020 100644
--- a/WebCore/kwq/KWQScrollView.h
+++ b/WebCore/kwq/KWQScrollView.h
@@ -91,6 +91,7 @@ public:
void ensureVisible(int,int);
void ensureVisible(int,int,int,int);
+ void ensureRectVisibleCentered(const QRect &r);
NSView *getDocumentView() const;
};
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 35db7e9..2794a53 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -453,15 +453,30 @@ void QScrollView::setContentsPosRecursive(int x, int y)
void QScrollView::ensureVisible(int x, int y)
{
+ // Note that the definition of ensureVisible in trolltech documentation says:
+ // "Scrolls the content so that the point (x, y) is visible with at least
+ // 50-pixel margins (if possible, otherwise centered).", which is
+ // not what we're doing here.
KWQ_BLOCK_EXCEPTIONS;
[getDocumentView() scrollRectToVisible:NSMakeRect(x, y, 0, 0)];
KWQ_UNBLOCK_EXCEPTIONS;
}
-void QScrollView::ensureVisible(int x, int y, int w, int h)
+void QScrollView::ensureVisible(int x, int y, int xmargin, int ymargin)
{
+ // Note that the definition of ensureVisible in trolltech documentation says:
+ // "Scrolls the content so that the point (x, y) is visible with at least the
+ // xmargin and ymargin margins (if possible, otherwise centered).", which is
+ // not what we're doing here.
KWQ_BLOCK_EXCEPTIONS;
- [getDocumentView() scrollRectToVisible:NSMakeRect(x, y, w, h)];
+ [getDocumentView() scrollRectToVisible:NSMakeRect(x, y, xmargin, ymargin)];
+ KWQ_UNBLOCK_EXCEPTIONS;
+}
+
+void QScrollView::ensureRectVisibleCentered(const QRect &rect)
+{
+ KWQ_BLOCK_EXCEPTIONS;
+ [getDocumentView() _KWQ_scrollRectToVisible:NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height())];
KWQ_UNBLOCK_EXCEPTIONS;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list