Bug 131622

Summary: [CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line
Product: WebKit Reporter: Rebecca Hauck <rhauck>
Component: CSSAssignee: Hans Muller <giles_joplin>
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, zoltan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 98664    
Description Flags
Test case for bug
ref file for test
Diagram that illustrates the fix
Patch none

Description Rebecca Hauck 2014-04-14 10:26:33 PDT
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:

The last WK nightly build where these tests passed was r166798.
Comment 1 Rebecca Hauck 2014-04-14 10:27:24 PDT
Created attachment 229289 [details]
Test case for bug
Comment 2 Rebecca Hauck 2014-04-14 10:27:39 PDT
Created attachment 229290 [details]
ref file for test
Comment 3 Hans Muller 2014-05-12 16:54:20 PDT
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.
Comment 4 Hans Muller 2014-05-13 09:24:39 PDT
Created attachment 231387 [details]

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.
Comment 5 Hans Muller 2014-05-13 10:02:25 PDT
Created attachment 231389 [details]

Corrected the link to https://bugs.webkit.org/show_bug.cgi?id=132132
Comment 6 Bem Jones-Bey 2014-05-13 19:28:44 PDT
Comment on attachment 231389 [details]

Comment 7 WebKit Commit Bot 2014-05-13 21:14:18 PDT
Comment on attachment 231389 [details]

Clearing flags on attachment: 231389

Committed r168778: <http://trac.webkit.org/changeset/168778>
Comment 8 WebKit Commit Bot 2014-05-13 21:14:21 PDT
All reviewed patches have been landed.  Closing bug.