Chromium Code Reviews| Index: third_party/WebKit/Source/platform/scroll/Scrollbar.h |
| diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.h b/third_party/WebKit/Source/platform/scroll/Scrollbar.h |
| index 12a04266dd5b9ae20d0769ebf04a367e653421c1..ecb2b7bc61dcf1aeb7f368d621c934cff1c82b5d 100644 |
| --- a/third_party/WebKit/Source/platform/scroll/Scrollbar.h |
| +++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.h |
| @@ -45,7 +45,7 @@ class ScrollbarTheme; |
| class WebGestureEvent; |
| class WebMouseEvent; |
| -class PLATFORM_EXPORT Scrollbar : public FrameViewBase, |
| +class PLATFORM_EXPORT Scrollbar : public GarbageCollectedFinalized<Scrollbar>, |
| public ScrollbarThemeClient, |
| public DisplayItemClient { |
| public: |
| @@ -68,18 +68,18 @@ class PLATFORM_EXPORT Scrollbar : public FrameViewBase, |
| ~Scrollbar() override; |
| // ScrollbarThemeClient implementation. |
| - int X() const override { return FrameViewBase::X(); } |
| - int Y() const override { return FrameViewBase::Y(); } |
| - int Width() const override { return FrameViewBase::Width(); } |
| - int Height() const override { return FrameViewBase::Height(); } |
| - IntSize Size() const override { return FrameViewBase::Size(); } |
| - IntPoint Location() const override { return FrameViewBase::Location(); } |
| + int X() const override { return frame_rect_.X(); } |
| + int Y() const override { return frame_rect_.Y(); } |
| + int Width() const override { return frame_rect_.Width(); } |
| + int Height() const override { return frame_rect_.Height(); } |
| + IntSize Size() const override { return frame_rect_.Size(); } |
| + IntPoint Location() const override { return frame_rect_.Location(); } |
| - FrameViewBase* Parent() const override { return FrameViewBase::Parent(); } |
| - FrameViewBase* Root() const override { return FrameViewBase::Root(); } |
| + virtual void SetParent(FrameViewBase* parent) { parent_ = parent; } |
|
szager1
2017/04/21 08:37:52
Why virtual?
joelhockey
2017/04/21 09:56:10
LayoutScrollbar overrides to call a private Update
|
| + FrameViewBase* Parent() const { return parent_; } |
| - void SetFrameRect(const IntRect&) override; |
| - IntRect FrameRect() const override { return FrameViewBase::FrameRect(); } |
| + void SetFrameRect(const IntRect&); |
|
szager1
2017/04/21 08:37:52
Shouldn't this still be an override?
joelhockey
2017/04/21 09:56:10
Yes, thanks. It is still overriding ScrollbarThem
|
| + IntRect FrameRect() const override { return frame_rect_; } |
| ScrollbarOverlayColorTheme GetScrollbarOverlayColorTheme() const override; |
| void GetTickmarks(Vector<IntRect>&) const override; |
| @@ -156,7 +156,7 @@ class PLATFORM_EXPORT Scrollbar : public FrameViewBase, |
| ScrollbarTheme& GetTheme() const { return theme_; } |
| IntRect ConvertToContainingFrameViewBase(const IntRect&) const; |
| - IntPoint ConvertFromContainingFrameViewBase(const IntPoint&) const override; |
| + IntPoint ConvertFromContainingFrameViewBase(const IntPoint&) const; |
| void MoveThumb(int pos, bool dragging_document = false); |
| @@ -239,8 +239,6 @@ class PLATFORM_EXPORT Scrollbar : public FrameViewBase, |
| float elastic_overscroll_; |
| private: |
| - bool IsScrollbar() const override { return true; } |
| - |
| void Invalidate() override { SetNeedsPaintInvalidation(kAllParts); } |
| void InvalidateRect(const IntRect&) override { |
| SetNeedsPaintInvalidation(kAllParts); |
| @@ -254,14 +252,10 @@ class PLATFORM_EXPORT Scrollbar : public FrameViewBase, |
| bool track_needs_repaint_; |
| bool thumb_needs_repaint_; |
| LayoutRect visual_rect_; |
| + Member<FrameViewBase> parent_; |
|
haraken
2017/04/21 08:42:03
I think this can be Member<FrameView>. I think the
joelhockey
2017/04/21 09:56:10
I wish! That would have made my work easier ;-)
N
|
| + IntRect frame_rect_; |
| }; |
| -DEFINE_TYPE_CASTS(Scrollbar, |
| - FrameViewBase, |
| - frameViewBase, |
| - frameViewBase->IsScrollbar(), |
| - frameViewBase.IsScrollbar()); |
| - |
| } // namespace blink |
| #endif // Scrollbar_h |