[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:18:17 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit bcd820310360a5482a4e20c959b7eebd8090761f
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jul 17 21:32:39 2010 +0000

    2010-07-15  Qi Zhang  <qi.2.zhang at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Failure on http://philip.html5.org/tests/canvas/suite/tests/2d.shadow.alpha.5.html
            https://bugs.webkit.org/show_bug.cgi?id=38400
    
            FillRect with shadow need take alpha information from fillstyle
    
            * platform/graphics/qt/GraphicsContextQt.cpp:
            (WebCore::GraphicsContext::fillRect):
    2010-07-15  Qi Zhang  <qi.2.zhang at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Failure on http://philip.html5.org/tests/canvas/suite/tests/2d.shadow.alpha.5.html
            https://bugs.webkit.org/show_bug.cgi?id=38400
    
            Remove the following test case from Skipped:
            canvas/philip/tests/2d.shadow.alpha.5.html
            canvas/philip/tests/2d.shadow.gradient.alpha.html
            canvas/philip/tests/2d.shadow.gradient.transparent.1.html
            canvas/philip/tests/2d.shadow.image.scale.html
            canvas/philip/tests/2d.shadow.pattern.alpha.html
            canvas/philip/tests/2d.shadow.pattern.transparent.1.html
    
            * platform/qt/Skipped:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63614 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0e36628..80d18f3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2010-07-15  Qi Zhang  <qi.2.zhang at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Failure on http://philip.html5.org/tests/canvas/suite/tests/2d.shadow.alpha.5.html
+        https://bugs.webkit.org/show_bug.cgi?id=38400
+
+        Remove the following test case from Skipped:
+        canvas/philip/tests/2d.shadow.alpha.5.html
+        canvas/philip/tests/2d.shadow.gradient.alpha.html
+        canvas/philip/tests/2d.shadow.gradient.transparent.1.html
+        canvas/philip/tests/2d.shadow.image.scale.html
+        canvas/philip/tests/2d.shadow.pattern.alpha.html
+        canvas/philip/tests/2d.shadow.pattern.transparent.1.html
+
+        * platform/qt/Skipped:
+
 2010-07-17  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index bacef49..653b265 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5296,18 +5296,12 @@ canvas/philip/tests/2d.pattern.image.incomplete.html
 canvas/philip/tests/2d.pattern.image.null.html
 canvas/philip/tests/2d.pattern.image.string.html
 canvas/philip/tests/2d.pattern.image.undefined.html
-canvas/philip/tests/2d.shadow.alpha.5.html
 canvas/philip/tests/2d.shadow.canvas.alpha.html
 canvas/philip/tests/2d.shadow.canvas.basic.html
 canvas/philip/tests/2d.shadow.canvas.transparent.2.html
-canvas/philip/tests/2d.shadow.gradient.alpha.html
-canvas/philip/tests/2d.shadow.gradient.transparent.1.html
 canvas/philip/tests/2d.shadow.image.alpha.html
-canvas/philip/tests/2d.shadow.image.scale.html
 canvas/philip/tests/2d.shadow.image.transparent.1.html
 canvas/philip/tests/2d.shadow.image.transparent.2.html
-canvas/philip/tests/2d.shadow.pattern.alpha.html
-canvas/philip/tests/2d.shadow.pattern.transparent.1.html
 canvas/philip/tests/2d.shadow.transform.2.html
 canvas/philip/tests/2d.text.draw.baseline.bottom.html
 canvas/philip/tests/2d.text.draw.baseline.hanging.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 535cd0c..5571fb2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-07-15  Qi Zhang  <qi.2.zhang at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Failure on http://philip.html5.org/tests/canvas/suite/tests/2d.shadow.alpha.5.html
+        https://bugs.webkit.org/show_bug.cgi?id=38400
+
+        FillRect with shadow need take alpha information from fillstyle
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::fillRect):
+
 2010-07-17  Nikita Vasilyev  <me at elv1s.ru>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index ea80ec9..c6ac8a6 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -712,29 +712,67 @@ 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();
 
-    if (m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()) {
-        if (m_common->state.shadowColor.isValid())
-            drawBorderlessRectShadow(this, p, rect);
-        if (m_common->state.fillPattern) {
-            AffineTransform affine;
-            FloatRect rectM(rect);
-            QBrush brush(m_common->state.fillPattern->createPlatformPattern(affine));
-            QPixmap* image = m_common->state.fillPattern->tileImage()->nativeImageForCurrentFrame();
+    FloatSize shadowSize;
+    float shadowBlur;
+    Color shadowColor;
+    bool hasShadow = getShadow(shadowSize, shadowBlur, shadowColor);
+    FloatRect shadowDestRect;
+    QImage* shadowImage = 0;
+    QPainter* pShadow = 0;
+
+    if (hasShadow) {
+        shadowImage = new QImage(roundedIntSize(normalizedRect.size()), QImage::Format_ARGB32_Premultiplied);
+        pShadow = new QPainter(shadowImage);
+        shadowDestRect = normalizedRect;
+        shadowDestRect.move(shadowSize.width(), shadowSize.height());
+
+        pShadow->setCompositionMode(QPainter::CompositionMode_Source);
+        pShadow->fillRect(shadowImage->rect(), shadowColor);
+        pShadow->setCompositionMode(QPainter::CompositionMode_DestinationIn);
+    }
 
-            drawRepeatPattern(p, image, rect, m_common->state.fillPattern->repeatX(), m_common->state.fillPattern->repeatY());
-        } else if (m_common->state.fillGradient) {
-            QBrush brush(*m_common->state.fillGradient->platformGradient());
-            brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform());
-            p->fillRect(rect, brush);
-        } else {
-            if (fillColor().alpha())
-                p->fillRect(rect, p->brush());
+    if (m_common->state.fillPattern) {
+        AffineTransform affine;
+        FloatRect rectM(rect);
+        QBrush brush(m_common->state.fillPattern->createPlatformPattern(affine));
+        QPixmap* image = m_common->state.fillPattern->tileImage()->nativeImageForCurrentFrame();
+
+        if (hasShadow) {
+            drawRepeatPattern(pShadow, image, FloatRect(static_cast<QRectF>(shadowImage->rect())), m_common->state.fillPattern->repeatX(), m_common->state.fillPattern->repeatY());
+            pShadow->end();
+            p->drawImage(shadowDestRect, *shadowImage, shadowImage->rect());
         }
+        drawRepeatPattern(p, image, normalizedRect, m_common->state.fillPattern->repeatX(), m_common->state.fillPattern->repeatY());
+    } else if (m_common->state.fillGradient) {
+        QBrush brush(*m_common->state.fillGradient->platformGradient());
+        brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform());
+
+        if (hasShadow) {
+            pShadow->fillRect(shadowImage->rect(), brush);
+            pShadow->end();
+            p->drawImage(shadowDestRect, *shadowImage, shadowImage->rect());
+        }
+        p->fillRect(normalizedRect, brush);
+    } else if (fillColor().alpha()) {
+        if (hasShadow) {
+            pShadow->fillRect(shadowImage->rect(), p->brush());
+            pShadow->end();
+            p->drawImage(shadowDestRect, *shadowImage, shadowImage->rect());
+        }
+        p->fillRect(normalizedRect, p->brush());
     }
+
+    delete shadowImage;
+    delete pShadow;
 }
 
+
 void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace colorSpace)
 {
     if (paintingDisabled() || !color.isValid())

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list