summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderBox.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
commit5ef7c8a6a70875d4430752d146bdcb069605d71d (patch)
treef6256640b6c46d7da221435803cae65326817ba2 /Source/WebCore/rendering/RenderBox.cpp
parentdecad929f578d8db641febc8740649ca6c574638 (diff)
downloadqtwebkit-5ef7c8a6a70875d4430752d146bdcb069605d71d.tar.gz
Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147)
New snapshot including various build fixes for newer Qt 5
Diffstat (limited to 'Source/WebCore/rendering/RenderBox.cpp')
-rw-r--r--Source/WebCore/rendering/RenderBox.cpp13
1 files changed, 6 insertions, 7 deletions
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<LayoutUnit>(0, availableHeight - toRenderBox(cb)->scrollbarLogicalHeight());
return availableHeight;
}