[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 12:25:06 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 50a2867c0befed5ca81b702ad6801e92867df73a
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 23 00:52:13 2010 +0000
2010-08-22 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] GraphicsContext: Simplify getting the clip bounding rect
https://bugs.webkit.org/show_bug.cgi?id=44396
Move the Qt 4.8 version check for QPainter::clipBoundingRect()
into a GraphicsContextPlatformPrivate method.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContextPlatformPrivate::clipBoundingRect):
(WebCore::GraphicsContext::beginTransparencyLayer):
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::clipOutEllipseInRect):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3b394ae..9ad6749 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-22 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] GraphicsContext: Simplify getting the clip bounding rect
+ https://bugs.webkit.org/show_bug.cgi?id=44396
+
+ Move the Qt 4.8 version check for QPainter::clipBoundingRect()
+ into a GraphicsContextPlatformPrivate method.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContextPlatformPrivate::clipBoundingRect):
+ (WebCore::GraphicsContext::beginTransparencyLayer):
+ (WebCore::GraphicsContext::clipOut):
+ (WebCore::GraphicsContext::clipOutEllipseInRect):
+
2010-08-22 Juha Savolainen <juha.savolainen at weego.fi>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index c8e283c..f56c54c 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -209,6 +209,15 @@ public:
return shadow.type != ContextShadow::NoShadow;
}
+ QRectF clipBoundingRect() const
+ {
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
+ return painter->clipBoundingRect();
+#else
+ return painter->clipRegion().boundingRect();
+#endif
+ }
+
private:
QPainter* painter;
};
@@ -911,7 +920,7 @@ void GraphicsContext::beginTransparencyLayer(float opacity)
w = device->width();
h = device->height();
- QRectF clip = p->clipPath().boundingRect();
+ QRectF clip = m_data->clipBoundingRect();
QRectF deviceClip = p->transform().mapRect(clip);
x = int(qBound(qreal(0), deviceClip.x(), (qreal)w));
y = int(qBound(qreal(0), deviceClip.y(), (qreal)h));
@@ -1074,11 +1083,7 @@ void GraphicsContext::clipOut(const Path& path)
QPainterPath newClip;
newClip.setFillRule(Qt::OddEvenFill);
if (p->hasClipping()) {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
- newClip.addRect(p->clipBoundingRect());
-#else
- newClip.addRect(p->clipRegion().boundingRect());
-#endif
+ newClip.addRect(m_data->clipBoundingRect());
newClip.addPath(clippedOut);
p->setClipPath(newClip, Qt::IntersectClip);
} else {
@@ -1148,11 +1153,7 @@ void GraphicsContext::clipOut(const IntRect& rect)
QPainterPath newClip;
newClip.setFillRule(Qt::OddEvenFill);
if (p->hasClipping()) {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
- newClip.addRect(p->clipBoundingRect());
-#else
- newClip.addRect(p->clipRegion().boundingRect());
-#endif
+ newClip.addRect(m_data->clipBoundingRect());
newClip.addRect(QRect(rect));
p->setClipPath(newClip, Qt::IntersectClip);
} else {
@@ -1174,11 +1175,7 @@ void GraphicsContext::clipOutEllipseInRect(const IntRect& rect)
QPainterPath newClip;
newClip.setFillRule(Qt::OddEvenFill);
if (p->hasClipping()) {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
- newClip.addRect(p->clipBoundingRect());
-#else
- newClip.addRect(p->clipRegion().boundingRect());
-#endif
+ newClip.addRect(m_data->clipBoundingRect());
newClip.addEllipse(QRect(rect));
p->setClipPath(newClip, Qt::IntersectClip);
} else {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list