summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-03-27 21:26:54 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-03-27 21:26:54 (GMT)
commit9748269cb58266fdfdac2c8820dad8c473dcf512 (patch)
tree81cdd7830afb6507429594e133e18ca9f420dd8c /src/3rdparty
parent9a33a0027883ab77c10d8a9d9d9df5b4c2c5d50b (diff)
parentba25c4a832516124bcd97758de9eede32797c5a0 (diff)
downloadQt-9748269cb58266fdfdac2c8820dad8c473dcf512.zip
Qt-9748269cb58266fdfdac2c8820dad8c473dcf512.tar.gz
Qt-9748269cb58266fdfdac2c8820dad8c473dcf512.tar.bz2
Merge branch '4.5'
Conflicts: tools/linguist/lupdate/qscript.cpp tools/linguist/lupdate/qscript.g tools/linguist/lupdate/ui.cpp tools/linguist/shared/cpp.cpp tools/linguist/shared/qph.cpp tools/linguist/shared/translator.h
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog30
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp14
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp26
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h3
5 files changed, 67 insertions, 8 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index da530c8..96840d0 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- 0b6fc217c2b853827926313c09bb3c32f66ffe43
+ 1beae2b64b5b1e9b97e82dc94de18ebac1c19efc
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 3b20751..e8850f3 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,33 @@
+2009-03-27 Zack Rusin <zack@kde.org>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24280
+
+ Fix propagation of fill rules when rendering paths in the Qt build.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::toQtFillRule):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+
+2009-03-27 Zack Rusin <zack@kde.org>
+
+ Reviewed by Tor Arne Vestbø.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24275
+
+ Fix text field theming in the Qt build with the KDE 4 Oxygen
+ style by adjusting the size vertically and horizontally to
+ set padding on the element equal to the width of the style painted border.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::RenderThemeQt):
+ (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
+ (WebCore::RenderThemeQt::adjustTextFieldStyle):
+ (WebCore::RenderThemeQt::paintTextField):
+ * platform/qt/RenderThemeQt.h:
+
2009-02-06 Dirk Schulze <krit@webkit.org>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 1830566..936c1ea 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -168,6 +168,18 @@ static inline QGradient applySpreadMethod(QGradient gradient, GradientSpreadMeth
return gradient;
}
+static inline Qt::FillRule toQtFillRule(WindRule rule)
+{
+ switch(rule) {
+ case RULE_EVENODD:
+ return Qt::OddEvenFill;
+ case RULE_NONZERO:
+ return Qt::WindingFill;
+ }
+ qDebug("Qt: unrecognized wind rule!");
+ return Qt::OddEvenFill;
+}
+
struct TransparencyLayer
{
TransparencyLayer(const QPainter* p, const QRect &rect)
@@ -541,6 +553,7 @@ void GraphicsContext::fillPath()
QPainter *p = m_data->p();
QPainterPath path = m_data->currentPath;
+ path.setFillRule(toQtFillRule(fillRule()));
switch (m_common->state.fillColorSpace) {
case SolidColorSpace:
@@ -569,6 +582,7 @@ void GraphicsContext::strokePath()
QPainter *p = m_data->p();
QPen pen = p->pen();
QPainterPath path = m_data->currentPath;
+ path.setFillRule(toQtFillRule(fillRule()));
switch (m_common->state.strokeColorSpace) {
case SolidColorSpace:
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index cc9d314..a9da76b 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -41,6 +41,7 @@
#include <QWidget>
#include <QPainter>
#include <QPushButton>
+#include <QLineEdit>
#include <QStyleFactory>
#include <QStyleOptionButton>
#include <QStyleOptionFrameV2>
@@ -123,6 +124,12 @@ RenderThemeQt::RenderThemeQt()
#endif
m_fallbackStyle = 0;
+
+ // this will need to be regenerated when the style changes
+ QLineEdit lineEdit;
+ QStyleOptionFrameV2 opt;
+ m_frameLineWidth = QApplication::style()->pixelMetric(QStyle::PM_DefaultFrameWidth,
+ &opt, &lineEdit);
}
RenderThemeQt::~RenderThemeQt()
@@ -268,7 +275,7 @@ int RenderThemeQt::minimumMenuListSize(RenderStyle*) const
return 7 * fm.width(QLatin1Char('x'));
}
-static void computeSizeBasedOnStyle(RenderStyle* renderStyle)
+void RenderThemeQt::computeSizeBasedOnStyle(RenderStyle* renderStyle) const
{
// If the width and height are both specified, then we have nothing to do.
if (!renderStyle->width().isIntrinsicOrAuto() && !renderStyle->height().isAuto())
@@ -335,13 +342,15 @@ static void computeSizeBasedOnStyle(RenderStyle* renderStyle)
int h = qMax(fm.lineSpacing(), 14) + 2*verticalMargin;
int w = fm.width(QLatin1Char('x')) * 17 + 2*horizontalMargin;
QStyleOptionFrameV2 opt;
- opt.lineWidth = applicationStyle->pixelMetric(QStyle::PM_DefaultFrameWidth,
- &opt, 0);
+ opt.lineWidth = m_frameLineWidth;
QSize sz = applicationStyle->sizeFromContents(QStyle::CT_LineEdit,
- &opt,
- QSize(w, h).expandedTo(QApplication::globalStrut()),
- 0);
+ &opt,
+ QSize(w, h).expandedTo(QApplication::globalStrut()),
+ 0);
size.setHeight(sz.height());
+
+ renderStyle->setPaddingLeft(Length(opt.lineWidth, Fixed));
+ renderStyle->setPaddingRight(Length(opt.lineWidth, Fixed));
break;
}
default:
@@ -482,6 +491,9 @@ void RenderThemeQt::adjustTextFieldStyle(CSSStyleSelector*, RenderStyle* style,
{
style->setBackgroundColor(Color::transparent);
style->setColor(QApplication::palette().text().color());
+ style->resetBorder();
+ style->resetPadding();
+ computeSizeBasedOnStyle(style);
}
bool RenderThemeQt::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
@@ -495,7 +507,7 @@ bool RenderThemeQt::paintTextField(RenderObject* o, const RenderObject::PaintInf
panel.initFrom(p.widget);
panel.rect = r;
- panel.lineWidth = p.style->pixelMetric(QStyle::PM_DefaultFrameWidth, &panel, p.widget);
+ panel.lineWidth = m_frameLineWidth;
panel.state |= QStyle::State_Sunken;
panel.features = QStyleOptionFrameV2::None;
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
index b4a5064..5c78a72 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
@@ -128,6 +128,7 @@ private:
void paintMediaBackground(QPainter* painter, const IntRect& r) const;
QColor getMediaControlForegroundColor(RenderObject* o = 0) const;
#endif
+ void computeSizeBasedOnStyle(RenderStyle* renderStyle) const;
private:
bool supportsFocus(ControlPart) const;
@@ -144,6 +145,8 @@ private:
QStyle* m_fallbackStyle;
QStyle* fallbackStyle();
+
+ int m_frameLineWidth;
};
class StylePainter