Title: [144665] branches/chromium/1410
- Revision
- 144665
- Author
- ju...@google.com
- Date
- 2013-03-04 13:39:25 -0800 (Mon, 04 Mar 2013)
Log Message
Merge 144196
> REGRESSION (r134631) of border-radius percentage with border pixel
> https://bugs.webkit.org/show_bug.cgi?id=110889
>
> Reviewed by Simon Fraser.
>
> Source/WebCore:
>
> Fixing background color filling to handle "non renderable" rounded
> rectangles.
>
> Test: fast/borders/border-radius-percent.html
>
> * rendering/RenderBoxModelObject.cpp:
> (WebCore::RenderBoxModelObject::paintFillLayerExtended):
>
> LayoutTests:
>
> Adding new pixel test to verify the correct rendering of
> rounded rectangle backgrounds with inner border radii that
> exceed the dimensions of the inner edge of the border.
>
> * fast/borders/border-radius-percent-expected.txt: Added.
> * fast/borders/border-radius-percent.html: Added.
> * platform/chromium-linux/fast/borders/border-radius-percent-expected.png: Added.
> * platform/chromium/TestExpectations:
>
TBR=ju...@google.com
Review URL: https://codereview.chromium.org/12390064
Modified Paths
Added Paths
Diff
Copied: branches/chromium/1410/LayoutTests/fast/borders/border-radius-percent-expected.txt (from rev 144196, trunk/LayoutTests/fast/borders/border-radius-percent-expected.txt) (0 => 144665)
--- branches/chromium/1410/LayoutTests/fast/borders/border-radius-percent-expected.txt (rev 0)
+++ branches/chromium/1410/LayoutTests/fast/borders/border-radius-percent-expected.txt 2013-03-04 21:39:25 UTC (rev 144665)
@@ -0,0 +1,3 @@
+Corners on top should be rounded and a border of 1px black on the bottom.
+
+Corners on top should be rounded and a border of 1px black all around.
Copied: branches/chromium/1410/LayoutTests/fast/borders/border-radius-percent.html (from rev 144196, trunk/LayoutTests/fast/borders/border-radius-percent.html) (0 => 144665)
--- branches/chromium/1410/LayoutTests/fast/borders/border-radius-percent.html (rev 0)
+++ branches/chromium/1410/LayoutTests/fast/borders/border-radius-percent.html 2013-03-04 21:39:25 UTC (rev 144665)
@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+ p{
+ text-align:center;
+ background:#ccc;
+ border-radius:50% 50% 0 0 / 100%;
+ width:300px;
+ height:150px;
+ }
+ p.all{
+ border:1px solid #000;
+ }
+ p.bottom{
+ border-bottom:1px solid #000;
+ }
+</style>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText(true);
+</script>
+</head>
+<body>
+<p class="bottom">Corners on top should be rounded and a border of 1px black on the bottom.</p>
+<p class="all">Corners on top should be rounded and a border of 1px black all around.</p>
+</body>
+</html>
Copied: branches/chromium/1410/LayoutTests/platform/chromium-linux/fast/borders/border-radius-percent-expected.png (from rev 144196, trunk/LayoutTests/platform/chromium-linux/fast/borders/border-radius-percent-expected.png)
(Binary files differ)
Modified: branches/chromium/1410/Source/WebCore/rendering/RenderBoxModelObject.cpp (144664 => 144665)
--- branches/chromium/1410/Source/WebCore/rendering/RenderBoxModelObject.cpp 2013-03-04 21:38:38 UTC (rev 144664)
+++ branches/chromium/1410/Source/WebCore/rendering/RenderBoxModelObject.cpp 2013-03-04 21:39:25 UTC (rev 144665)
@@ -711,7 +711,14 @@
if (hasRoundedBorder && bleedAvoidance != BackgroundBleedUseTransparencyLayer) {
RoundedRect border = backgroundRoundedRectAdjustedForBleedAvoidance(context, rect, bleedAvoidance, box, boxSize, includeLeftEdge, includeRightEdge);
- context->fillRoundedRect(border, bgColor, style()->colorSpace());
+ if (border.isRenderable())
+ context->fillRoundedRect(border, bgColor, style()->colorSpace());
+ else {
+ context->save();
+ clipRoundedInnerRect(context, rect, border);
+ context->fillRect(border.rect(), bgColor, style()->colorSpace());
+ context->restore();
+ }
} else
context->fillRect(pixelSnappedIntRect(rect), bgColor, style()->colorSpace());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes