[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

morrita at google.com morrita at google.com
Mon Feb 21 00:24:42 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 2d33a85b840e297816d5b803efb245c45f3378f2
Author: morrita at google.com <morrita at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 31 04:23:44 2011 +0000

    2011-01-23  MORITA Hajime  <morrita at google.com>
    
            Reviewed by Eric Seidel.
    
            REGRESSION: Inset shadow with too large border radius misses rounded corner.
            https://bugs.webkit.org/show_bug.cgi?id=52800
    
            * fast/box-shadow/inset-with-extraordinary-radii-and-border.html: Added.
            * platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.checksum: Added.
            * platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png: Added.
            * platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.txt: Added.
    2011-01-23  MORITA Hajime  <morrita at google.com>
    
            Reviewed by Eric Seidel.
    
            REGRESSION: Inset shadow with too large border radius misses rounded corner.
            https://bugs.webkit.org/show_bug.cgi?id=52800
    
            The refactoring on r76083 broke the invariant between border
            IntRect and its radii because RoundedIntRect::setRect() is called
            after getRoundedInnerBorderWithBorderWidths(), which enforces the
            invariant. Th rounded-rect clipping code verifies the invariant,
            and discard the invalid radii, that results broken paintings.
    
            This change moved setRect() before
            getRoundedInnerBorderWithBorderWidths() not to modify the valid
            RoundedIntRect value.
    
            Test: fast/box-shadow/inset-with-extraordinary-radii-and-border.html
    
            * rendering/RenderBoxModelObject.cpp:
            (WebCore::RenderBoxModelObject::paintBoxShadow):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77105 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7621fb0..a79fee7 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-23  MORITA Hajime  <morrita at google.com>
+
+        Reviewed by Eric Seidel.
+
+        REGRESSION: Inset shadow with too large border radius misses rounded corner.
+        https://bugs.webkit.org/show_bug.cgi?id=52800
+
+        * fast/box-shadow/inset-with-extraordinary-radii-and-border.html: Added.
+        * platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.checksum: Added.
+        * platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png: Added.
+        * platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.txt: Added.
+
 2011-01-30  Simon Fraser  <simon.fraser at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/LayoutTests/fast/box-shadow/inset-with-extraordinary-radii-and-border.html b/LayoutTests/fast/box-shadow/inset-with-extraordinary-radii-and-border.html
new file mode 100644
index 0000000..3af050e
--- /dev/null
+++ b/LayoutTests/fast/box-shadow/inset-with-extraordinary-radii-and-border.html
@@ -0,0 +1,47 @@
+<html>
+<head>
+<style>
+body { background-color: black; }
+
+.test {
+    border-radius: 40px;
+    -webkit-box-shadow: inset white 0 0 0 15px;
+    border: 4px solid green;
+    background-color: blue;
+    margin: 20px;
+}
+
+#test0 {
+    height: 70px;
+    width: 70px;
+    float: left;
+}
+
+#test1 {
+    height: 100px;
+    width: 70px;
+    float: left;
+}
+
+#test2 {
+    height: 70px;
+    width: 100px;
+    float: right;
+}
+
+#test3 {
+    height: 100px;
+    width: 100px;
+    float: right;
+}
+
+</style>
+</head>
+<body>
+<div>
+  <div class="test" id="test0"></div>
+  <div class="test" id="test1"></div>
+  <div class="test" id="test2"></div>
+  <div class="test" id="test3"></div>
+</div>
+</body>
diff --git a/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.checksum b/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.checksum
new file mode 100644
index 0000000..5390fac
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.checksum
@@ -0,0 +1 @@
+22de9eff940a1547914d350c89436887
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png b/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png
new file mode 100644
index 0000000..1130c66
Binary files /dev/null and b/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.txt b/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.txt
new file mode 100644
index 0000000..95a1e78
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/box-shadow/inset-with-extraordinary-radii-and-border-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584 [bgcolor=#000000]
+      RenderBlock {DIV} at (0,0) size 784x0
+        RenderBlock (floating) {DIV} at (20,20) size 78x78 [bgcolor=#0000FF] [border: (4px solid #008000)]
+        RenderBlock (floating) {DIV} at (138,20) size 78x108 [bgcolor=#0000FF] [border: (4px solid #008000)]
+        RenderBlock (floating) {DIV} at (656,20) size 108x78 [bgcolor=#0000FF] [border: (4px solid #008000)]
+        RenderBlock (floating) {DIV} at (508,20) size 108x108 [bgcolor=#0000FF] [border: (4px solid #008000)]
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 3d6571a..8eb1a02 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2011-01-23  MORITA Hajime  <morrita at google.com>
+
+        Reviewed by Eric Seidel.
+
+        REGRESSION: Inset shadow with too large border radius misses rounded corner.
+        https://bugs.webkit.org/show_bug.cgi?id=52800
+
+        The refactoring on r76083 broke the invariant between border
+        IntRect and its radii because RoundedIntRect::setRect() is called
+        after getRoundedInnerBorderWithBorderWidths(), which enforces the
+        invariant. Th rounded-rect clipping code verifies the invariant,
+        and discard the invalid radii, that results broken paintings.
+        
+        This change moved setRect() before
+        getRoundedInnerBorderWithBorderWidths() not to modify the valid
+        RoundedIntRect value.
+        
+        Test: fast/box-shadow/inset-with-extraordinary-radii-and-border.html
+
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::paintBoxShadow):
+
 2011-01-30  Simon Fraser  <simon.fraser at apple.com>
 
         Attempt to fix Windows build by adding ShadowBlur.cpp/h to the
diff --git a/Source/WebCore/rendering/RenderBoxModelObject.cpp b/Source/WebCore/rendering/RenderBoxModelObject.cpp
index 61fc4ad..0180b85 100644
--- a/Source/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/Source/WebCore/rendering/RenderBoxModelObject.cpp
@@ -1585,17 +1585,18 @@ void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int
     RoundedIntRect border(tx, ty, w, h);
     bool hasBorderRadius = s->hasBorderRadius();
     bool isHorizontal = s->isHorizontalWritingMode();
-    if (hasBorderRadius && (includeLogicalLeftEdge || includeLogicalRightEdge)) {
-        RoundedIntRect::Radii radii = ((shadowStyle == Inset) ? s->getRoundedInnerBorderWithBorderWidths(border.rect(), borderTop(), borderBottom(), borderLeft(), borderRight()) : s->getRoundedBorderFor(border.rect())).radii();
-        border.includeLogicalEdges(radii, isHorizontal, includeLogicalLeftEdge, includeLogicalRightEdge);
-    }
-   
+
     if (shadowStyle == Inset)
         border.setRect(IntRect(border.rect().x() + (includeLogicalLeftEdge || !isHorizontal ? borderLeft() : 0),
                                border.rect().y() + (includeLogicalLeftEdge || isHorizontal ? borderTop() : 0),
                                border.rect().width() - ((includeLogicalLeftEdge || !isHorizontal) ? borderLeft() : 0) - ((includeLogicalRightEdge || !isHorizontal) ? borderRight() : 0),
                                border.rect().height() - ((includeLogicalLeftEdge || isHorizontal) ? borderTop() : 0) - ((includeLogicalRightEdge || isHorizontal) ? borderBottom() : 0)));
 
+    if (hasBorderRadius && (includeLogicalLeftEdge || includeLogicalRightEdge)) {
+        RoundedIntRect::Radii radii = ((shadowStyle == Inset) ? s->getRoundedInnerBorderWithBorderWidths(border.rect(), borderTop(), borderBottom(), borderLeft(), borderRight()) : s->getRoundedBorderFor(border.rect())).radii();
+        border.includeLogicalEdges(radii, isHorizontal, includeLogicalLeftEdge, includeLogicalRightEdge);
+    }
+
     bool hasOpaqueBackground = s->visitedDependentColor(CSSPropertyBackgroundColor).isValid() && s->visitedDependentColor(CSSPropertyBackgroundColor).alpha() == 255;
     for (const ShadowData* shadow = s->boxShadow(); shadow; shadow = shadow->next()) {
         if (shadow->style() != shadowStyle)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list