Summary: | [CSS Exclusions] Multiple segment polygon layout does not get all segments | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Bear Travis <betravis> | ||||||||||||
Component: | CSS | Assignee: | 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
Bear Travis
2012-10-22 15:36:54 PDT
Created attachment 170002 [details]
Test case
text layout should begin in the left leg of the 'U'
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.
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.
Created attachment 171277 [details]
Patch
Corrected check-webkit-style problems.
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? (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. Created attachment 171470 [details]
Patch
Made getVertexIntersectionVertices() inline.
Created attachment 171546 [details]
Patch
Renamed ExclusionPolygonEdge fields: vertex1Index => vertexIndex1, vertex2Index => vertexIndex2
Comment on attachment 171546 [details]
Patch
LGTM. r=me.
Comment on attachment 171546 [details] Patch Clearing flags on attachment: 171546 Committed r132971: <http://trac.webkit.org/changeset/132971> All reviewed patches have been landed. Closing bug. |