| 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 7e828396612d4e86099d8b074171fed1c2b06876..5171058638c1b0d7965488056df3ed169e63c257 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp
|
| @@ -35,8 +35,9 @@
|
|
|
| namespace blink {
|
|
|
| -LayoutScrollbarPart::LayoutScrollbarPart(LayoutScrollbar* scrollbar, ScrollbarPart part)
|
| +LayoutScrollbarPart::LayoutScrollbarPart(ScrollableArea* scrollableArea, LayoutScrollbar* scrollbar, ScrollbarPart part)
|
| : LayoutBlock(nullptr)
|
| + , m_scrollableArea(scrollableArea)
|
| , m_scrollbar(scrollbar)
|
| , m_part(part)
|
| {
|
| @@ -74,9 +75,10 @@ static void recordScrollbarPartStats(Document& document, ScrollbarPart part)
|
| }
|
| }
|
|
|
| -LayoutScrollbarPart* LayoutScrollbarPart::createAnonymous(Document* document, LayoutScrollbar* scrollbar, ScrollbarPart part)
|
| +LayoutScrollbarPart* LayoutScrollbarPart::createAnonymous(Document* document, ScrollableArea* scrollableArea,
|
| + LayoutScrollbar* scrollbar, ScrollbarPart part)
|
| {
|
| - LayoutScrollbarPart* layoutObject = new LayoutScrollbarPart(scrollbar, part);
|
| + LayoutScrollbarPart* layoutObject = new LayoutScrollbarPart(scrollableArea, scrollbar, part);
|
| recordScrollbarPartStats(*document, part);
|
| layoutObject->setDocumentForAnonymous(document);
|
| return layoutObject;
|
| @@ -211,15 +213,14 @@ void LayoutScrollbarPart::setNeedsPaintInvalidation()
|
| }
|
| }
|
|
|
| - // This LayoutScrollbarPart belongs to a PaintLayerScrollableArea.
|
| - toLayoutBox(parent())->getScrollableArea()->setScrollCornerNeedsPaintInvalidation();
|
| + m_scrollableArea->setScrollCornerNeedsPaintInvalidation();
|
| }
|
|
|
| LayoutRect LayoutScrollbarPart::visualRect() const
|
| {
|
| // This returns the combined bounds of all scrollbar parts, which is sufficient for correctness
|
| // but not as tight as it could be.
|
| - return m_scrollbar ? m_scrollbar->visualRect() : LayoutRect();
|
| + return m_scrollableArea->visualRectForScrollbarParts();
|
| }
|
|
|
| } // namespace blink
|
|
|