Title: [113106] branches/subpixellayout/Source/WebCore/rendering
- Revision
- 113106
- Author
- [email protected]
- Date
- 2012-04-03 16:32:45 -0700 (Tue, 03 Apr 2012)
Log Message
RenderBox cleanup on branch.
Modified Paths
Diff
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBox.cpp (113105 => 113106)
--- branches/subpixellayout/Source/WebCore/rendering/RenderBox.cpp 2012-04-03 23:26:28 UTC (rev 113105)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBox.cpp 2012-04-03 23:32:45 UTC (rev 113106)
@@ -502,8 +502,8 @@
// For objects with visible overflow, this matches IE.
// FIXME: Need to work right with writing modes.
if (style()->isLeftToRightDirection())
- return max(pixelSnappedClientWidth(), maxXLayoutOverflow().round() - borderLeft());
- return clientWidth() - min(0, minXLayoutOverflow().round() - borderLeft());
+ return snapSizeToPixel(max(clientWidth(), maxXLayoutOverflow() - borderLeft()), clientLeft());
+ return snapSizeToPixel(clientWidth() - min(zeroLayoutUnit, minXLayoutOverflow()) - borderLeft(), clientLeft());
}
int RenderBox::scrollHeight() const
@@ -512,7 +512,7 @@
return layer()->scrollHeight();
// For objects with visible overflow, this matches IE.
// FIXME: Need to work right with writing modes.
- return max(pixelSnappedClientHeight(), maxYLayoutOverflow().round() - borderTop());
+ return snapSizeToPixel(max(clientHeight(), maxYLayoutOverflow() - borderTop()), clientTop());
}
int RenderBox::scrollLeft() const
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBox.h (113105 => 113106)
--- branches/subpixellayout/Source/WebCore/rendering/RenderBox.h 2012-04-03 23:26:28 UTC (rev 113105)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBox.h 2012-04-03 23:32:45 UTC (rev 113106)
@@ -158,10 +158,10 @@
// but it is on the right in vertical-rl.
LayoutRect layoutOverflowRect() const { return m_overflow ? m_overflow->layoutOverflowRect() : clientBoxRect(); }
IntRect pixelSnappedLayoutOverflowRect() const { return pixelSnappedIntRect(layoutOverflowRect()); }
- LayoutUnit minYLayoutOverflow() const { return m_overflow? m_overflow->minYLayoutOverflow() : LayoutUnit(borderTop()); }
- LayoutUnit maxYLayoutOverflow() const { return m_overflow ? m_overflow->maxYLayoutOverflow() : LayoutUnit(borderTop()) + clientHeight(); }
- LayoutUnit minXLayoutOverflow() const { return m_overflow ? m_overflow->minXLayoutOverflow() : LayoutUnit(borderLeft()); }
- LayoutUnit maxXLayoutOverflow() const { return m_overflow ? m_overflow->maxXLayoutOverflow() : LayoutUnit(borderLeft()) + clientWidth(); }
+ LayoutUnit minYLayoutOverflow() const { return m_overflow? m_overflow->minYLayoutOverflow() : static_cast<LayoutUnit>(borderTop()); }
+ LayoutUnit maxYLayoutOverflow() const { return m_overflow ? m_overflow->maxYLayoutOverflow() : static_cast<LayoutUnit>(borderTop()) + clientHeight(); }
+ LayoutUnit minXLayoutOverflow() const { return m_overflow ? m_overflow->minXLayoutOverflow() : static_cast<LayoutUnit>(borderLeft()); }
+ LayoutUnit maxXLayoutOverflow() const { return m_overflow ? m_overflow->maxXLayoutOverflow() : static_cast<LayoutUnit>(borderLeft()) + clientWidth(); }
LayoutSize maxLayoutOverflow() const { return LayoutSize(maxXLayoutOverflow(), maxYLayoutOverflow()); }
LayoutUnit logicalLeftLayoutOverflow() const { return style()->isHorizontalWritingMode() ? minXLayoutOverflow() : minYLayoutOverflow(); }
LayoutUnit logicalRightLayoutOverflow() const { return style()->isHorizontalWritingMode() ? maxXLayoutOverflow() : maxYLayoutOverflow(); }
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (113105 => 113106)
--- branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2012-04-03 23:26:28 UTC (rev 113105)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2012-04-03 23:32:45 UTC (rev 113106)
@@ -460,7 +460,7 @@
LayoutUnit childY = yPos;
switch (style()->boxAlign()) {
case BCENTER:
- childY += child->marginTop() + max<int>(0, (contentHeight() - (child->height() + child->marginHeight())) / 2);
+ childY += child->marginTop() + max(zeroLayoutUnit, (contentHeight() - (child->height() + child->marginHeight())) / 2);
break;
case BBASELINE: {
LayoutUnit ascent = child->firstLineBoxBaseline();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes