Bug 108107

Summary: [CSS Exclusions] polygon shape does not break content cleanly
Product: WebKit Reporter: Bear Travis <betravis>
Component: CSSAssignee: Hans Muller <giles_joplin>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: giles_joplin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 89256    
Attachments:
Description Flags
screenshot of bug
none
problematic file
none
Screenshot with reflex vertex fix and corrected coordinates. none

Description Bear Travis 2013-01-28 13:23:39 PST
This polygon shape does not lay out content cleanly.
The line breaks are odd and first fit seems to have pushed down content in the center.
Comment 1 Bear Travis 2013-01-28 13:24:24 PST
Created attachment 185045 [details]
screenshot of bug
Comment 2 Bear Travis 2013-01-28 13:24:46 PST
Created attachment 185046 [details]
problematic file
Comment 3 Hans Muller 2013-02-13 16:34:48 PST
Created attachment 188221 [details]
Screenshot with reflex vertex fix and corrected coordinates.

The specific problem you'd pointed out in the bug report no longer occurs with the reflex vertex fix (https://bugs.webkit.org/show_bug.cgi?id=107568) however the first line of text from your example still doesn't fit.  This isn't because of a problem with webkit, it's because the top and bottoms of the figure aren't really horizontal.  A straightened verison of the shape looks like this:

    -webkit-shape-inside: polygon(0% 18%, 14.726% 11.66%, 12.222% 4.588%, 0% 0%, 75.732% 0%, 63.411% 4.697%, 61.07% 11.612%, 75.732% 18%);

Fixing the coordinates here and the corresponding SVG polygon coordinates produces the expected layout.  See the attached screenshot.
Comment 4 Hans Muller 2013-02-13 16:35:37 PST

*** This bug has been marked as a duplicate of bug 107568 ***