Title: [108790] trunk/Tools
Revision
108790
Author
[email protected]
Date
2012-02-24 06:42:35 -0800 (Fri, 24 Feb 2012)

Log Message

[Qt] Add Qt5 way to force 96 DPI for tests
https://bugs.webkit.org/show_bug.cgi?id=79364

Reviewed by Simon Hausmann.

* DumpRenderTree/qt/main.cpp:
(main):
* WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
(WTR::activateFonts):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (108789 => 108790)


--- trunk/Tools/ChangeLog	2012-02-24 14:41:51 UTC (rev 108789)
+++ trunk/Tools/ChangeLog	2012-02-24 14:42:35 UTC (rev 108790)
@@ -1,3 +1,15 @@
+2012-02-24  Balazs Kelemen  <[email protected]>
+
+        [Qt] Add Qt5 way to force 96 DPI for tests
+        https://bugs.webkit.org/show_bug.cgi?id=79364
+
+        Reviewed by Simon Hausmann.
+
+        * DumpRenderTree/qt/main.cpp:
+        (main):
+        * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+        (WTR::activateFonts):
+
 2012-02-24  Carlos Garcia Campos  <[email protected]>
 
         [GTK] MiniBrowser should reload the view then the reload button is clicked

Modified: trunk/Tools/DumpRenderTree/qt/main.cpp (108789 => 108790)


--- trunk/Tools/DumpRenderTree/qt/main.cpp	2012-02-24 14:41:51 UTC (rev 108789)
+++ trunk/Tools/DumpRenderTree/qt/main.cpp	2012-02-24 14:42:35 UTC (rev 108790)
@@ -152,7 +152,7 @@
     QApplication app(argc, argv);
     app.setQuitOnLastWindowClosed(false);
 
-#if QT_VERSION <= QT_VERSION_CHECK(5, 0, 0) // FIXME: need a way to port this to Qt5.
+#if QT_VERSION <= QT_VERSION_CHECK(5, 0, 0)
 #ifdef Q_WS_X11
     QX11Info::setAppDpiY(0, 96);
     QX11Info::setAppDpiX(0, 96);
@@ -170,6 +170,8 @@
     * default font, but with the correct paint-device DPI.
    */
     QApplication::setFont(QWidget().font());
+#else
+    QCoreApplication::setAttribute(Qt::AA_Use96Dpi, true);
 #endif
 
 #if HAVE(SIGNAL_H)

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp (108789 => 108790)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp	2012-02-24 14:41:51 UTC (rev 108789)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp	2012-02-24 14:42:35 UTC (rev 108790)
@@ -41,6 +41,7 @@
 {
     WebKit::initializeTestFonts();
     QApplication::setStyle(new QWindowsStyle);
+    QCoreApplication::setAttribute(Qt::AA_Use96Dpi, true);
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to