diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/qt')
5 files changed, 16 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp b/Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp index 908d881f1..2c8571ace 100644 --- a/Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp +++ b/Source/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp @@ -41,7 +41,7 @@ std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffe const QByteArray fontData(buffer.data(), buffer.size()); // Pixel size doesn't matter at this point, it is set in FontCustomPlatformData::fontPlatformData. - QRawFont rawFont(fontData, /*pixelSize = */0, QFont::PreferDefaultHinting); + QRawFont rawFont(fontData, /*pixelSize = */0, QFont::PreferVerticalHinting); if (!rawFont.isValid()) return 0; diff --git a/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp b/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp index 2ed4a98c3..8727bccab 100644 --- a/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp +++ b/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp @@ -105,7 +105,9 @@ FontPlatformData::FontPlatformData(const FontDescription& description, const Ato font.setLetterSpacing(QFont::AbsoluteSpacing, letterSpacing); if (!FontCascade::shouldUseSmoothing()) - font.setStyleStrategy(QFont::NoAntialias); + font.setStyleStrategy(static_cast<QFont::StyleStrategy>(QFont::NoAntialias | QFont::ForceOutline)); + else + font.setStyleStrategy(QFont::ForceOutline); m_data->bold = font.bold(); // WebKit allows font size zero but QFont does not. We will return diff --git a/Source/WebCore/platform/graphics/qt/GradientQt.cpp b/Source/WebCore/platform/graphics/qt/GradientQt.cpp index 3412cfadd..2c3dec5ba 100644 --- a/Source/WebCore/platform/graphics/qt/GradientQt.cpp +++ b/Source/WebCore/platform/graphics/qt/GradientQt.cpp @@ -66,6 +66,10 @@ QGradient* Gradient::platformGradient() qreal lastStop(0.0); const qreal lastStopDiff = 0.0000001; while (stopIterator != m_stops.end()) { + // Drop gradient stops after 1.0 to avoid overwriting color at 1.0 + if (lastStop >= 1) + break; + stopColor.setRgbF(stopIterator->red, stopIterator->green, stopIterator->blue, stopIterator->alpha); if (qFuzzyCompare(lastStop, qreal(stopIterator->stop))) lastStop = stopIterator->stop + lastStopDiff; @@ -78,6 +82,8 @@ QGradient* Gradient::platformGradient() lastStop += innerRadius / outerRadius; } + // Clamp stop position to 1.0, otherwise QGradient will ignore it + // https://bugs.webkit.org/show_bug.cgi?id=41484 qreal stopPosition = qMin(lastStop, qreal(1.0f)); if (m_radial && reversed) diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp index 1e041050e..6bf343087 100644 --- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp +++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp @@ -151,6 +151,11 @@ static inline QPainter::CompositionMode toQtCompositionMode(BlendMode op) return QPainter::CompositionMode_Difference; case BlendModeExclusion: return QPainter::CompositionMode_Exclusion; + case BlendModePlusLighter: + return QPainter::CompositionMode_Plus; + case BlendModePlusDarker: + // there is no exact match, but this is the closest + return QPainter::CompositionMode_Darken; case BlendModeHue: case BlendModeSaturation: case BlendModeColor: diff --git a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp b/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp index 9091fdc72..cef4750ed 100644 --- a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp +++ b/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp @@ -80,7 +80,7 @@ MediaPlayer::SupportsType MediaPlayerPrivateQt::supportsType(const MediaEngineSu if (parameters.isMediaStream || parameters.isMediaSource) return MediaPlayer::IsNotSupported; - if (!parameters.type.startsWith("audio/") && !parameters.type.startsWith("video/")) + if (!parameters.type.startsWithIgnoringASCIICase("audio/") && !parameters.type.startsWithIgnoringASCIICase("video/")) return MediaPlayer::IsNotSupported; // Parse and trim codecs. |