[Qt] Cleanup testfonts handling
authorkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 15:03:01 +0000 (15:03 +0000)
committerkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 15:03:01 +0000 (15:03 +0000)
commite2235ba70331b77472061350183bcf5702da4959
treef51124527354ea0add8769dda2027b5efab44076
parent0205ccf7bccd9fd740bee57f53f018751fdb3a5c
[Qt] Cleanup testfonts handling
https://bugs.webkit.org/show_bug.cgi?id=76068

Reviewed by Simon Hausmann.

Factor test font initialization into it's own file  so test
font users can share the implementation by adding the file
to their build.
Use fonts.conf from the test font directory to not require the
current directory to be the WebKit root.
Fix the -use-test-fonts option of QtTestBrowser by initializing
the fonts earlier, before it is too late (namely before calling
show on the main window).

* DumpRenderTree/qt/DumpRenderTree.pro:
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::open):
* DumpRenderTree/qt/DumpRenderTreeQt.h:
* DumpRenderTree/qt/QtInitializeTestFonts.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
(WebKit::initializeTestFonts):
* DumpRenderTree/qt/QtInitializeTestFonts.h: Added.
* DumpRenderTree/qt/fonts.conf: Removed. No need for this since
we will use the one from the test fonts directory.
* DumpRenderTree/qt/main.cpp:
(main): Fix the ifdefs to make it clear that the code to
set up the Dpi has not been ported to Qt5 yet.
* QtTestBrowser/QtTestBrowser.pro:
* QtTestBrowser/launcherwindow.h:
(WindowOptions::WindowOptions):
* QtTestBrowser/main.cpp:
(launcherMain):
(LauncherApplication::handleUserOptions):
* WebKitTestRunner/InjectedBundle/Target.pri:
* WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
(WTR::activateFonts): Remove the code to set up the Dpi
because it does not work with Qt5.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Tools/ChangeLog
Tools/DumpRenderTree/qt/DumpRenderTree.pro
Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
Tools/DumpRenderTree/qt/QtInitializeTestFonts.cpp [new file with mode: 0644]
Tools/DumpRenderTree/qt/QtInitializeTestFonts.h [new file with mode: 0644]
Tools/DumpRenderTree/qt/fonts.conf [deleted file]
Tools/DumpRenderTree/qt/main.cpp
Tools/QtTestBrowser/QtTestBrowser.pro
Tools/QtTestBrowser/launcherwindow.h
Tools/QtTestBrowser/main.cpp
Tools/WebKitTestRunner/InjectedBundle/Target.pri
Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp