summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt/Api
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-04-17 00:07:02 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-04-17 00:07:02 (GMT)
commita46894d99eff614579b539b1c02e01c49c10fc28 (patch)
treeaeed86782171f25cf6bfaa08a47cc0aba2db7b24 /src/3rdparty/webkit/WebKit/qt/Api
parentd397b62f9cb560e772fb0ba78b6a0af6c7232e33 (diff)
downloadQt-a46894d99eff614579b539b1c02e01c49c10fc28.zip
Qt-a46894d99eff614579b539b1c02e01c49c10fc28.tar.gz
Qt-a46894d99eff614579b539b1c02e01c49c10fc28.tar.bz2
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 6ed0b6197addffc7dacbdb3e49db711420a2c47a )
Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2010-04-08 Joe Ligman <joseph.ligman@nokia.com> Reviewed by Simon Hausmann. [Qt] qtwebkit_webframe_scrollRecursively scrolls when body.style.overflow="hidden" https://bugs.webkit.org/show_bug.cgi?id=36674 The scrolling check was based on the frameview's scrolloffset, and maximumScrollPosition, which does not acknowledge the overflow properties. I am now basing the scrolling off the scrollbar position. The scrollbars are affected by the overflow properties indicating when not to scroll. The scrollbar positions also continue to work for CSS ::-webkit-scrollbar styles. * Api/qwebframe.cpp: (qtwebkit_webframe_scrollRecursively): 2010-03-24 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> Reviewed by Laszlo Gombos. Auto-uppercase and predictive text need to be disabled for S60 (as for maemo) https://bugs.webkit.org/show_bug.cgi?id=33176 * WebCoreSupport/EditorClientQt.cpp:
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp51
1 files changed, 24 insertions, 27 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index 710e11b..0fa31d5 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -326,10 +326,11 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer l
static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy, const QPoint& pos)
{
- if (!frame || !frame->document() || !frame->eventHandler())
+ if (!frame || !frame->document() || !frame->view() || !frame->eventHandler())
return false;
- Node* node = frame->document()->elementFromPoint(pos.x(), pos.y());
+ QPoint contentsPos = frame->view()->windowToContents(pos);
+ Node* node = frame->document()->elementFromPoint(contentsPos.x(), contentsPos.y());
if (!node)
return false;
@@ -1056,37 +1057,33 @@ void QWebFrame::scroll(int dx, int dy)
*/
void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)
{
- Frame* frame = QWebFramePrivate::core(qFrame);
+ if (!qFrame)
+ return;
- if (!frame || !frame->view())
+ if (webframe_scrollOverflow(QWebFramePrivate::core(qFrame), dx, dy, pos))
return;
-
- if (!webframe_scrollOverflow(frame, dx, dy, pos)) {
- do {
- bool scrolledHorizontal = false;
- bool scrolledVertical = false;
-
- IntSize scrollOffset = frame->view()->scrollOffset();
- IntPoint maxScrollOffset = frame->view()->maximumScrollPosition();
- if (dx > 0) // scroll right
- scrolledHorizontal = scrollOffset.width() < maxScrollOffset.x();
- else if (dx < 0) // scroll left
- scrolledHorizontal = scrollOffset.width() > 0;
+ bool scrollHorizontal = false;
+ bool scrollVertical = false;
- if (dy > 0) // scroll down
- scrolledVertical = scrollOffset.height() < maxScrollOffset.y();
+ do {
+ if (dx > 0) // scroll right
+ scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) < qFrame->scrollBarMaximum(Qt::Horizontal);
+ else if (dx < 0) // scroll left
+ scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) > qFrame->scrollBarMinimum(Qt::Horizontal);
+
+ if (dy > 0) // scroll down
+ scrollVertical = qFrame->scrollBarValue(Qt::Vertical) < qFrame->scrollBarMaximum(Qt::Vertical);
else if (dy < 0) //scroll up
- scrolledVertical = scrollOffset.height() > 0;
+ scrollVertical = qFrame->scrollBarValue(Qt::Vertical) > qFrame->scrollBarMinimum(Qt::Vertical);
- if (scrolledHorizontal || scrolledVertical) {
- frame->view()->scrollBy(IntSize(dx, dy));
- return;
- }
-
- frame = frame->tree()->parent();
- } while (frame && frame->view());
- }
+ if (scrollHorizontal || scrollVertical) {
+ qFrame->scroll(dx, dy);
+ return;
+ }
+
+ qFrame = qFrame->parentFrame();
+ } while (qFrame);
}
/*!