Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2834573005: Scrollbar no longer inherits from FrameViewBase. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698