The attached test has a simply polygon and the line-height an font size set to 20px. On the fourth line, the line-height becomes more than 20px as shown by the thin red line. The fifth line then incorrectly wraps to the next line. This test is just one of a set, all of which show this problem: https://github.com/w3c/csswg-test/pull/505. The last WK nightly build where these tests passed was r166798.
Created attachment 229289 [details] Test case for bug
Created attachment 229290 [details] ref file for test
Created attachment 231342 [details] Diagram that illustrates the fix This bug is similar to "[CSS Shapes] shape-outside polygon can fail when line-top intersects a vertex" - https://bugs.webkit.org/show_bug.cgi?id=132132 The fix for 132132 only addressed right floats (oops). The new patch will handle both types of floats.
Created attachment 231387 [details] Patch Corrected an earlier PolygonShape fix https://bugs.webkit.org/show_bug.cgi?id=131622. When the top or bottom of a layout line is coincident with a polygon edge vertex, we only consider it an intersection if the edge extends into the line.
Created attachment 231389 [details] Patch Corrected the link to https://bugs.webkit.org/show_bug.cgi?id=132132
Comment on attachment 231389 [details] Patch r=me
Comment on attachment 231389 [details] Patch Clearing flags on attachment: 231389 Committed r168778: <http://trac.webkit.org/changeset/168778>
All reviewed patches have been landed. Closing bug.