| Index: third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp b/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
|
| index 87294efd1a6af8d8c583f3bf12bb108dd8822061..0af88ce7cbfc9e4f9584c6c62475cbb79e0f4add 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
|
| @@ -31,7 +31,6 @@
|
| #include "core/layout/LayoutScrollbar.h"
|
| #include "core/layout/LayoutScrollbarTheme.h"
|
| #include "core/layout/LayoutView.h"
|
| -#include "core/paint/PaintLayerScrollableArea.h"
|
| #include "platform/LengthFunctions.h"
|
|
|
| namespace blink {
|
| @@ -180,14 +179,24 @@
|
| clearPositionedState();
|
| setFloating(false);
|
| setHasOverflowClip(false);
|
| - if (oldStyle && (diff.needsPaintInvalidation() || diff.needsLayout()))
|
| - setNeedsPaintInvalidation();
|
| + if (oldStyle && m_scrollbar && m_part != NoPart && (diff.needsPaintInvalidation() || diff.needsLayout()))
|
| + m_scrollbar->theme()->invalidatePart(m_scrollbar, m_part);
|
| }
|
|
|
| void LayoutScrollbarPart::imageChanged(WrappedImagePtr image, const IntRect* rect)
|
| {
|
| - setNeedsPaintInvalidation();
|
| - LayoutBlock::imageChanged(image, rect);
|
| + if (m_scrollbar && m_part != NoPart) {
|
| + m_scrollbar->theme()->invalidatePart(m_scrollbar, m_part);
|
| + } else {
|
| + if (FrameView* frameView = view()->frameView()) {
|
| + if (frameView->isFrameViewScrollCorner(this)) {
|
| + frameView->invalidateScrollCorner(frameView->scrollCornerRect());
|
| + return;
|
| + }
|
| + }
|
| +
|
| + LayoutBlock::imageChanged(image, rect);
|
| + }
|
| }
|
|
|
| LayoutObject* LayoutScrollbarPart::layoutObjectOwningScrollbar() const
|
| @@ -195,24 +204,4 @@
|
| return (!m_scrollbar) ? nullptr : m_scrollbar->owningLayoutObject();
|
| }
|
|
|
| -void LayoutScrollbarPart::setNeedsPaintInvalidation()
|
| -{
|
| - if (m_scrollbar) {
|
| - m_scrollbar->setNeedsPaintInvalidation();
|
| - return;
|
| - }
|
| -
|
| - // This LayoutScrollbarPart is a scroll corner or a resizer.
|
| - ASSERT(m_part == NoPart);
|
| - if (FrameView* frameView = view()->frameView()) {
|
| - if (frameView->isFrameViewScrollCorner(this)) {
|
| - frameView->setScrollCornerNeedsPaintInvalidation();
|
| - return;
|
| - }
|
| - }
|
| -
|
| - // This LayoutScrollbarPart belongs to a PaintLayerScrollableArea.
|
| - toLayoutBox(parent())->scrollableArea()->setScrollCornerNeedsPaintInvalidation();
|
| -}
|
| -
|
| -}
|
| +}
|
|
|