[CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line

Correct an earlier PolygonShape fix crbug.com/368686.
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.

This is a merge of http://trac.webkit.org/changeset/168778 by Hans Muller <hmuller@adobe.com>.
    
BUG=363230

Review URL: https://codereview.chromium.org/286813002

git-svn-id: svn://svn.chromium.org/blink/trunk@174333 bbb929c8-8fbe-4397-9dbb-9b2b20218538