[Qt][WK2] Fix painting on Mac with retina display
authorAndras Becsi <andras.becsi@digia.com>
Thu, 13 Dec 2012 19:15:30 +0000 (20:15 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Thu, 13 Dec 2012 21:07:16 +0000 (22:07 +0100)
commit69e9b8736f2410fc33db62b432cf5210b50331e9
tree5d5a85c871cad42f8b95361ccb1c119371afc277
parent5423dd08373bb58f0d469d52cde49f128b49ddf2
[Qt][WK2] Fix painting on Mac with retina display
https://bugs.webkit.org/show_bug.cgi?id=104574

Reviewed by Kenneth Rohde Christiansen.

Since HiDPI support has been added and enabled in Qt we ended up
painting incorrectly scaled content on high-resolution screens.
Because the intrinsic device pixel ratio is always taken into
account by Qt when painting to high-resolution screens we should
automatically obtain the scale ratio from the window in which the
item is rendered instead of setting it in QML.

Qt does not make it possible to override the device pixel ratio
of the native window, therefore our experimental QML API for setting
a custom value is of no use any more and should be removed.

This patch fixes the scaling issue on Mac retina display by querying
the underlying window for the device scale factor and applying it to
the backing store and the scene-graph rendering of the content node.
Additionally removes the experimental API and related API tests.

Change-Id: I04f23059147773ca279a89ae8976ccd3d9bef292
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_devicePixelRatio.qml [deleted file]
Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h
Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h
Tools/ChangeLog
Tools/MiniBrowser/qt/qml/BrowserWindow.qml