ALT Linux repos
S: | 4.8.7-alt25 |
5.0: | 4.5.2-alt1.M50.1 |
4.1: | 4.4.3-alt1.M41.1 |
4.0: | 4.3.4-alt5.M40.1 |
3.0: | 4.0.1-alt1 |
+updates: | 4.0.1-alt2 |
+backports: | 4.2.3-alt7.1.M30 |
Group :: System/Libraries
RPM: qt4
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: 9107-qt-webkit-fix_graphicscontextqt.patch
Download
Download
diff -Naur qt-everywhere-opensource-src-4.7.0-orig/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
--- qt-everywhere-opensource-src-4.7.0-orig/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp 2010-09-10 13:05:21 +0400
+++ qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp 2010-10-10 12:13:18 +0400
@@ -51,6 +51,8 @@
#include "Pattern.h"
#include "Pen.h"
+#include <QtCore>
+
#include <QBrush>
#include <QDebug>
#include <QGradient>
@@ -780,8 +782,31 @@
if (paintingDisabled())
return;
+#if !defined(Q_WS_X11)
IntPoint endPoint = origin + IntSize(width, 0);
drawLine(origin, endPoint);
+#else
+ IntPoint p1 = origin;
+ IntPoint p2 = origin + IntSize(width, 0);
+
+ // if paintengine type is X11 to avoid artifacts
+ // like bug https://bugs.webkit.org/show_bug.cgi?id=42248
+ QPainter* p = m_data->p();
+ if (p->paintEngine()->type() == QPaintEngine::X11) {
+ // If stroke thiknes is odd we need decrease Y coordinate by 1,
+ // because inside methotod adjustLineToPixelBoundaries(...), which
+ // called from drawLine(...), Y coordinate will be increased by 0.5f
+ // and then inside Qt painting engine will be rounded to next greater
+ // integer value
+ float strokeWidth = strokeThickness();
+ if (static_cast<int>(strokeWidth) % 2) { //odd
+ p1.setY(p1.y() - 1);
+ p2.setY(p2.y() - 1);
+ }
+ }
+
+ drawLine(p1, p2);
+#endif // !defined(Q_WS_X11)
}
void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint&, int, bool)