[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 11:19:13 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 362faded640a4dfbcb654de93542c97825c9a5f8
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 19 14:08:31 2010 +0000

    2010-07-19  Andreas Kling  <andreas.kling at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Some composition modes fail when color has alpha zero
            https://bugs.webkit.org/show_bug.cgi?id=36973
    
            Remove erroneous optimization that ignored painting calls when
            the stroke/fill color had an alpha value of zero.
    
            * platform/graphics/qt/GraphicsContextQt.cpp:
            (WebCore::GraphicsContext::drawLine):
            (WebCore::GraphicsContext::strokeArc):
            (WebCore::GraphicsContext::fillPath):
            (WebCore::GraphicsContext::strokePath):
            (WebCore::GraphicsContext::fillRect):
            (WebCore::GraphicsContext::fillRoundedRect):
    2010-07-19  Andreas Kling  <andreas.kling at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Some composition modes fail when color has alpha zero
            https://bugs.webkit.org/show_bug.cgi?id=36973
    
            Unskip fast/canvas/canvas-composite-alpha.html
    
            * platform/qt/Skipped:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63654 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ad6536c..332f618 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-07-19  Andreas Kling  <andreas.kling at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Some composition modes fail when color has alpha zero
+        https://bugs.webkit.org/show_bug.cgi?id=36973
+
+        Unskip fast/canvas/canvas-composite-alpha.html
+
+        * platform/qt/Skipped:
+
 2010-07-19  Pavel Podivilov  <podivilov at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index d78e5b4..b03bb8d 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -2605,7 +2605,6 @@ fast/text/in-rendered-text-rtl.html
 fast/text/large-text-composed-char-dos.html
 fast/text/international/002.html
 fast/block/positioning/absolute-in-inline-rtl-4.html
-fast/canvas/canvas-composite-alpha.html
 fast/canvas/canvas-gradient-addStop-error.html
 fast/css/zoom-body-scroll.html
 fast/dom/Element/getBoundingClientRect.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 86eb187..b7ae9c6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,24 @@
 
         Reviewed by Kenneth Rohde Christiansen.
 
+        [Qt] Some composition modes fail when color has alpha zero
+        https://bugs.webkit.org/show_bug.cgi?id=36973
+
+        Remove erroneous optimization that ignored painting calls when
+        the stroke/fill color had an alpha value of zero.
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::drawLine):
+        (WebCore::GraphicsContext::strokeArc):
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::fillRect):
+        (WebCore::GraphicsContext::fillRoundedRect):
+
+2010-07-19  Andreas Kling  <andreas.kling at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
         CSS3 background: Number of layers should be determined by background-image element count
         https://bugs.webkit.org/show_bug.cgi?id=41201
 
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index c6ac8a6..45706e8 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -358,7 +358,7 @@ void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2)
 
     StrokeStyle style = strokeStyle();
     Color color = strokeColor();
-    if (style == NoStroke || !color.alpha())
+    if (style == NoStroke)
         return;
 
     float width = strokeThickness();
@@ -467,7 +467,7 @@ void GraphicsContext::drawEllipse(const IntRect& rect)
 
 void GraphicsContext::strokeArc(const IntRect& rect, int startAngle, int angleSpan)
 {
-    if (paintingDisabled() || strokeStyle() == NoStroke || strokeThickness() <= 0.0f || !strokeColor().alpha())
+    if (paintingDisabled() || strokeStyle() == NoStroke || strokeThickness() <= 0.0f)
         return;
 
     QPainter* p = m_data->p();
@@ -570,20 +570,17 @@ void GraphicsContext::fillPath()
     QPainterPath path = m_data->currentPath;
     path.setFillRule(toQtFillRule(fillRule()));
 
-    if (m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()) {
-        drawFilledShadowPath(this, p, path);
-        if (m_common->state.fillPattern) {
-            AffineTransform affine;
-            p->fillPath(path, QBrush(m_common->state.fillPattern->createPlatformPattern(affine)));
-        } else if (m_common->state.fillGradient) {
-            QBrush brush(*m_common->state.fillGradient->platformGradient());
-            brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform());
-            p->fillPath(path, brush);
-        } else {
-            if (fillColor().alpha())
-                p->fillPath(path, p->brush());
-        }
-    }
+    drawFilledShadowPath(this, p, path);
+    if (m_common->state.fillPattern) {
+        AffineTransform affine;
+        p->fillPath(path, QBrush(m_common->state.fillPattern->createPlatformPattern(affine)));
+    } else if (m_common->state.fillGradient) {
+        QBrush brush(*m_common->state.fillGradient->platformGradient());
+        brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform());
+        p->fillPath(path, brush);
+    } else
+        p->fillPath(path, p->brush());
+
     m_data->currentPath = QPainterPath();
 }
 
