There are three places in RenderBoxModelObject::paintBoxShadow() that use almost verbatim code to expand the border radii rects and clamp their dimensions to non-negative values. http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderBoxModelObject.cpp?rev=66170#L1641 http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderBoxModelObject.cpp?rev=66170#L1660 http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderBoxModelObject.cpp?rev=66170#L1737 We should extract the common code into a function, say uniformlyExpandBorderRadii, to remove duplication and shorten the function body of RenderBoxModelObject::paintBoxShadow(), which is long.
Created attachment 67860 [details] Patch I was not sure what to call the function or how best to incorporate the knowledge that we also clamp the rects to non-negative dimensions. Some name ideas were uniformlyExpandAndClampToNonNegativeDimensionsBorderRadii, uniformlyExpandAndClampNegativeToZeroBorderRadii, and uniformlyExpandBorderRadiiAndClampToNonNegativeDimensions. I felt these were a bit verbose and didn't read well so I went with uniformlyExpandBorderRadii. I am open to suggestions.
Comment on attachment 67860 [details] Patch Clearing flags on attachment: 67860 Committed r67921: <http://trac.webkit.org/changeset/67921>
All reviewed patches have been landed. Closing bug.