Bug 131622 - [CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line
Summary: [CSS Shapes] line height grows around polygon and incorrectly causes text to ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hans Muller
URL:
Keywords:
Depends on:
Blocks: 98664
  Show dependency treegraph
 
Reported: 2014-04-14 10:26 PDT by Rebecca Hauck
Modified: 2014-05-13 21:14 PDT (History)
5 users (show)

See Also:


Attachments
Test case for bug (2.05 KB, text/html)
2014-04-14 10:27 PDT, Rebecca Hauck
no flags Details
ref file for test (534 bytes, text/html)
2014-04-14 10:27 PDT, Rebecca Hauck
no flags Details
Diagram that illustrates the fix (81.86 KB, image/png)
2014-05-12 16:54 PDT, Hans Muller
no flags Details
Patch (4.90 KB, patch)
2014-05-13 09:24 PDT, Hans Muller
no flags Details | Formatted Diff | Diff
Patch (4.90 KB, patch)
2014-05-13 10:02 PDT, Hans Muller
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:
https://github.com/w3c/csswg-test/pull/505.

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

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]
Patch

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

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.