@@ -597,34 +594,30 @@ void GraphicsContext::strokePath()
     QPainterPath path = m_data->currentPath;
     path.setFillRule(toQtFillRule(fillRule()));
 
-    if (m_common->state.strokePattern || m_common->state.strokeGradient || strokeColor().alpha()) {
-        FloatSize shadowSize;
-        float shadowBlur;
-        Color shadowColor;
-        if (getShadow(shadowSize, shadowBlur, shadowColor)) {
-            QTransform t(p->worldTransform());
-            p->translate(shadowSize.width(), shadowSize.height());
-            QPen shadowPen(pen);
-            shadowPen.setColor(shadowColor);
-            p->strokePath(path, shadowPen);
-            p->setWorldTransform(t);
-        }
-        if (m_common->state.strokePattern) {
-            AffineTransform affine;
-            pen.setBrush(QBrush(m_common->state.strokePattern->createPlatformPattern(affine)));
-            p->setPen(pen);
-            p->strokePath(path, pen);
-        } else if (m_common->state.strokeGradient) {
-            QBrush brush(*m_common->state.strokeGradient->platformGradient());
-            brush.setTransform(m_common->state.strokeGradient->gradientSpaceTransform());
-            pen.setBrush(brush);
-            p->setPen(pen);
-            p->strokePath(path, pen);
-        } else {
-            if (strokeColor().alpha())
-                p->strokePath(path, pen);
-        }
+    FloatSize shadowSize;
+    float shadowBlur;
+    Color shadowColor;
+    if (getShadow(shadowSize, shadowBlur, shadowColor)) {
+        QTransform t(p->worldTransform());
+        p->translate(shadowSize.width(), shadowSize.height());
+        QPen shadowPen(pen);
+        shadowPen.setColor(shadowColor);
+        p->strokePath(path, shadowPen);
+        p->setWorldTransform(t);
     }
+    if (m_common->state.strokePattern) {
+        AffineTransform affine;
+        pen.setBrush(QBrush(m_common->state.strokePattern->createPlatformPattern(affine)));
+        p->setPen(pen);
+        p->strokePath(path, pen);
+    } else if (m_common->state.strokeGradient) {
+        QBrush brush(*m_common->state.strokeGradient->platformGradient());
+        brush.setTransform(m_common->state.strokeGradient->gradientSpaceTransform());
+        pen.setBrush(brush);
+        p->setPen(pen);
+        p->strokePath(path, pen);
+    } else
+        p->strokePath(path, pen);
     m_data->currentPath = QPainterPath();
 }
 
@@ -712,9 +705,6 @@ void GraphicsContext::fillRect(const FloatRect& rect)
     if (paintingDisabled())
         return;
 
-    if (!(m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()))
-        return;
-
     QPainter* p = m_data->p();
     FloatRect normalizedRect = rect.normalized();
 
@@ -759,7 +749,7 @@ void GraphicsContext::fillRect(const FloatRect& rect)
             p->drawImage(shadowDestRect, *shadowImage, shadowImage->rect());
         }
         p->fillRect(normalizedRect, brush);
-    } else if (fillColor().alpha()) {
+    } else {
         if (hasShadow) {
             pShadow->fillRect(shadowImage->rect(), p->brush());
             pShadow->end();
@@ -787,7 +777,7 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorS
 
 void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color& color, ColorSpace colorSpace)
 {
-    if (paintingDisabled() || !color.isValid() || !color.alpha())
+    if (paintingDisabled() || !color.isValid())
         return;
 
     Path path = Path::createRoundedRectangle(rect, topLeft, topRight, bottomLeft, bottomRight);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list