Bug 100039

Summary: [CSS Exclusions] Multiple segment polygon layout does not get all segments
Product: WebKit Reporter: Bear Travis <betravis>
Component: CSSAssignee: Hans Muller <giles_joplin>
Status: RESOLVED FIXED    
Severity: Normal CC: donggwan.kim, eric, giles_joplin, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 89256, 91878, 100763    
Attachments:
Description Flags
Test case
none
Patch
none
Patch
none
Patch
none
Patch none

Bear Travis
Reported 2012-10-22 15:36:54 PDT
In this test case the layout code is only seeing the rightmost leg of a "U" shape when layout begins.
Attachments
Test case (409 bytes, text/html)
2012-10-22 15:37 PDT, Bear Travis
no flags
Patch (24.41 KB, patch)
2012-10-29 10:02 PDT, Hans Muller
no flags
Patch (24.32 KB, patch)
2012-10-29 10:20 PDT, Hans Muller
no flags
Patch (24.30 KB, patch)
2012-10-30 09:28 PDT, Hans Muller
no flags
Patch (24.35 KB, patch)
2012-10-30 16:40 PDT, Hans Muller
no flags
Bear Travis
Comment 1 2012-10-22 15:37:46 PDT
Created attachment 170002 [details] Test case text layout should begin in the left leg of the 'U'
Hans Muller
Comment 2 2012-10-29 10:02:45 PDT
Created attachment 171271 [details] Patch This patch includes versions of the test case that can be verified with the existing layout support for shape-inside.
WebKit Review Bot
Comment 3 2012-10-29 10:06:12 PDT
Attachment 171271 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1 Source/WebCore/rendering/ExclusionPolygon.cpp:116: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3] Source/WebCore/rendering/ExclusionPolygon.cpp:121: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4] Source/WebCore/rendering/ExclusionPolygon.cpp:127: An else should appear on the same line as the preceding } [whitespace/newline] [4] Total errors found: 3 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Hans Muller
Comment 4 2012-10-29 10:20:51 PDT
Created attachment 171277 [details] Patch Corrected check-webkit-style problems.
Dirk Schulze
Comment 5 2012-10-29 23:14:08 PDT
Comment on attachment 171277 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=171277&action=review The patch looks great. Still have some questions. > Source/WebCore/rendering/ExclusionPolygon.cpp:112 > +static bool getVertexIntersectionVertices(const EdgeIntersection& intersection, FloatPoint& prevVertex, FloatPoint& thisVertex, FloatPoint& nextVertex) Can this be inline? > Source/WebCore/rendering/ExclusionPolygon.cpp:119 > + const ExclusionPolygon& polygon = *(intersection.edge->polygon); > + const ExclusionPolygonEdge& thisEdge = *(intersection.edge); I am not sure how EdgeIntersection is implemented. Do we want it to be RefCounted?
Hans Muller
Comment 6 2012-10-30 09:05:06 PDT
(In reply to comment #5) > (From update of attachment 171277 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=171277&action=review > > The patch looks great. Still have some questions. > > > Source/WebCore/rendering/ExclusionPolygon.cpp:112 > > +static bool getVertexIntersectionVertices(const EdgeIntersection& intersection, FloatPoint& prevVertex, FloatPoint& thisVertex, FloatPoint& nextVertex) > > Can this be inline? Yes, given how it's used it should be inline. > > > Source/WebCore/rendering/ExclusionPolygon.cpp:119 > > + const ExclusionPolygon& polygon = *(intersection.edge->polygon); > > + const ExclusionPolygonEdge& thisEdge = *(intersection.edge); > > I am not sure how EdgeIntersection is implemented. Do we want it to be RefCounted? The lifetime of the EdgeIntersections that are being referred to here are defined by the caller, ExclusionPolygon::computeXIntersections(). In general, the EdgeIntersection objects do not persist longer than the main ExclusionShape entry point methods, getIncluded,ExcludedIntervals() and they are strictly private to the ExclusionPolygon implementation. I don't think they need to be ref-counted.
Hans Muller
Comment 7 2012-10-30 09:28:30 PDT
Created attachment 171470 [details] Patch Made getVertexIntersectionVertices() inline.
Hans Muller
Comment 8 2012-10-30 16:40:29 PDT
Created attachment 171546 [details] Patch Renamed ExclusionPolygonEdge fields: vertex1Index => vertexIndex1, vertex2Index => vertexIndex2
Dirk Schulze
Comment 9 2012-10-30 16:44:46 PDT
Comment on attachment 171546 [details] Patch LGTM. r=me.
WebKit Review Bot
Comment 10 2012-10-30 18:38:11 PDT
Comment on attachment 171546 [details] Patch Clearing flags on attachment: 171546 Committed r132971: <http://trac.webkit.org/changeset/132971>
WebKit Review Bot
Comment 11 2012-10-30 18:38:15 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.