Use -webkit-clip-path shapes to clip SVG elements.
Created attachment 161802 [details] Patch
This is actually not for review. I just want to see if it builds everywhere.
Created attachment 161812 [details] Patch
Comment on attachment 161812 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=161812&action=review Looks good. > Source/WebCore/rendering/style/BasicShapes.cpp:47 > + m_cornerRadiusY.isUndefined() ? 0 : floatValueForLength(m_cornerRadiusY, boundingBox.height()))); Seems like indenting is not quite right? > Source/WebCore/rendering/svg/SVGRenderingContext.cpp:152 > + if (clipper && !style->clipPath()) { Why not do !style->clipPath() test first? Only if true you'd need to get clipper. You could also reuse the clipShape variable from above. > LayoutTests/svg/clip-path/clip-path-shape-circle-1-expected.svg:1 > +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> Is the xlink stuff needed in any of these tests? > LayoutTests/svg/clip-path/clip-path-shape-ellipse-2.svg:2 > +<rect width="200" height="200" fill="green" style="-webkit-clip-path: ellipse(100px, 75px, 100px, 75px)"/> Should height be 150 here?
Committed r127383: <http://trac.webkit.org/changeset/127383>
Fixed all suggested changes before landing, but not the change on the value for the ellipse. It is rx,ry and not with and height. (just for the logs)