https://bugs.webkit.org/show_bug.cgi?id=77339
A new slot visibleContentRectAndScaleChanged has been added
that is emited by non-animated scrolling code in the
QtViewportInteractionEngine.
Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-01-31
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
(QQuickWebViewPrivate::_q_resume):
(QQuickWebViewPrivate::_q_updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::updateTouchViewportSize):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::wheelEvent):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106362
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-31 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ Ensure tiles are repainted when scrolling using mouse wheel.
+ https://bugs.webkit.org/show_bug.cgi?id=77339
+
+ A new slot visibleContentRectAndScaleChanged has been added
+ that is emited by non-animated scrolling code in the
+ QtViewportInteractionEngine.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * UIProcess/API/qt/qquickwebview.cpp:
+ (QQuickWebViewPrivate::initializeDesktop):
+ (QQuickWebViewPrivate::initializeTouch):
+ (QQuickWebViewPrivate::_q_resume):
+ (QQuickWebViewPrivate::_q_updateVisibleContentRectAndScale):
+ (QQuickWebViewPrivate::updateTouchViewportSize):
+ * UIProcess/API/qt/qquickwebview_p.h:
+ * UIProcess/API/qt/qquickwebview_p_p.h:
+ (QQuickWebViewPrivate):
+ * UIProcess/qt/QtViewportInteractionEngine.cpp:
+ (WebKit::QtViewportInteractionEngine::wheelEvent):
+ * UIProcess/qt/QtViewportInteractionEngine.h:
+ (QtViewportInteractionEngine):
+
2012-01-31 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] Make UIProcess decide about encoding of input data for application URL schemes.
QObject::disconnect(interactionEngine.data(), SIGNAL(contentSuspendRequested()), viewport, SLOT(_q_suspend()));
QObject::disconnect(interactionEngine.data(), SIGNAL(contentResumeRequested()), viewport, SLOT(_q_resume()));
QObject::disconnect(interactionEngine.data(), SIGNAL(viewportTrajectoryVectorChanged(const QPointF&)), viewport, SLOT(_q_viewportTrajectoryVectorChanged(const QPointF&)));
+ QObject::disconnect(interactionEngine.data(), SIGNAL(visibleContentRectAndScaleChanged()), viewport, SLOT(_q_updateVisibleContentRectAndScale()));
}
interactionEngine.reset(0);
pageView->d->eventHandler->setViewportInteractionEngine(0);
QObject::connect(interactionEngine.data(), SIGNAL(contentSuspendRequested()), viewport, SLOT(_q_suspend()));
QObject::connect(interactionEngine.data(), SIGNAL(contentResumeRequested()), viewport, SLOT(_q_resume()));
QObject::connect(interactionEngine.data(), SIGNAL(viewportTrajectoryVectorChanged(const QPointF&)), viewport, SLOT(_q_viewportTrajectoryVectorChanged(const QPointF&)));
+ QObject::connect(interactionEngine.data(), SIGNAL(visibleContentRectAndScaleChanged()), viewport, SLOT(_q_updateVisibleContentRectAndScale()));
updateTouchViewportSize();
}
postTransitionState->apply();
}
- updateVisibleContentRectAndScale();
+ _q_updateVisibleContentRectAndScale();
}
void QQuickWebViewPrivate::didChangeContentsSize(const QSize& newSize)
context->downloadManager()->addDownload(download, downloadItem);
}
-void QQuickWebViewPrivate::updateVisibleContentRectAndScale()
+void QQuickWebViewPrivate::_q_updateVisibleContentRectAndScale()
{
DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
if (!drawingArea)
webPageProxy->setViewportSize(viewportSize);
interactionEngine->applyConstraints(computeViewportConstraints());
- updateVisibleContentRectAndScale();
+ _q_updateVisibleContentRectAndScale();
}
void QQuickWebViewPrivate::PostTransitionState::apply()
Q_PRIVATE_SLOT(d_func(), void _q_suspend());
Q_PRIVATE_SLOT(d_func(), void _q_resume());
Q_PRIVATE_SLOT(d_func(), void _q_viewportTrajectoryVectorChanged(const QPointF&));
+ Q_PRIVATE_SLOT(d_func(), void _q_updateVisibleContentRectAndScale());
Q_PRIVATE_SLOT(d_func(), void _q_onOpenPanelFilesSelected());
Q_PRIVATE_SLOT(d_func(), void _q_onOpenPanelFinished(int result));
Q_PRIVATE_SLOT(d_func(), void _q_onVisibleChanged());
void updateTouchViewportSize();
QtViewportInteractionEngine::Constraints computeViewportConstraints();
- void updateVisibleContentRectAndScale();
+ void _q_updateVisibleContentRectAndScale();
void _q_suspend();
void _q_resume();
QRectF endPosRange = computePosRangeForItemAtScale(m_content->contentScale());
m_content->setPos(-boundPosition(endPosRange.topLeft(), newPos, endPosRange.bottomRight()));
+
+ emit visibleContentRectAndScaleChanged();
}
void QtViewportInteractionEngine::pagePositionRequest(const QPoint& pagePosition)
void contentResumeRequested();
void viewportTrajectoryVectorChanged(const QPointF&);
+ void visibleContentRectAndScaleChanged();
private Q_SLOTS:
// Respond to changes of content that are not driven by us, like the page resizing itself.