[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

simon.fraser at apple.com simon.fraser at apple.com
Wed Dec 22 14:23:54 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c1c954fed352aa5da04ccd15485cbf660a4d8330
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 7 20:48:59 2010 +0000

    2010-10-07  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Beth Dakin.
    
            Edge fringe artifact with transformed, masked elements (including reflections)
            https://bugs.webkit.org/show_bug.cgi?id=19179
    
            When drawing the mask images, use a transparency layer if the CTM
            has a rotation, scale or skew in it to avoid antialiasing issues at
            the edges.
    
            Test: fast/css/transformed-mask.html
    
            * rendering/RenderBox.cpp:
            (WebCore::RenderBox::paintMask): Don't bother painting the mask if
            painting is disabled, which also avoids an assertion in getCTM().
            (WebCore::RenderBox::paintMaskImages):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69334 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c148793..e3e5bce 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-07  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Beth Dakin.
+
+        Edge fringe artifact with transformed, masked elements (including reflections)
+        https://bugs.webkit.org/show_bug.cgi?id=19179
+        
+        Testcase with reflected and transformed elements.
+
+        * fast/css/transformed-mask.html: Added.
+        * platform/mac/fast/css/transformed-mask-expected.checksum: Added.
+        * platform/mac/fast/css/transformed-mask-expected.png: Added.
+        * platform/mac/fast/css/transformed-mask-expected.txt: Added.
+
 2010-10-07  Albert J. Wong  <ajwong at chromium.org>
 
         [Chromium] Unreviewed. New baselines, and expectations updates.
diff --git a/LayoutTests/fast/css/transformed-mask.html b/LayoutTests/fast/css/transformed-mask.html
new file mode 100644
index 0000000..3fcd62c
--- /dev/null
+++ b/LayoutTests/fast/css/transformed-mask.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style type="text/css" media="screen">
+        .box {
+            height: 100px;
+            width: 100px;
+            background-color: black;
+            display: inline-block;
+            margin: 20px;
+            -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(0, 0, 0, 0.2)));
+        }
+
+        .transformed {
+            -webkit-transform: rotate(10deg);
+        }
+
+        .transformed2 {
+            -webkit-transform: skewX(10deg);
+        }
+        
+    </style>
+</head>
+<body>
+    <p>You should not see any pixel artifacts around the reflections.</p>
+    <div class="box"></div>
+    <div class="transformed box"></div>
+    <div class="transformed2 box"></div>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/css/transformed-mask-expected.checksum b/LayoutTests/platform/mac/fast/css/transformed-mask-expected.checksum
new file mode 100644
index 0000000..a0fff52
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/css/transformed-mask-expected.checksum
@@ -0,0 +1 @@
+9a0ef840ae1fc58dc2994122acc6e4ec
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/css/transformed-mask-expected.png b/LayoutTests/platform/mac/fast/css/transformed-mask-expected.png
new file mode 100644
index 0000000..183a50d
Binary files /dev/null and b/LayoutTests/platform/mac/fast/css/transformed-mask-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/css/transformed-mask-expected.txt b/LayoutTests/platform/mac/fast/css/transformed-mask-expected.txt
new file mode 100644
index 0000000..4e781fc
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/css/transformed-mask-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x202
+  RenderBlock {HTML} at (0,0) size 800x202
+    RenderBody {BODY} at (8,16) size 784x178
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 381x18
+          text run at (0,0) width 381: "You should not see any pixel artifacts around the reflections."
+      RenderBlock (anonymous) at (0,34) size 784x144
+        RenderText {#text} at (140,126) size 4x18
+          text run at (140,126) width 4: " "
+        RenderText {#text} at (284,126) size 4x18
+          text run at (284,126) width 4: " "
+        RenderText {#text} at (0,0) size 0x0
+layer at (28,70) size 100x100
+  RenderBlock {DIV} at (20,20) size 100x100 [bgcolor=#000000]
+layer at (172,70) size 100x100
+  RenderBlock {DIV} at (164,20) size 100x100 [bgcolor=#000000]
+layer at (316,70) size 100x100
+  RenderBlock {DIV} at (308,20) size 100x100 [bgcolor=#000000]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8e238bf..701d34d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-10-07  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Beth Dakin.
+
+        Edge fringe artifact with transformed, masked elements (including reflections)
+        https://bugs.webkit.org/show_bug.cgi?id=19179
+        
+        When drawing the mask images, use a transparency layer if the CTM
+        has a rotation, scale or skew in it to avoid antialiasing issues at
+        the edges.
+
+        Test: fast/css/transformed-mask.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paintMask): Don't bother painting the mask if
+        painting is disabled, which also avoids an assertion in getCTM().
+        (WebCore::RenderBox::paintMaskImages):
+
 2010-10-07  Kwang Yul Seo  <skyul at company100.net>
 
         Reviewed by Kent Tamura.
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index d54af1f..b8a2846 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -791,7 +791,7 @@ void RenderBox::paintBoxDecorationsWithSize(PaintInfo& paintInfo, int tx, int ty
 
 void RenderBox::paintMask(PaintInfo& paintInfo, int tx, int ty)
 {
-    if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)
+    if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask || paintInfo.context->paintingDisabled())
         return;
 
     int w = width();
@@ -814,6 +814,11 @@ void RenderBox::paintMaskImages(const PaintInfo& paintInfo, int tx, int ty, int
     bool allMaskImagesLoaded = true;
     
     if (!compositedMask) {
+        // If the context has a rotation, scale or skew, then use a transparency layer to avoid
+        // pixel cruft around the edge of the mask.
+        const AffineTransform& currentCTM = paintInfo.context->getCTM();
+        pushTransparencyLayer = !currentCTM.isIdentityOrTranslationOrFlipped();
+
         StyleImage* maskBoxImage = style()->maskBoxImage().image();
         const FillLayer* maskLayers = style()->maskLayers();
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list