Bug 130975 - [CSS Shapes] Simplify Polygon implementation
Summary: [CSS Shapes] Simplify Polygon implementation
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hans Muller
Depends on: 130740
Blocks: 98664 112917
  Show dependency treegraph
Reported: 2014-03-31 11:39 PDT by Hans Muller
Modified: 2014-04-04 10:35 PDT (History)
7 users (show)

See Also:

Patch (27.29 KB, patch)
2014-04-02 17:05 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 Hans Muller 2014-03-31 11:39:48 PDT
This change is similar to https://bugs.webkit.org/show_bug.cgi?id=130916

The final CSS Shapes level 1 spec (http://dev.w3.org/csswg/css-shapes-1/) does not include shape-inside only allows shape-outside to be specified on floats.  In light of this, the PolygonShape class can be substantially simplified.

The support for shape-inside has already been removed, see https://bugs.webkit.org/show_bug.cgi?id=130740

A detailed look at the PolygonShape simplification can be found here: http://hansmuller-webkit.blogspot.com/2014/03/a-simpler-algorithm-for-css-shapes.html
Comment 1 Hans Muller 2014-04-02 17:05:46 PDT
Created attachment 228447 [details]

Only floats can specify shape-outside. For polygon shape values, the problem of finding the left and right exclusion edges reduces to finding the X axis limits of the polygon edges that overlap a particular line. This is a much simpler version of the problem that PolygonShape was designed for, and so the implementation can also be simplified. There's more about the new algorithm in http://hansmuller-webkit.blogspot.com/2014/03/a-simpler-algorithm-for-css-shapes.html.
Comment 2 Andreas Kling 2014-04-04 10:13:33 PDT
Comment on attachment 228447 [details]

Comment 3 WebKit Commit Bot 2014-04-04 10:35:47 PDT
Comment on attachment 228447 [details]

Clearing flags on attachment: 228447

Committed r166790: <http://trac.webkit.org/changeset/166790>
Comment 4 WebKit Commit Bot 2014-04-04 10:35:51 PDT
All reviewed patches have been landed.  Closing bug.