From 5ef7c8a6a70875d4430752d146bdcb069605d71d Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 21 Aug 2012 10:57:44 +0200 Subject: Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147) New snapshot including various build fixes for newer Qt 5 --- Source/WebCore/rendering/RenderBox.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Source/WebCore/rendering/RenderBox.cpp') diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index faf9102e1..8d45f3ff8 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -1282,6 +1282,8 @@ void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, Tran *wasFixed = mode & IsFixed; LayoutSize containerOffset = offsetFromContainer(o, roundedLayoutPoint(transformState.mappedPoint())); + if (mode & SnapOffsetForTransforms) + containerOffset = roundedIntSize(containerOffset); bool preserve3D = mode & UseTransforms && (o->style()->preserves3D() || style()->preserves3D()); if (mode & UseTransforms && shouldUseTransformFromContainer(o)) { @@ -1508,7 +1510,7 @@ void RenderBox::computeRectForRepaint(RenderBoxModelObject* repaintContainer, La LayoutState* layoutState = v->layoutState(); if (layer() && layer()->transform()) - rect = layer()->transform()->mapRect(rect); + rect = layer()->transform()->mapRect(pixelSnappedIntRect(rect)); if (styleToUse->position() == RelativePosition && layer()) rect.move(layer()->relativePositionOffset()); @@ -1547,7 +1549,7 @@ void RenderBox::computeRectForRepaint(RenderBoxModelObject* repaintContainer, La // in the parent's coordinate space that encloses us. if (layer() && layer()->transform()) { fixed = position == FixedPosition; - rect = layer()->transform()->mapRect(rect); + rect = layer()->transform()->mapRect(pixelSnappedIntRect(rect)); topLeft = rect.location(); topLeft.move(locationOffset()); } else if (position == FixedPosition) @@ -2144,10 +2146,7 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) cb->computeLogicalHeight(); result = cb->contentLogicalHeight(); cb->setLogicalHeight(oldHeight); - } else if (cb->isRoot() && isOutOfFlowPositioned()) - // Match the positioned objects behavior, which is that positioned objects will fill their viewport - // always. Note we could only hit this case by recurring into computePercentageLogicalHeight on a positioned containing block. - result = cb->computeContentBoxLogicalHeight(cb->availableLogicalHeight()); + } if (result != -1) { result = valueForLength(height, result); @@ -2270,7 +2269,7 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(SizeType sizeType, Lengt } } availableHeight = computeContentBoxLogicalHeight(valueForLength(logicalHeight, availableHeight)); - if (cb->style()->logicalHeight().isFixed()) + if (cb->isBox() && cb->style()->logicalHeight().isFixed()) availableHeight = max(0, availableHeight - toRenderBox(cb)->scrollbarLogicalHeight()); return availableHeight; } -- cgit v1.2.1