-
hmuller@adobe.com authored
https://bugs.webkit.org/show_bug.cgi?id=113726 Reviewed by Dirk Schulze. Source/WebCore: Add support for computing the shape-outside shape-margin boundary for a polygon. This change is similar to the one added for padding polygons, see bug 112592. The algorithm used for computing the margin boundary is is provisional. It works correctly for convex polygons and will work correctly for non self-intersecting polygons whose margin boundary is the same shape as the original polygon. Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-diamond-margin-polygon.html fast/exclusions/shape-outside-floats/shape-outside-floats-left-margin-polygon.html fast/exclusions/shape-outside-floats/shape-outside-floats-right-margin-polygon.html * rendering/ExclusionPolygon.cpp: (WebCore::appendArc): Generalized this method a little, to deal with margin and padding connecting arcs. (WebCore::computeShapePaddingBounds): Pass the new appendArc() parameter. (WebCore::computeShapeMarginBounds): Compute the margin boundary for a polygon, per the constraints summarized above. (WebCore::ExclusionPolygon::getExcludedIntervals): Use the margin polygon for this computation. LayoutTests: Verify that shape-outside layout works correctly on floats, when shape-margin is specifed. * fast/exclusions/shape-outside-floats/shape-outside-floats-diamond-margin-polygon-expected.txt: Added. * fast/exclusions/shape-outside-floats/shape-outside-floats-diamond-margin-polygon.html: Added. * fast/exclusions/shape-outside-floats/shape-outside-floats-left-margin-polygon-expected.html: Added. * fast/exclusions/shape-outside-floats/shape-outside-floats-left-margin-polygon.html: Added. * fast/exclusions/shape-outside-floats/shape-outside-floats-right-margin-polygon-expected.html: Added. * fast/exclusions/shape-outside-floats/shape-outside-floats-right-margin-polygon.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2a8e9f3b