summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp5
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h1
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp6
3 files changed, 12 insertions, 0 deletions
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 89dd10e51..c3468f70a 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -1050,6 +1050,11 @@ void DumpRenderTreeSupportQt::getTrackedRepaintRects(QWebFrameAdapter* adapter,
result.append(rects[i]);
}
+void DumpRenderTreeSupportQt::disableDefaultTypesettingFeatures()
+{
+ WebCore::Font::setDefaultTypesettingFeatures(0);
+}
+
void DumpRenderTreeSupportQt::setShouldUseFontSmoothing(bool enabled)
{
WebCore::Font::setShouldUseSmoothing(enabled);
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 00cc4043e..a236e4bdc 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -215,6 +215,7 @@ public:
static void getTrackedRepaintRects(QWebFrameAdapter*, QVector<QRect>& result);
static void setShouldUseFontSmoothing(bool);
+ static void disableDefaultTypesettingFeatures();
static QString frameRenderTreeDump(QWebFrameAdapter*);
};
diff --git a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
index 60dcdbe94..e763eefd9 100644
--- a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
@@ -32,6 +32,7 @@
#include "Chrome.h"
#include "ChromeClientQt.h"
+#include "Font.h"
#include "Image.h"
#include "NotImplemented.h"
#include "Page.h"
@@ -71,6 +72,11 @@ Q_DECL_EXPORT void initializeWebKitQt()
if (initCallback) {
WebCore::RenderThemeQStyle::setStyleFactoryFunction(createStyleForPage);
WebCore::RenderThemeQt::setCustomTheme(WebCore::RenderThemeQStyle::create, new WebCore::ScrollbarThemeQStyle);
+#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
+ // Only enable kerning by default in Qt 5.1 where it can use the fast font path.
+ // In Qt 5.0 this would have forced the complex font path.
+ WebCore::Font::setDefaultTypesettingFeatures(WebCore::Kerning);
+#endif
}
}