diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-08-27 15:38:27 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-08-27 15:39:21 +0200 |
commit | 9be5e9c3b84b746100f21368f28de04cf7735e37 (patch) | |
tree | 68e1e20a9470276c64a4aa06081606a383098c5b /Source/WebCore/platform | |
parent | 7258ddabd572d5a60c92dfa03352e09ed11e3f85 (diff) | |
parent | a978cfb2e4c0fc3dd7551aaff16f1eee60ab1b1b (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2944629d0ee384b4fdcdb43108ddc2322ba76676
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r-- | Source/WebCore/platform/graphics/WidthIterator.h | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/qt/FontCacheQt.cpp | 3 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/RenderThemeQStyle.cpp | 13 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/RenderThemeQStyle.h | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/RenderThemeQt.cpp | 18 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/RenderThemeQt.h | 4 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/RenderThemeQtMobile.cpp | 2 |
7 files changed, 14 insertions, 30 deletions
diff --git a/Source/WebCore/platform/graphics/WidthIterator.h b/Source/WebCore/platform/graphics/WidthIterator.h index 6dc1c206c..43007e80d 100644 --- a/Source/WebCore/platform/graphics/WidthIterator.h +++ b/Source/WebCore/platform/graphics/WidthIterator.h @@ -66,7 +66,7 @@ public: return !(font.typesettingFeatures() & ~(Kerning | Ligatures)); #elif PLATFORM(QT) && QT_VERSION >= 0x050100 - return !(font.typesettingFeatures() & ~Kerning) && !font.isSmallCaps(); + return !(font.typesettingFeatures() & ~Kerning) && !font.isSmallCaps() && !font.letterSpacing(); #else return !font.typesettingFeatures(); #endif diff --git a/Source/WebCore/platform/graphics/qt/FontCacheQt.cpp b/Source/WebCore/platform/graphics/qt/FontCacheQt.cpp index e730d84bc..55a0f821d 100644 --- a/Source/WebCore/platform/graphics/qt/FontCacheQt.cpp +++ b/Source/WebCore/platform/graphics/qt/FontCacheQt.cpp @@ -81,7 +81,8 @@ PassRefPtr<SimpleFontData> FontCache::getSimilarFontPlatformData(const Font& fon PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(const FontDescription& fontDescription, ShouldRetain shouldRetain) { const AtomicString fallbackFamily = QFont(fontDescription.family().family()).lastResortFamily(); - return getCachedFontData(fontDescription, fallbackFamily, false, shouldRetain); + FontPlatformData platformData(fontDescription, fallbackFamily); + return getCachedFontData(&platformData, shouldRetain); } void FontCache::getTraitsInFamily(const AtomicString&, Vector<unsigned>&) diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp index e55c75c6e..b2fa5d7da 100644 --- a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp +++ b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp @@ -68,33 +68,30 @@ QSharedPointer<StylePainter> RenderThemeQStyle::getStylePainter(const PaintInfo& } StylePainterQStyle::StylePainterQStyle(RenderThemeQStyle* theme, const PaintInfo& paintInfo, RenderObject* renderObject) - : StylePainter(theme, paintInfo) + : StylePainter(paintInfo.context) , qStyle(theme->qStyle()) , appearance(NoControlPart) { - init(paintInfo.context ? paintInfo.context : 0); + setupStyleOption(); if (renderObject) appearance = theme->initializeCommonQStyleOptions(styleOption, renderObject); } StylePainterQStyle::StylePainterQStyle(ScrollbarThemeQStyle* theme, GraphicsContext* context) - : StylePainter() + : StylePainter(context) , qStyle(theme->qStyle()) , appearance(NoControlPart) { - init(context); + setupStyleOption(); } -void StylePainterQStyle::init(GraphicsContext* context) +void StylePainterQStyle::setupStyleOption() { - painter = static_cast<QPainter*>(context->platformContext()); if (QObject* widget = qStyle->widgetForPainter(painter)) { styleOption.palette = widget->property("palette").value<QPalette>(); styleOption.rect = widget->property("rect").value<QRect>(); styleOption.direction = static_cast<Qt::LayoutDirection>(widget->property("layoutDirection").toInt()); } - - StylePainter::init(context); } PassRefPtr<RenderTheme> RenderThemeQStyle::create(Page* page) diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.h b/Source/WebCore/platform/qt/RenderThemeQStyle.h index 08c18b971..6027f16e5 100644 --- a/Source/WebCore/platform/qt/RenderThemeQStyle.h +++ b/Source/WebCore/platform/qt/RenderThemeQStyle.h @@ -148,7 +148,7 @@ public: { qStyle->paintScrollBar(painter, styleOption); } private: - void init(GraphicsContext*); + void setupStyleOption(); Q_DISABLE_COPY(StylePainterQStyle) }; diff --git a/Source/WebCore/platform/qt/RenderThemeQt.cpp b/Source/WebCore/platform/qt/RenderThemeQt.cpp index e09b50dbe..4f3f3ad10 100644 --- a/Source/WebCore/platform/qt/RenderThemeQt.cpp +++ b/Source/WebCore/platform/qt/RenderThemeQt.cpp @@ -873,22 +873,10 @@ String RenderThemeQt::fileListNameForWidth(const FileList* fileList, const Font& return string; } -StylePainter::StylePainter(RenderThemeQt* theme, const PaintInfo& paintInfo) - : painter(0) +StylePainter::StylePainter(GraphicsContext* context) + : painter(context->platformContext()) { - Q_UNUSED(theme); - ASSERT(paintInfo.context); - init(paintInfo.context); -} - -StylePainter::StylePainter() - : painter(0) -{ -} - -void StylePainter::init(GraphicsContext* context) -{ - painter = static_cast<QPainter*>(context->platformContext()); + ASSERT(context); if (painter) { // the styles often assume being called with a pristine painter where no brush is set, diff --git a/Source/WebCore/platform/qt/RenderThemeQt.h b/Source/WebCore/platform/qt/RenderThemeQt.h index f16b50f33..cac006942 100644 --- a/Source/WebCore/platform/qt/RenderThemeQt.h +++ b/Source/WebCore/platform/qt/RenderThemeQt.h @@ -190,9 +190,7 @@ public: QPainter* painter; protected: - StylePainter(RenderThemeQt*, const PaintInfo&); - StylePainter(); - void init(GraphicsContext*); + StylePainter(GraphicsContext*); private: QBrush m_previousBrush; diff --git a/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp b/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp index 702eda4cd..1eee832cd 100644 --- a/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp +++ b/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp @@ -209,7 +209,7 @@ QPalette RenderThemeQtMobile::colorPalette() const } StylePainterMobile::StylePainterMobile(RenderThemeQtMobile* theme, const PaintInfo& paintInfo) - : StylePainter(theme, paintInfo) + : StylePainter(paintInfo.context) { m_previousSmoothPixmapTransform = painter->testRenderHint(QPainter::SmoothPixmapTransform); if (!m_previousSmoothPixmapTransform) |