Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1226)

Unified Diff: Source/core/rendering/shapes/BoxShape.cpp

Issue 216793009: Remove shape-padding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove m_padding Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/shapes/BoxShape.h ('k') | Source/core/rendering/shapes/BoxShapeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/BoxShape.cpp
diff --git a/Source/core/rendering/shapes/BoxShape.cpp b/Source/core/rendering/shapes/BoxShape.cpp
index 5211a5756a087d01652244078369563102db2069..3c1e094d665e123dd1eb9fd8472dedb893e372c2 100644
--- a/Source/core/rendering/shapes/BoxShape.cpp
+++ b/Source/core/rendering/shapes/BoxShape.cpp
@@ -42,14 +42,6 @@ LayoutRect BoxShape::shapeMarginLogicalBoundingBox() const
return static_cast<LayoutRect>(marginBounds);
}
-LayoutRect BoxShape::shapePaddingLogicalBoundingBox() const
-{
- FloatRect paddingBounds(m_bounds.rect());
- if (shapePadding() > 0)
- paddingBounds.inflate(-shapePadding());
- return static_cast<LayoutRect>(paddingBounds);
-}
-
FloatRoundedRect BoxShape::shapeMarginBounds() const
{
FloatRoundedRect marginBounds(m_bounds);
@@ -60,16 +52,6 @@ FloatRoundedRect BoxShape::shapeMarginBounds() const
return marginBounds;
}
-FloatRoundedRect BoxShape::shapePaddingBounds() const
-{
- FloatRoundedRect paddingBounds(m_bounds);
- if (shapePadding() > 0) {
- paddingBounds.inflate(-shapePadding());
- paddingBounds.expandRadii(-shapePadding());
- }
- return paddingBounds;
-}
-
void BoxShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
{
const FloatRoundedRect& marginBounds = shapeMarginBounds();
@@ -112,48 +94,4 @@ void BoxShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHei
result.append(LineSegment(x1, x2));
}
-void BoxShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHeight, SegmentList& result) const
-{
- const FloatRoundedRect& paddingBounds = shapePaddingBounds();
- if (paddingBounds.isEmpty())
- return;
-
- float y1 = logicalTop.toFloat();
- float y2 = (logicalTop + logicalHeight).toFloat();
- const FloatRect& rect = paddingBounds.rect();
-
- if (y1 < rect.y() || y2 > rect.maxY())
- return;
-
- if (!paddingBounds.isRounded()) {
- result.append(LineSegment(rect.x(), rect.maxX()));
- return;
- }
-
- float x1 = rect.x();
- float x2 = rect.maxX();
- float minXIntercept;
- float maxXIntercept;
-
- if (paddingBounds.xInterceptsAtY(y1, minXIntercept, maxXIntercept)) {
- x1 = std::max<float>(x1, minXIntercept);
- x2 = std::min<float>(x2, maxXIntercept);
- }
-
- if (paddingBounds.xInterceptsAtY(y2, minXIntercept, maxXIntercept)) {
- x1 = std::max<float>(x1, minXIntercept);
- x2 = std::min<float>(x2, maxXIntercept);
- }
-
- result.append(LineSegment(x1, x2));
-}
-
-bool BoxShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize&, LayoutUnit& result) const
-{
- // FIXME: this method is only a stub, https://bugs.webkit.org/show_bug.cgi?id=124606.
-
- result = minLogicalIntervalTop;
- return true;
-}
-
} // namespace WebCore
« no previous file with comments | « Source/core/rendering/shapes/BoxShape.h ('k') | Source/core/rendering/shapes/BoxShapeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698