<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div><br></div><div>Yesterday I committed a <a href="http://trac.webkit.org/changeset/62035">patch</a> re-writing the way WebKit paints border-radius and fixed a bunch of bugs along the way. The new border-radius-painting mechanism involves a new function: GraphicsContext::clipConvexPolygon(). I have implemented this in GraphicsContextCG, but I did not implement it for other platforms since I don't have graphics expertise in the other APIs and since I don't have configurations to test all of the platforms. </div><div><br></div><div>To avoid breaking other implementations of border-radius in the meantime, I left the old border-radius-painting code path in the tree for the time being, wrapped with an ifdef. This is temporary though. We want to remove the old code path to avoid maintaining cruft. I would like to STRONGLY encourage other platforms to implement GraphicsContext::clipConvexPolygon() soon.</div><div><br></div><div>This is all you have to do to fix LOTS of border-radius bugs for your graphics platform of choice:</div><div>1. Implement GraphicsContext::clipConvexPolygon(). I suspect this will not be very hard. All platforms have an implementation of GraphicsContext::drawConvexPolygon() already, and hopefully the clipping function will be similar.</div><div>2. Fix <span class="Apple-style-span" style="color: rgb(126, 70, 35); font-family: Menlo; font-size: 11px; ">#define HAVE_PATH_BASED_BORDER_RADIUS_DRAWING</span> in RenderObject.h so that your platform opts into the new code path.</div><div>3. Profit.</div><div><br></div><div><a href="https://bug-41303-attachments.webkit.org/attachment.cgi?id=59939">Here is a test-case</a> that really illuminates all of the bugs we had in WebKit that will be fixed when you do this. (Move the sliders around and pretend they are labeled.)</div><div><br></div><div>Here are the bugs that I filed to track this issue on various platforms:</div><div><a href="https://bugs.webkit.org/show_bug.cgi?id=41308">Cairo</a></div><div><a href="https://bugs.webkit.org/show_bug.cgi?id=41309">Haiku</a></div><div><a href="https://bugs.webkit.org/show_bug.cgi?id=41310">QT</a></div><div><a href="https://bugs.webkit.org/show_bug.cgi?id=41311">Skia</a></div><div><a href="https://bugs.webkit.org/show_bug.cgi?id=41312">Wince</a></div><div><a href="https://bugs.webkit.org/show_bug.cgi?id=41313">Wx</a></div><div><br></div><div>Thanks everyone!</div><div>-Beth</div></body></html>