Chromium Code Reviews| Index: Source/core/rendering/style/RenderStyle.cpp |
| diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp |
| index b6db98ebcf328be94f64c9ecfebe286c9a719587..5bc10a9b66565f176cd14ab56e9b68093e850b85 100644 |
| --- a/Source/core/rendering/style/RenderStyle.cpp |
| +++ b/Source/core/rendering/style/RenderStyle.cpp |
| @@ -385,6 +385,13 @@ StyleDifference RenderStyle::visualInvalidationDiff(const RenderStyle& other) co |
| if (!diff.needsFullLayout() && diffNeedsFullLayout(other)) |
| diff.setNeedsFullLayout(); |
| + if (!diff.needsFullLayout() && surround->margin != other.surround->margin) { |
| + if (position() == AbsolutePosition || position() == FixedPosition) |
|
Julien - ping for review
2014/09/23 19:53:51
Shouldn't we use position() != StaticPosition here
rhogan
2014/09/23 20:08:27
We can't include RelativePosition here because the
|
| + diff.setNeedsPositionedMovementLayout(); |
| + else |
| + diff.setNeedsFullLayout(); |
| + } |
| + |
| 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())) |
| @@ -603,9 +610,6 @@ bool RenderStyle::diffNeedsFullLayout(const RenderStyle& other) const |
| return true; |
| if (surround.get() != other.surround.get()) { |
| - if (surround->margin != other.surround->margin) |
| - return true; |
| - |
| if (surround->padding != other.surround->padding) |
| return true; |
| } |