Changeset 124808 in webkit
- Timestamp:
- Aug 6, 2012 4:05:15 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r124805 r124808 1 2012-08-06 Luciano Wolf <luciano.wolf@openbossa.org> 2 3 [Qt] Default sizes for input-text and text-area are different when running DRT/WTR 4 https://bugs.webkit.org/show_bug.cgi?id=91990 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 WTR wasn't using the proper font types provided by testfonts directory. 9 The same approach as DRT was applied and now it takes info from QFont to 10 update the store variable. 11 12 * UIProcess/qt/WebPreferencesQt.cpp: 13 (WebKit::setStringValueIfInUserDefaults): 14 (WebKit): 15 (WebKit::WebPreferences::platformInitializeStore): 16 1 17 2012-08-06 No'am Rosenthal <noam.rosenthal@nokia.com> 2 18 -
trunk/Source/WebKit2/UIProcess/qt/WebPreferencesQt.cpp
r95901 r124808 26 26 #include "config.h" 27 27 #include "WebPreferences.h" 28 #include <QFont> 28 29 29 30 namespace WebKit { 30 31 32 static void setStringValueIfInUserDefaults(const String& baseKey, WebPreferencesStore& store, const QHash<String, QFont::StyleHint> qFontHint) 33 { 34 // Use same approach as DumpRenderTree does - get font info from QFont. 35 static QFont defaultFont; 36 defaultFont.setStyleHint(qFontHint[baseKey]); 37 store.setStringValueForKey(baseKey, defaultFont.defaultFamily()); 38 } 39 31 40 void WebPreferences::platformInitializeStore() 32 41 { 42 if (!m_identifier) 43 return; 44 45 QHash <String, QFont::StyleHint> qFontHint; 46 47 qFontHint["StandardFontFamily"] = QFont::Serif; 48 qFontHint["CursiveFontFamily"] = QFont::Cursive; 49 qFontHint["FantasyFontFamily"] = QFont::Fantasy; 50 qFontHint["FixedFontFamily"] = QFont::Monospace; 51 qFontHint["SansSerifFontFamily"] = QFont::SansSerif; 52 qFontHint["SerifFontFamily"] = QFont::Serif; 53 qFontHint["PictographFontFamily"] = QFont::Serif; 54 55 #define INITIALIZE_FONT_PREFERENCES(KeyUpper, KeyLower, TypeName, Type, DefaultValue) \ 56 set##TypeName##ValueIfInUserDefaults(WebPreferencesKey::KeyLower##Key(), m_store, qFontHint); 57 58 FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(INITIALIZE_FONT_PREFERENCES) 59 60 #undef INITIALIZE_FONT_PREFERENCES 33 61 } 34 62 -
trunk/Tools/ChangeLog
r124807 r124808 1 2012-08-06 Luciano Wolf <luciano.wolf@openbossa.org> 2 3 [Qt] Default sizes for input-text and text-area are different when running DRT/WTR 4 https://bugs.webkit.org/show_bug.cgi?id=91990 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Initializing TestFonts information into WTR binary. Doing it 9 later leads to wrong font names usage (Dejavu Serif instead 10 of Liberation Serif). 11 12 * WebKitTestRunner/Target.pri: 13 * WebKitTestRunner/qt/main.cpp: 14 (main): 15 1 16 2012-08-06 Jeff Timanus <twiz@chromium.org> 2 17 -
trunk/Tools/WebKitTestRunner/Target.pri
r121851 r124808 9 9 10 10 HEADERS += \ 11 $${ROOT_WEBKIT_DIR}/Tools/DumpRenderTree/qt/QtInitializeTestFonts.h \ 11 12 EventSenderProxy.h \ 12 13 PlatformWebView.h \ … … 16 17 17 18 SOURCES += \ 19 $${ROOT_WEBKIT_DIR}/Tools/DumpRenderTree/qt/QtInitializeTestFonts.cpp \ 18 20 qt/main.cpp \ 19 21 qt/EventSenderProxyQt.cpp \ … … 32 34 DEFINES += USE_SYSTEM_MALLOC=1 33 35 36 contains(DEFINES, HAVE_FONTCONFIG=1): PKGCONFIG += fontconfig 37 38 INCLUDEPATH += \ 39 $${ROOT_WEBKIT_DIR}/Tools/DumpRenderTree/qt 40 34 41 PREFIX_HEADER = WebKitTestRunnerPrefix.h 35 42 *-g++*:QMAKE_CXXFLAGS += "-include $$PREFIX_HEADER" -
trunk/Tools/WebKitTestRunner/qt/main.cpp
r116417 r124808 27 27 #include "config.h" 28 28 29 #include "QtInitializeTestFonts.h" 29 30 #include "TestController.h" 30 31 #include "qquickwebview_p.h" … … 119 120 qputenv("QT_WEBKIT_THEME_NAME", "qstyle"); 120 121 122 WebKit::initializeTestFonts(); 123 QCoreApplication::setAttribute(Qt::AA_Use96Dpi, true); 124 121 125 QQuickWebViewExperimental::setFlickableViewportEnabled(false); 122 126 QApplication app(argc, argv);
Note: See TracChangeset
for help on using the changeset viewer.