Commit 92c6f0c5 authored by abecsi@webkit.org's avatar abecsi@webkit.org

[Qt][WK2] Fix QWebKitTest's notification of device pixel ratio change

https://bugs.webkit.org/show_bug.cgi?id=104269

Unreviewed, trivialy fixing last minute change.

Move signal emission to the correct place.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::onComponentComplete):
* UIProcess/qt/PageViewportControllerClientQt.cpp:
(WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 847381cb
2012-12-06 Andras Becsi <andras.becsi@digia.com>
[Qt][WK2] Fix QWebKitTest's notification of device pixel ratio change
https://bugs.webkit.org/show_bug.cgi?id=104269
Unreviewed, trivialy fixing last minute change.
Move signal emission to the correct place.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::onComponentComplete):
* UIProcess/qt/PageViewportControllerClientQt.cpp:
(WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt):
2012-12-06 Andras Becsi <andras.becsi@digia.com>
[Qt][WK2] Fix QWebKitTest's notification of device pixel ratio change
......
......@@ -868,6 +868,11 @@ void QQuickWebViewFlickablePrivate::onComponentComplete()
m_pageViewportController.reset(new PageViewportController(webPageProxy.get(), m_pageViewportControllerClient.data()));
pageView->eventHandler()->setViewportController(m_pageViewportControllerClient.data());
// Notify about device pixel ratio here because due to the delayed instantiation
// of the viewport controller the correct value might not have reached QWebKitTest
// in time it was used from QML.
emit experimental->test()->devicePixelRatioChanged();
// Trigger setting of correct visibility flags after everything was allocated and initialized.
_q_onVisibleChanged();
}
......
......@@ -59,11 +59,6 @@ PageViewportControllerClientQt::PageViewportControllerClientQt(QQuickWebView* vi
connect(m_scaleAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)),
SLOT(scaleAnimationStateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
// Notify about device pixel ratio here because due to the delayed instantiation
// of the viewport controller the correct value might not have reached QWebKitTest
// in time it was used from QML.
emit m_viewportItem->experimental()->test()->devicePixelRatioChanged();
}
void PageViewportControllerClientQt::ScaleAnimation::updateCurrentValue(const QVariant& value)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment