Chromium Code Reviews| Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| index 1a07e189c1ca942ee2389360984bf78d3f62f0f8..f08f94f3284e29691096fd57cd6f45baf3b27a9e 100644 |
| --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| @@ -561,6 +561,9 @@ StyleDifference ComputedStyle::visualInvalidationDiff( |
| else if (diffNeedsPaintInvalidationObject(other)) |
| diff.setNeedsPaintInvalidationObject(); |
| + if (diffNeedsVisualRectUpdate(other)) |
| + diff.setNeedsVisualRectUpdate(); |
| + |
| updatePropertySpecificDifferences(other, diff); |
| // The following condition needs to be at last, because it may depend on |
| @@ -1004,6 +1007,21 @@ bool ComputedStyle::diffNeedsPaintInvalidationObjectForPaintImage( |
| return false; |
| } |
| +// This doesn't include conditions needing layout or overflow recomputation |
| +// which implies visual rect update. |
| +bool ComputedStyle::diffNeedsVisualRectUpdate( |
| + const ComputedStyle& other) const { |
| + // Visual rect is empty if visibility is hidden. |
| + if (visibility() != other.visibility()) |
|
pdr.
2017/03/20 21:23:04
Where was this logic before this patch? Can we rem
Xianzhu
2017/03/20 22:26:35
This is to make https://codereview.chromium.org/27
|
| + return true; |
| + |
| + // Need to update visual rect of the resizer. |
| + if (resize() != other.resize()) |
|
pdr.
2017/03/20 21:23:04
The old code seemed to check against RESIZE_NONE w
Xianzhu
2017/03/20 22:26:35
The old code always invalidates the whole box cont
|
| + return true; |
| + |
| + return false; |
| +} |
| + |
| void ComputedStyle::updatePropertySpecificDifferences( |
| const ComputedStyle& other, |
| StyleDifference& diff) const { |