X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Frendering%2Fshapes%2FPolygonShape.cpp;h=02e239a09e50e1222401fa9db359f1c4ed7fcfee;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=98cd8367e1ee50e4a5f00b800fadd90f177db035;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/rendering/shapes/PolygonShape.cpp b/src/third_party/WebKit/Source/core/rendering/shapes/PolygonShape.cpp index 98cd836..02e239a 100644 --- a/src/third_party/WebKit/Source/core/rendering/shapes/PolygonShape.cpp +++ b/src/third_party/WebKit/Source/core/rendering/shapes/PolygonShape.cpp @@ -33,7 +33,7 @@ #include "platform/geometry/LayoutPoint.h" #include "wtf/MathExtras.h" -namespace WebCore { +namespace blink { static inline FloatSize inwardEdgeNormal(const FloatPolygonEdge& edge) { @@ -120,17 +120,17 @@ LayoutRect PolygonShape::shapeMarginLogicalBoundingBox() const return LayoutRect(box); } -void PolygonShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const +LineSegment PolygonShape::getExcludedInterval(LayoutUnit logicalTop, LayoutUnit logicalHeight) const { float y1 = logicalTop.toFloat(); float y2 = logicalTop.toFloat() + logicalHeight.toFloat(); if (m_polygon.isEmpty() || !overlapsYRange(m_polygon.boundingBox(), y1 - shapeMargin(), y2 + shapeMargin())) - return; + return LineSegment(); Vector overlappingEdges; if (!m_polygon.overlappingEdges(y1 - shapeMargin(), y2 + shapeMargin(), overlappingEdges)) - return; + return LineSegment(); FloatShapeInterval excludedInterval; for (unsigned i = 0; i < overlappingEdges.size(); i++) { @@ -146,8 +146,10 @@ void PolygonShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logica } } - if (!excludedInterval.isEmpty()) - result.append(LineSegment(excludedInterval.x1(), excludedInterval.x2())); + if (excludedInterval.isEmpty()) + return LineSegment(); + + return LineSegment(excludedInterval.x1(), excludedInterval.x2()); } void PolygonShape::buildDisplayPaths(DisplayPaths& paths) const @@ -160,4 +162,4 @@ void PolygonShape::buildDisplayPaths(DisplayPaths& paths) const paths.shape.closeSubpath(); } -} // namespace WebCore +} // namespace blink