diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-30 16:58:06 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-30 17:03:09 +0100 |
| commit | 32ea33253afbbdefd2680aa95ab5f57455272ae7 (patch) | |
| tree | 2389569585b666c310fbb36d3fb8e6ab94462967 /Source/WebKit2/UIProcess/qt | |
| parent | 41c25f231cbca1babc445187283524cc6c751c71 (diff) | |
| download | qtwebkit-32ea33253afbbdefd2680aa95ab5f57455272ae7.tar.gz | |
Imported WebKit commit 6a4a1d32e1d779548c726c4826cba9d69eb87601 (http://svn.webkit.org/repository/webkit/trunk@136242)
Final import for the Qt 5.x series that implements the QtWebKit / QtWebKitWidgets split
Extra fixes will be cherry-picked.
Change-Id: I844f1ebb99c6d6b75db31d6538c2acd628e79681
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebKit2/UIProcess/qt')
6 files changed, 21 insertions, 2 deletions
diff --git a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp index b8ccd977b..1cf3ae568 100644 --- a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp +++ b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.cpp @@ -88,7 +88,7 @@ void PageViewportControllerClientQt::setContentRectVisiblePositionAtScale(const // To animate the position together with the scale we multiply the position with the current scale // and add it to the page position (displacement on the flickable contentItem because of additional items). - QPointF newPosition(m_pageItem->position() + location * itemScale); + QPointF newPosition(m_pageItem->pos() + location * itemScale); m_viewportItem->setContentPos(newPosition); } @@ -317,7 +317,7 @@ QRectF PageViewportControllerClientQt::nearestValidVisibleContentsRect() const void PageViewportControllerClientQt::setViewportPosition(const FloatPoint& contentsPoint) { - QPointF newPosition((m_pageItem->position() + QPointF(contentsPoint)) * m_pageItem->contentsScale()); + QPointF newPosition((m_pageItem->pos() + QPointF(contentsPoint)) * m_pageItem->contentsScale()); m_viewportItem->setContentPos(newPosition); updateViewportController(); } diff --git a/Source/WebKit2/UIProcess/qt/QtPageClient.cpp b/Source/WebKit2/UIProcess/qt/QtPageClient.cpp index 7737f6529..89a40c923 100644 --- a/Source/WebKit2/UIProcess/qt/QtPageClient.cpp +++ b/Source/WebKit2/UIProcess/qt/QtPageClient.cpp @@ -256,6 +256,12 @@ void QtPageClient::updateTextInputState() m_eventHandler->updateTextInputState(); } +void QtPageClient::handleWillSetInputMethodState() +{ + ASSERT(m_eventHandler); + m_eventHandler->handleWillSetInputMethodState(); +} + #if ENABLE(GESTURE_EVENTS) void QtPageClient::doneWithGestureEvent(const WebGestureEvent& event, bool wasEventHandled) { diff --git a/Source/WebKit2/UIProcess/qt/QtPageClient.h b/Source/WebKit2/UIProcess/qt/QtPageClient.h index e493ce8ad..fc10ca653 100644 --- a/Source/WebKit2/UIProcess/qt/QtPageClient.h +++ b/Source/WebKit2/UIProcess/qt/QtPageClient.h @@ -103,6 +103,7 @@ public: virtual void pageTransitionViewportReady(); virtual void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&); virtual void updateTextInputState(); + virtual void handleWillSetInputMethodState(); virtual void doneWithGestureEvent(const WebGestureEvent&, bool wasEventHandled); #if ENABLE(TOUCH_EVENTS) virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled); diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp index 88dae15b8..b80613438 100644 --- a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp +++ b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp @@ -435,6 +435,12 @@ void QtWebPageEventHandler::updateTextInputState() setInputPanelVisible(editor.isContentEditable); } +void QtWebPageEventHandler::handleWillSetInputMethodState() +{ + if (qApp->inputMethod()->isVisible()) + qApp->inputMethod()->commit(); +} + void QtWebPageEventHandler::doneWithGestureEvent(const WebGestureEvent& event, bool wasEventHandled) { if (event.type() != WebEvent::GestureSingleTap) diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h index 04c75ab3f..005cb4ca0 100644 --- a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h +++ b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h @@ -89,6 +89,7 @@ public: void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled); #endif void handleInputEvent(const QInputEvent*); + void handleWillSetInputMethodState(); void resetGestureRecognizers(); PageViewportControllerClientQt* viewportController() { return m_viewportController; } diff --git a/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp index 46429461f..8a205f91d 100644 --- a/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp +++ b/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp @@ -171,4 +171,9 @@ void WebPageProxy::closePopupMenu() process()->send(Messages::WebPage::HidePopupMenu(), m_pageID); } +void WebPageProxy::willSetInputMethodState() +{ + m_pageClient->handleWillSetInputMethodState(); +} + } // namespace WebKit |
