Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
| index a8cd0c368cf6e3f4833c6d9f6450754fac81772c..23d1185d2bfdf45e79abc1c9582fa4eae0e38004 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
| @@ -1991,7 +1991,7 @@ Scrollbar* PaintLayerScrollableArea::ScrollbarManager::CreateScrollbar( |
| ScrollableArea(), orientation, scrollbar_size, |
| &ScrollableArea()->Box().GetFrame()->GetPage()->GetChromeClient()); |
| } |
| - ScrollableArea()->Box().GetDocument().View()->AddChild(scrollbar); |
| + ScrollableArea()->Box().GetDocument().View()->AddScrollbar(scrollbar); |
| return scrollbar; |
| } |
| @@ -2013,7 +2013,7 @@ void PaintLayerScrollableArea::ScrollbarManager::DestroyScrollbar( |
| if (!scrollbar->IsCustomScrollbar()) |
| ScrollableArea()->WillRemoveScrollbar(*scrollbar, orientation); |
| - ToFrameView(scrollbar->Parent())->RemoveChild(scrollbar.Get()); |
| + ScrollableArea()->Box().GetDocument().View()->RemoveScrollbar(scrollbar); |
|
szager1
2017/04/21 08:37:52
Can't this still be accessed via scrollbar->Parent
joelhockey
2017/04/21 09:56:10
No. The visibility between core and platform is a
szager1
2017/04/21 10:22:36
I think the proper fix is to define Scrollbar owne
szager1
2017/04/21 10:42:30
Just to be totally clear, this line of code would
joelhockey
2017/04/21 12:22:05
Yes, nice idea. I'll have a go at that. I still
|
| scrollbar->DisconnectFromScrollableArea(); |
| scrollbar = nullptr; |
| } |