Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| index 0c6f807ad672cb735dc2bb633c22be393993eedb..fe5d7bcd8d996a955627057b95c6b58c5df8c755 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| @@ -1581,11 +1581,16 @@ void LayoutObject::incrementallyInvalidatePaint(const LayoutBoxModelObject& pain |
| void LayoutObject::fullyInvalidatePaint(const LayoutBoxModelObject& paintInvalidationContainer, PaintInvalidationReason invalidationReason, const LayoutRect& oldBounds, const LayoutRect& newBounds) |
|
pdr.
2016/04/12 03:01:22
This logic took me a while to reason through. It's
Xianzhu
2016/04/12 16:47:50
Done (except that oldBounds and newBounds inversed
|
| { |
| - // Otherwise do full paint invalidation. |
| LayoutRect invalidationRect = oldBounds; |
| + bool oneRectContainsTheOther = true; |
| + if (newBounds.contains(oldBounds)) |
| + invalidationRect = newBounds; |
| + else if (!oldBounds.contains(newBounds)) |
| + oneRectContainsTheOther = false; |
| + |
| adjustInvalidationRectForCompositedScrolling(invalidationRect, paintInvalidationContainer); |
| invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRect, invalidationReason); |
| - if (newBounds != oldBounds) { |
| + if (!oneRectContainsTheOther) { |
| invalidationRect = newBounds; |
| adjustInvalidationRectForCompositedScrolling(invalidationRect, paintInvalidationContainer); |
| invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRect, invalidationReason); |