-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=107568 Patch by Hans Muller <hmuller@adobe.com> on 2013-02-13 Reviewed by Dirk Schulze. Source/WebCore: The ExclusionPolygon::firstIncludedIntervalLogicalTop() method now includes offset edges for each of the polygon's reflex vertices. The motivation for this change is explained here: http://hansmuller-webkit.blogspot.com/2013/01/getting-to-point-reflex-vertices.html. Test: fast/exclusions/shape-inside/shape-inside-first-fit-reflex.html * rendering/ExclusionPolygon.cpp: (WebCore::isReflexVertex): Given three vertices that represent a pair of connected polygon edges, return true if the second vertex is a reflex vertex. (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This method now includes offset edges for reflex vertices. * rendering/ExclusionPolygon.h: (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Added a constructor for creating an OffsetPolygonEdge given a reflex vertex. (WebCore::OffsetPolygonEdge::edgeIndex): Changed this property from unsigned to int. Now using -1 to indicate that the offset edge doesn't correspond to a single polygon edge. LayoutTests: In this carefully contrived test case, the Y coordinate of the origin of the line of text is only computed correctly if the constraints implied by the polygon's reflex vertices are considered. * fast/exclusions/shape-inside/shape-inside-first-fit-reflex-expected.html: Added. * fast/exclusions/shape-inside/shape-inside-first-fit-reflex.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a465a237