From 1e656430158cb8223da7cf07314171a09ed47a9f Mon Sep 17 00:00:00 2001 From: bdash Date: Tue, 21 Nov 2006 12:08:13 +0000 Subject: [PATCH] 2006-11-21 Alex Taylor Reviewed by Mitz. Pixel tests for border radius rendering bug - http://bugs.webkit.org/show_bug.cgi?id=11587 * fast/borders/borderRadiusArcs01-expected.checksum: Added. * fast/borders/borderRadiusArcs01-expected.png: Added. * fast/borders/borderRadiusArcs01-expected.txt: Added. * fast/borders/borderRadiusArcs01.html: Added. 2006-11-21 Alex Taylor Reviewed by Mitz. Fixes: http://bugs.webkit.org/show_bug.cgi?id=11587 Adds calculations for bottom right radius's position which was being drawn incorrectly. * rendering/RenderObject.cpp: (WebCore::RenderObject::paintBorder): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17869 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 12 ++++++++++ .../borderRadiusArcs01-expected.checksum | 1 + .../borders/borderRadiusArcs01-expected.png | Bin 0 -> 6212 bytes .../borders/borderRadiusArcs01-expected.txt | 8 +++++++ .../fast/borders/borderRadiusArcs01.html | 22 ++++++++++++++++++ WebCore/ChangeLog | 12 ++++++++++ WebCore/rendering/RenderObject.cpp | 10 ++++---- 7 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 LayoutTests/fast/borders/borderRadiusArcs01-expected.checksum create mode 100644 LayoutTests/fast/borders/borderRadiusArcs01-expected.png create mode 100644 LayoutTests/fast/borders/borderRadiusArcs01-expected.txt create mode 100644 LayoutTests/fast/borders/borderRadiusArcs01.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 6e930846f74f..eb0c271d91b3 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,15 @@ +2006-11-21 Alex Taylor + + Reviewed by Mitz. + + Pixel tests for border radius rendering bug + - http://bugs.webkit.org/show_bug.cgi?id=11587 + + * fast/borders/borderRadiusArcs01-expected.checksum: Added. + * fast/borders/borderRadiusArcs01-expected.png: Added. + * fast/borders/borderRadiusArcs01-expected.txt: Added. + * fast/borders/borderRadiusArcs01.html: Added. + 2006-11-20 W. Andy Carrel Reviewed by Maciej. diff --git a/LayoutTests/fast/borders/borderRadiusArcs01-expected.checksum b/LayoutTests/fast/borders/borderRadiusArcs01-expected.checksum new file mode 100644 index 000000000000..8b8c6888631d --- /dev/null +++ b/LayoutTests/fast/borders/borderRadiusArcs01-expected.checksum @@ -0,0 +1 @@ +170d090756e82d3db2711846fe9cc93c \ No newline at end of file diff --git a/LayoutTests/fast/borders/borderRadiusArcs01-expected.png b/LayoutTests/fast/borders/borderRadiusArcs01-expected.png new file mode 100644 index 0000000000000000000000000000000000000000..d452e4155cfb14bb15fb27765df71908bdde80f0 GIT binary patch literal 6212 zcmeHLSy)q9w%!3W$XJ%jpn%v=1Y04DGLtxznns|iR0Nr{7?n975FikwgjSGH2?d4# zf;Ld4Aj%K~AqZ6hk%UpfgsIdp2}ytiLJW{TR^PAhOW%6whx_7rI^Wvs?6cOt*Ixg> z_swtIPN^#GRRRF0Vosm<4gh(50OULsw?meq`0LRCXenb(96gs<%$vaFOb_8OJD>Z@xpR&$ z-*%_-(uQU6Wz3#B;*q-X!z<{-a zV(YC^N0NMOkn@i?yT8K!(QP9KE}c_Qv}(8#$()+$D5eBh9wc`q=>S3uhVb0Xm8mPa zlv>h1V_O&k11e;YzOyKw8tbOlpN##@lPCwwA{D>Ts_+%Ee16QR517eWH3mSpKN)=~ zpU=dw4>EAg-&dc4fw{y!0$RDvdUkfGIG--M{f8TdfX-(1R7fH;f**$4job$yu2^IH z-_KokoO7v@WTPy}i!1N?Hw@uMlyQ-k?hEmu}nILTf&~gK$%Z3XBkCNV#ithw| zG){Qt)Z~mZPd+n#e_K5a#KB>5$gpE119FNZqjM+EY+#r?rYQ=dE(rP-U1w-mTPVZc zvyXods&U2QNEu|Ed~VTYU8ey{Ev|I@)!k>rF$1D{b@*}$0Pmr+5BL^x2UPqD8pC^D zFT4+E`!)5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borders/borderRadiusArcs01-expected.txt b/LayoutTests/fast/borders/borderRadiusArcs01-expected.txt new file mode 100644 index 000000000000..f79f3a127350 --- /dev/null +++ b/LayoutTests/fast/borders/borderRadiusArcs01-expected.txt @@ -0,0 +1,8 @@ +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 + RenderBlock {DIV} at (0,0) size 220x220 [bgcolor=#00FF00] [border: (10px solid #00FFFF) (10px solid #FF0000) (10px solid #0000FF) (10px solid #00FFFF)] + RenderText {#text} at (10,10) size 4x18 + text run at (10,10) width 4: " " diff --git a/LayoutTests/fast/borders/borderRadiusArcs01.html b/LayoutTests/fast/borders/borderRadiusArcs01.html new file mode 100644 index 000000000000..512b10dd39bf --- /dev/null +++ b/LayoutTests/fast/borders/borderRadiusArcs01.html @@ -0,0 +1,22 @@ + + + + + +
+   +
+ + diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index af45a4c9726a..16300ab9b50b 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,15 @@ +2006-11-21 Alex Taylor + + Reviewed by Mitz. + + Fixes: http://bugs.webkit.org/show_bug.cgi?id=11587 + + Adds calculations for bottom right radius's position + which was being drawn incorrectly. + + * rendering/RenderObject.cpp: + (WebCore::RenderObject::paintBorder): + 2006-11-20 Rob Buis Reviewed by Maciej. diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp index b8f6eb939587..35cfb8a406f9 100644 --- a/WebCore/rendering/RenderObject.cpp +++ b/WebCore/rendering/RenderObject.cpp @@ -1395,6 +1395,7 @@ void RenderObject::paintBorder(GraphicsContext* graphicsContext, int tx, int ty, if (renderRadii) { int leftX = tx; int leftY = ty + h - bottomLeft.height() * 2; + int rightY = ty + h - bottomRight.height() * 2; int rightX = tx + w - bottomRight.width() * 2; secondAngleStart = 270; secondAngleSpan = upperRightBorderStylesMatch ? 90 : 45; @@ -1428,12 +1429,12 @@ void RenderObject::paintBorder(GraphicsContext* graphicsContext, int tx, int ty, && (bs != DOUBLE || style->borderBottomWidth() > 6); if (applyRightInnerClip) { graphicsContext->save(); - graphicsContext->addInnerRoundedRectClip(IntRect(rightX, leftY, bottomRight.width() * 2, bottomRight.height() * 2), + graphicsContext->addInnerRoundedRectClip(IntRect(rightX, rightY, bottomRight.width() * 2, bottomRight.height() * 2), style->borderBottomWidth()); } // Draw lower right arc - drawBorderArc(graphicsContext, rightX, leftY, thickness, bottomRight, secondAngleStart, secondAngleSpan, + drawBorderArc(graphicsContext, rightX, rightY, thickness, bottomRight, secondAngleStart, secondAngleSpan, BSBottom, bc, style->color(), bs, false); if (applyRightInnerClip) graphicsContext->restore(); @@ -1524,6 +1525,7 @@ void RenderObject::paintBorder(GraphicsContext* graphicsContext, int tx, int ty, if (renderRadii && (!upperRightBorderStylesMatch || !lowerRightBorderStylesMatch)) { int topX = tx + w - topRight.width() * 2; int topY = ty; + int bottomX = tx + w - bottomRight.width() * 2; int bottomY = ty + h - bottomRight.height() * 2; firstAngleStart = 0; secondAngleStart = 315; @@ -1550,12 +1552,12 @@ void RenderObject::paintBorder(GraphicsContext* graphicsContext, int tx, int ty, && (rs != DOUBLE || style->borderRightWidth() > 6); if (applyBottomInnerClip) { graphicsContext->save(); - graphicsContext->addInnerRoundedRectClip(IntRect(topX, bottomY, bottomRight.width() * 2, bottomRight.height() * 2), + graphicsContext->addInnerRoundedRectClip(IntRect(bottomX, bottomY, bottomRight.width() * 2, bottomRight.height() * 2), style->borderRightWidth()); } // Draw bottom right arc - drawBorderArc(graphicsContext, topX, bottomY, thickness, bottomRight, secondAngleStart, secondAngleSpan, + drawBorderArc(graphicsContext, bottomX, bottomY, thickness, bottomRight, secondAngleStart, secondAngleSpan, BSRight, rc, style->color(), rs, false); if (applyBottomInnerClip) graphicsContext->restore(); -- 2.36.0