WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 8736
webkit-border-radius does not show if radius is more than half the side length
https://bugs.webkit.org/show_bug.cgi?id=8736
Summary
webkit-border-radius does not show if radius is more than half the side length
Lewis Francis
Reported
2006-05-04 12:07:47 PDT
There seems to be some sort of relationship between font size and the webkit-border-radius property value for form fields. In the test case, having a smaller font size than the radius value prevents rounding of the field.
Attachments
Test case for bug #8736
(1009 bytes, text/html)
2006-05-04 12:08 PDT
,
Lewis Francis
no flags
Details
Patch, changelog, 2 new testcases
(26.82 KB, patch)
2009-05-16 20:38 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
New patch, changelog, testcases
(28.20 KB, patch)
2009-05-16 21:37 PDT
,
Simon Fraser (smfr)
oliver
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Lewis Francis
Comment 1
2006-05-04 12:08:52 PDT
Created
attachment 8108
[details]
Test case for
bug #8736
Nicholas Shanks
Comment 2
2006-06-04 09:27:43 PDT
If i'm not mistaken, this is because the second box is not tall enough to have 20px borders, so they get turned off. I think it's only indirectly related to the text size.
Joost de Valk (AlthA)
Comment 3
2006-07-06 05:46:48 PDT
Sent the following message to www-style, i propose waiting for an answer on it before we do anything with this bug: When an element has a border-radius that is more than half the the element's width or height, should it draw a border at all? F/I: <div style="height: 50px; width: 50px; border-radius: 30px; background-color: #0f0;"></div> In WebKit, this div will not be rounded, since it's height is to low to have a rounded with a radius of 30px. The spec, up till now, says nothing of how to behave in this situation. My suggestion would be to add: "If the border-radius is more than half of the width or height of an element, the border-radius is not drawn at all." I'd like to hear your opinion on this situation. For reference, this is
bug 8736
in WebKit's bugzilla. Kind regards, Joost
Lewis Francis
Comment 4
2006-07-06 06:25:22 PDT
We might also look towards how Firefox handles this; changing '-webkit' to '-moz' for either test case results in a rounded border; in the case of Joost's example, a circle.
Joost de Valk (AlthA)
Comment 5
2006-07-07 05:20:29 PDT
Discussion is going on on www-style about this, my guess is info on how to handle this will be added to the spec.
Alexey Proskuryakov
Comment 6
2007-07-02 05:24:07 PDT
www-style archive link: <
http://lists.w3.org/Archives/Public/www-style/2006Jul/0017.html
>.
Simon Fraser (smfr)
Comment 7
2009-05-15 11:58:16 PDT
The latest CSS3 draft says: "Corners do not overlap: When the sum of two adjacent corner radii exceeds the size of the border box, UAs must reduce one or more of the radii. The algorithm for reducing radii is as follows: The sum of two adjacent radii may not be more than the width or height (whichever is relevant) of the box. If any sum exceeds that value, all radii are reduced according to the following formula: Let f = min(Li/Si), where i ∈ {top, right, bottom, left}, Si is the sum of the radii of the corners on side i, and Ltop = Lbottom = the width of the box, and Lleft = Lright = the height of the box. If f < 1, then all corner radii are reduced by multiplying them by f."
http://www.w3.org/TR/css3-background/#the-border-radius
Simon Fraser (smfr)
Comment 8
2009-05-15 23:23:18 PDT
I'm working on this.
Simon Fraser (smfr)
Comment 9
2009-05-15 23:26:45 PDT
***
Bug 21332
has been marked as a duplicate of this bug. ***
Simon Fraser (smfr)
Comment 10
2009-05-16 20:38:27 PDT
Created
attachment 30419
[details]
Patch, changelog, 2 new testcases
Simon Fraser (smfr)
Comment 11
2009-05-16 20:43:15 PDT
Comment on
attachment 30419
[details]
Patch, changelog, 2 new testcases I think I got the algorithm wrong. Stand by.
Simon Fraser (smfr)
Comment 12
2009-05-16 21:37:16 PDT
Created
attachment 30420
[details]
New patch, changelog, testcases
Oliver Hunt
Comment 13
2009-05-19 23:21:24 PDT
Comment on
attachment 30420
[details]
New patch, changelog, testcases r=me
Brent Fulgham
Comment 14
2009-05-28 09:55:35 PDT
Committed in
r44235
.
Simon Fraser (smfr)
Comment 15
2009-05-28 10:47:15 PDT
Thanks Brent, and sorry I didn't commit this earlier.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug