| 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 15fa2e07ca658736df4a6257d6befc6bdf59c775..0e1b84882c9440623f265f9889a3e49940ab3afe 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -1430,18 +1430,30 @@ PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(PaintInvalidationStat
|
| // If we are set to do a full paint invalidation that means the LayoutView will be
|
| // issue paint invalidations. We can then skip issuing of paint invalidations for the child
|
| // layoutObjects as they'll be covered by the LayoutView.
|
| - if (!view()->doingFullPaintInvalidation() && !isFullPaintInvalidationReason(reason)) {
|
| - invalidatePaintForOverflowIfNeeded();
|
| + if (!view()->doingFullPaintInvalidation()) {
|
| + bool willDoFullInvalidation = isFullPaintInvalidationReason(reason);
|
| + if (!willDoFullInvalidation)
|
| + invalidatePaintForOverflowIfNeeded();
|
|
|
| // Issue paint invalidations for any scrollbars if there is a scrollable area for this layoutObject.
|
| if (ScrollableArea* area = scrollableArea()) {
|
| // In slimming paint mode, we already invalidated the display item clients of the scrollbars
|
| // during PaintLayerScrollableArea::invalidateScrollbarRect(). However, for now we still need to
|
| // invalidate the rectangles to trigger repaints.
|
| - if (area->hasVerticalBarDamage())
|
| - invalidatePaintRectangleNotInvalidatingDisplayItemClients(LayoutRect(area->verticalBarDamage()));
|
| - if (area->hasHorizontalBarDamage())
|
| - invalidatePaintRectangleNotInvalidatingDisplayItemClients(LayoutRect(area->horizontalBarDamage()));
|
| + if (area->hasVerticalBarDamage()) {
|
| + if (!willDoFullInvalidation)
|
| + invalidatePaintRectangleNotInvalidatingDisplayItemClients(LayoutRect(area->verticalBarDamage()));
|
| + // TODO(wangxianzhu): Pass current bounds of the scrollbar to PaintController.
|
| + if (Scrollbar* verticalScrollbar = area->verticalScrollbar())
|
| + invalidateDisplayItemClient(*verticalScrollbar);
|
| + }
|
| + if (area->hasHorizontalBarDamage()) {
|
| + if (!willDoFullInvalidation)
|
| + invalidatePaintRectangleNotInvalidatingDisplayItemClients(LayoutRect(area->horizontalBarDamage()));
|
| + // TODO(wangxianzhu): Pass current bounds of the scrollbar to PaintController.
|
| + if (Scrollbar* horizontalScrollbar = area->horizontalScrollbar())
|
| + invalidateDisplayItemClient(*horizontalScrollbar);
|
| + }
|
| }
|
| }
|
|
|
|
|