Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| index 89b23b078658cced2b4731d5f485539a9a6f9bb3..ea6938cc60b0b05e921669fe41345f0194df724b 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -2034,6 +2034,25 @@ bool LayoutBox::needsForcedBreakBefore(EBreak previousBreakAfterValue) const |
| return isForcedFragmentainerBreakValue(classABreakPointValue(previousBreakAfterValue)); |
| } |
| +bool LayoutBox::canSkipUnforcedPaintInvalidation() const |
| +{ |
| + if (getSelectionState() != SelectionNone) |
|
chrishtr
2016/08/03 20:33:50
What's the (brief) explanation for this?
Xianzhu
2016/08/03 21:30:35
Done.
|
| + return false; |
| + |
| + // In case scrollbars got repositioned (which will typically happen if the layout object got |
| + // resized), we cannot skip invalidation. |
| + if (hasNonCompositedScrollbars()) |
| + return false; |
| + |
| + if (hasBoxDecorationBackground() || styleRef().hasVisualOverflowingEffect()) |
|
chrishtr
2016/08/03 20:33:50
ditto
Xianzhu
2016/08/03 21:30:35
Done.
|
| + return false; |
| + |
| + if (hasClipRelatedProperty() || hasControlClip()) |
|
chrishtr
2016/08/03 20:33:50
ditto
Xianzhu
2016/08/03 21:30:35
Done.
|
| + return false; |
| + |
| + return true; |
| +} |
| + |
| LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const |
| { |
| if (style()->visibility() != VISIBLE) |