Changeset 148582 in webkit
- Timestamp:
- Apr 16, 2013 5:09:49 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r148581 r148582 1 2013-04-16 Hans Muller <hmuller@adobe.com> 2 3 [CSS Exclusions] polygon shape-inside layout fails 4 https://bugs.webkit.org/show_bug.cgi?id=114402 5 6 Verify that subsequent polygon shape-inside lines are vertically adjacent. 7 8 Reviewed by Dirk Schulze. 9 10 * fast/exclusions/shape-inside/shape-inside-polygon-layout-expected.txt: Added. 11 * fast/exclusions/shape-inside/shape-inside-polygon-layout.html: Added. 12 1 13 2013-04-16 Michelangelo De Simone <michelangelo@webkit.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r148579 r148582 1 2013-04-16 Hans Muller <hmuller@adobe.com> 2 3 [CSS Exclusions] polygon shape-inside layout fails 4 https://bugs.webkit.org/show_bug.cgi?id=114402 5 6 Reviewed by Dirk Schulze. 7 8 The firstIncludedIntervalLogicalTop() method's implementation relied on optimistic 9 assumptions about floating point accuracy which, in rare cases, caused it to discard 10 first-fit locations based on the intersection of the minLogicalIntervalTop offset edge 11 and a polygon offset edge. Now: we do not verify that first-fit locations based on the 12 intersection of an offset edge and the minLogicalIntervalTop offset edge are below 13 the horizontal minLogicalIntervalTop line. They're essentially below the line "by definition". 14 15 Test: fast/exclusions/shape-inside/shape-inside-polygon-layout.html 16 17 * rendering/ExclusionPolygon.cpp: 18 (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Avoid floating point problems 19 when checking intersections with the offset edge based on minLogicalIntervalTop. 20 * rendering/ExclusionPolygon.h: 21 (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Initialize the basis field. 22 (WebCore::OffsetPolygonEdge::basis): Report what the offset edge is "based on": a polygon 23 edge, the top of the line, or a (reflex) vertex. 24 (OffsetPolygonEdge): Added the Basis enum to enable tracking what the geometry of 25 an offset edge is based on. 26 1 27 2013-04-16 Jer Noble <jer.noble@apple.com> 2 28 -
trunk/Source/WebCore/rendering/ExclusionPolygon.cpp
r148139 r148582 488 488 FloatPoint potentialFirstFitLocation(offsetEdgesIntersection.x() - dx, offsetEdgesIntersection.y() - dy); 489 489 FloatRect potentialFirstFitRect(potentialFirstFitLocation, minLogicalIntervalSize); 490 if ((potentialFirstFitLocation.y() >= minLogicalIntervalTop) 490 if ((offsetEdges[i].basis() == OffsetPolygonEdge::LineTop 491 || offsetEdges[j].basis() == OffsetPolygonEdge::LineTop 492 || potentialFirstFitLocation.y() >= minLogicalIntervalTop) 491 493 && (!firstFitFound || aboveOrToTheLeft(potentialFirstFitRect, firstFitRect)) 492 494 && polygon.contains(offsetEdgesIntersection) -
trunk/Source/WebCore/rendering/ExclusionPolygon.h
r147384 r148582 39 39 class OffsetPolygonEdge : public VertexPair { 40 40 public: 41 enum Basis { 42 Edge, 43 Vertex, 44 LineTop 45 }; 46 41 47 OffsetPolygonEdge(const FloatPolygonEdge& edge, const FloatSize& offset) 42 48 : m_vertex1(edge.vertex1() + offset) 43 49 , m_vertex2(edge.vertex2() + offset) 44 50 , m_edgeIndex(edge.edgeIndex()) 51 , m_basis(Edge) 45 52 { 46 53 } … … 50 57 , m_vertex2(reflexVertex + offset2) 51 58 , m_edgeIndex(-1) 59 , m_basis(Vertex) 52 60 { 53 61 } … … 57 65 , m_vertex2(FloatPoint(polygon.boundingBox().maxX(), minLogicalIntervalTop) + offset) 58 66 , m_edgeIndex(-1) 67 , m_basis(LineTop) 59 68 { 60 69 } … … 63 72 virtual const FloatPoint& vertex2() const OVERRIDE { return m_vertex2; } 64 73 int edgeIndex() const { return m_edgeIndex; } 74 Basis basis() const { return m_basis; } 65 75 66 76 private: … … 68 78 FloatPoint m_vertex2; 69 79 int m_edgeIndex; 80 Basis m_basis; 70 81 }; 71 82
Note: See TracChangeset
for help on using the changeset viewer.