Created attachment 215972 [details]
If shape-margin is specified it can cause the shape to extend outside the content-box on all four sides. Currently, the part of the shape-margin boundary that extends above the content-box is clipped.
The attached test case demonstrates this. The layout of the lines of text above the rectangle should mirror the layout of the lines below the rectangle.
Note also: despite the apparent similarities, this bug doesn't haven anything to do with the patch for https://bugs.webkit.org/show_bug.cgi?id=123743.
Created attachment 216315 [details]
Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals() method now generates intervals with Y coordinates that begin at the image shape's bounds.y - shape-margin, which may be less than 0.
The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter by the shape-margin. A non-const overload of the method was added to centralize all access to m_intervalLists.
Comment on attachment 216315 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=216315&action=review
r=me Looks like the patch does not apply anymore though.
> + font: 25px/1 Ahem, sans-serif;
Snippet , but it looks weird to have 25px/1, could you add spaces please? :) Ditto for the others.
Created attachment 216452 [details]
Made the requested changes.
Comment on attachment 216452 [details]
Clearing flags on attachment: 216452
Committed r158967: <http://trac.webkit.org/changeset/158967>
All reviewed patches have been landed. Closing bug.