Bug 11587 - -webkit-border-bottom-right-radius is drawn at the wrong Y value
Summary: -webkit-border-bottom-right-radius is drawn at the wrong Y value
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 11113 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-13 04:38 PST by Alex Taylor
Modified: 2006-11-22 00:58 PST (History)
1 user (show)

See Also:


Attachments
Testcase (878 bytes, text/html)
2006-11-13 04:52 PST, Alex Taylor
no flags Details
First look patch (no tests yet) (3.02 KB, patch)
2006-11-13 04:58 PST, Alex Taylor
mitz: review-
Details | Formatted Diff | Diff
Patch with Layout Test and Expected results +pixel results (14.77 KB, patch)
2006-11-19 16:02 PST, Alex Taylor
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Taylor 2006-11-13 04:38:32 PST
The current code assumes the the bottom left and bottom right border radius arcs start at the same Y coordinate. When the bottom left and bottom right radii are different, this is not the case.

This is one of two outstanding -webkit-border-bottom-right-radius rendering bugs the other is bug 11113.
Comment 1 Alex Taylor 2006-11-13 04:52:21 PST
Created attachment 11501 [details]
Testcase

Testcase showing incorrect drawing of bottom right corner when the bottom left is a different radius.

Looking at the source code, this is also a problem when rendering the right hand side but bug 11113 shows itself and I can't test it. (second box in the test case)
Comment 2 Alex Taylor 2006-11-13 04:58:44 PST
Created attachment 11502 [details]
First look patch (no tests yet)

No layout tests or ChangeLog added yet, just putting this patch up first.
Simple patch, that adds calculation of the respective X and Y coordinates for the arcs in both the "drawBottom" and "drawRight" cases.
Comment 3 Alex Taylor 2006-11-13 16:42:04 PST
Comment on attachment 11502 [details]
First look patch (no tests yet)

The small change in the above patch also seems to fix http://bugs.webkit.org/show_bug.cgi?id=11113.
What tests need to be written for this?
Comment 4 mitz 2006-11-18 00:53:13 PST
Comment on attachment 11502 [details]
First look patch (no tests yet)

Looks good! Your test should a box whose bottom-left, bottom-right and top-right are distinct. In order to test the second change, the bottom border and the right border should not match (e.g. have different color). You can use LayoutTests/fast/borders/borderRadiusSolid01.html as a starting point. After you make the test, you need to generate expected results. The run-webkit-tests script does that by default for tests that don't have expected results, so you just need to run it on your test. Make sure to use the --pixel option in order to have pixel results generated. Once you have the test and the expected results in your tree, use "svn add" to add them to your working copy, then use the prepare-ChangeLog script to add ChangeLog entries (one in WebCore/ChangeLog and another one in LayoutTest/ChangeLog). Edit the ChangeLogs and generate a new patch.
Comment 5 Alex Taylor 2006-11-19 16:02:07 PST
Created attachment 11577 [details]
Patch with Layout Test and Expected results +pixel results

Added a Layout Test with expected results and pixel test results
Comment 6 mitz 2006-11-19 22:45:34 PST
Comment on attachment 11577 [details]
Patch with Layout Test and Expected results +pixel results

r=me
Comment 7 Mark Rowe (bdash) 2006-11-21 04:19:25 PST
Landed in r17869.  Alex, just a note:  your layout test was indented using tabs rather than spaces.  Can you be sure to use spaces in future?
Comment 8 mitz 2006-11-21 13:19:14 PST
*** Bug 11113 has been marked as a duplicate of this bug. ***
Comment 9 Joost de Valk (AlthA) 2006-11-22 00:58:25 PST
Cool, nice to see this one fixed!