| Index: Source/core/rendering/style/RenderStyle.cpp
|
| diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
|
| index 4aaf56bfab85abfe8fb4d4b841e8a9566d5dd275..23d1008e6db509e8be42ff30e7a0f2873de78ba6 100644
|
| --- a/Source/core/rendering/style/RenderStyle.cpp
|
| +++ b/Source/core/rendering/style/RenderStyle.cpp
|
| @@ -353,35 +353,6 @@ bool RenderStyle::inheritedDataShared(const RenderStyle* other) const
|
| && rareInheritedData.get() == other->rareInheritedData.get();
|
| }
|
|
|
| -static bool positionedObjectMovedOnly(const LengthBox& a, const LengthBox& b, const Length& width)
|
| -{
|
| - // If any unit types are different, then we can't guarantee
|
| - // that this was just a movement.
|
| - if (a.left().type() != b.left().type()
|
| - || a.right().type() != b.right().type()
|
| - || a.top().type() != b.top().type()
|
| - || a.bottom().type() != b.bottom().type())
|
| - return false;
|
| -
|
| - // Only one unit can be non-auto in the horizontal direction and
|
| - // in the vertical direction. Otherwise the adjustment of values
|
| - // is changing the size of the box.
|
| - if (!a.left().isIntrinsicOrAuto() && !a.right().isIntrinsicOrAuto())
|
| - return false;
|
| - if (!a.top().isIntrinsicOrAuto() && !a.bottom().isIntrinsicOrAuto())
|
| - return false;
|
| - // If our width is auto and left or right is specified and changed then this
|
| - // is not just a movement - we need to resize to our container.
|
| - if (width.isIntrinsicOrAuto()
|
| - && ((!a.left().isIntrinsicOrAuto() && a.left() != b.left())
|
| - || (!a.right().isIntrinsicOrAuto() && a.right() != b.right())))
|
| - return false;
|
| -
|
| - // One of the units is fixed or percent in both directions and stayed
|
| - // that way in the new style. Therefore all we are doing is moving.
|
| - return true;
|
| -}
|
| -
|
| StyleDifference RenderStyle::visualInvalidationDiff(const RenderStyle& other) const
|
| {
|
| // Note, we use .get() on each DataRef below because DataRef::operator== will do a deep
|
| @@ -410,10 +381,7 @@ StyleDifference RenderStyle::visualInvalidationDiff(const RenderStyle& other) co
|
|
|
| if (!diff.needsFullLayout() && position() != StaticPosition && surround->offset != other.surround->offset) {
|
| // Optimize for the case where a positioned layer is moving but not changing size.
|
| - if (positionedObjectMovedOnly(surround->offset, other.surround->offset, m_box->width()))
|
| - diff.setNeedsPositionedMovementLayout();
|
| - else
|
| - diff.setNeedsFullLayout();
|
| + diff.setNeedsPositionedMovementLayout();
|
| }
|
|
|
| if (diffNeedsPaintInvalidationLayer(other))
|
|
|