summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/ExclusionRectangle.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-25 13:02:02 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-25 13:02:02 +0200
commit715be629d51174233403237bfc563cf150087dc8 (patch)
tree4cff72df808db977624338b0a38d8b6d1bd73c57 /Source/WebCore/rendering/ExclusionRectangle.cpp
parentdc6262b587c71c14e30d93e57ed812e36a79a33e (diff)
downloadqtwebkit-715be629d51174233403237bfc563cf150087dc8.tar.gz
Imported WebKit commit ce614b0924ba46f78d4435e28ff93c8525fbb7cc (http://svn.webkit.org/repository/webkit/trunk@129485)
New snapshot that includes MingW build fixes
Diffstat (limited to 'Source/WebCore/rendering/ExclusionRectangle.cpp')
-rw-r--r--Source/WebCore/rendering/ExclusionRectangle.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/WebCore/rendering/ExclusionRectangle.cpp b/Source/WebCore/rendering/ExclusionRectangle.cpp
index 78f83b055..3bdde0aee 100644
--- a/Source/WebCore/rendering/ExclusionRectangle.cpp
+++ b/Source/WebCore/rendering/ExclusionRectangle.cpp
@@ -40,10 +40,10 @@ static inline float ellipseXIntercept(float y, float rx, float ry)
return rx * sqrt(1 - (y*y) / (ry*ry));
}
-void ExclusionRectangle::getOutsideIntervals(float y1, float y2, Vector<ExclusionInterval>& rv) const
+void ExclusionRectangle::getExcludedIntervals(float logicalTop, float logicalBottom, SegmentList& result) const
{
- if (y1 > y2)
- std::swap(y1, y2);
+ float y1 = minYForLogicalLine(logicalTop, logicalBottom);
+ float y2 = maxYForLogicalLine(logicalTop, logicalBottom);
if (y2 < m_y || y1 >= m_y + m_height)
return;
@@ -65,15 +65,15 @@ void ExclusionRectangle::getOutsideIntervals(float y1, float y2, Vector<Exclusio
}
}
- rv.append(ExclusionInterval(x1, x2));
+ result.append(LineSegment(x1, x2));
}
-void ExclusionRectangle::getInsideIntervals(float y1, float y2, Vector<ExclusionInterval>& rv) const
+void ExclusionRectangle::getIncludedIntervals(float logicalTop, float logicalBottom, SegmentList& result) const
{
- if (y1 > y2)
- std::swap(y1, y2);
+ float y1 = minYForLogicalLine(logicalTop, logicalBottom);
+ float y2 = maxYForLogicalLine(logicalTop, logicalBottom);
- if (y1 < m_y || y2 >= m_y + m_height)
+ if (y1 < m_y || y2 > m_y + m_height)
return;
float x1 = m_x;
@@ -106,7 +106,7 @@ void ExclusionRectangle::getInsideIntervals(float y1, float y2, Vector<Exclusion
}
}
- rv.append(ExclusionInterval(x1, x2));
+ result.append(LineSegment(x1, x2));
}
} // namespace WebCore