diff options
author | skobes <skobes@chromium.org> | 2016-01-29 18:00:56 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-30 02:01:59 +0000 |
commit | bf5d50b8769bc50481fb8359df117149c5283bd9 (patch) | |
tree | 819b7851f58717536a819bc214f2bacb5d8f3db1 | |
parent | e61b68d97a31c00367a0e98d9d88c74774026482 (diff) | |
download | chromium_src-bf5d50b8769bc50481fb8359df117149c5283bd9.zip chromium_src-bf5d50b8769bc50481fb8359df117149c5283bd9.tar.gz chromium_src-bf5d50b8769bc50481fb8359df117149c5283bd9.tar.bz2 |
Define type casts for some ScrollableArea subclasses.
Review URL: https://codereview.chromium.org/1645813002
Cr-Commit-Position: refs/heads/master@{#372510}
3 files changed, 9 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h index cec3011..6521e00 100644 --- a/third_party/WebKit/Source/core/frame/FrameView.h +++ b/third_party/WebKit/Source/core/frame/FrameView.h @@ -922,6 +922,7 @@ inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size) } DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFrameView()); +DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isFrameView(), scrollableArea.isFrameView()); } // namespace blink diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h index 055db43..d7e88f6 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h @@ -332,6 +332,7 @@ public: IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; Widget* widget() override; + bool isPaintLayerScrollableArea() const override { return true; } DECLARE_VIRTUAL_TRACE(); @@ -412,6 +413,10 @@ private: #endif }; +DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea, + scrollableArea->isPaintLayerScrollableArea(), + scrollableArea.isPaintLayerScrollableArea()); + } // namespace blink #endif // LayerScrollableArea_h diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h index 49b5b39..a6904b6 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h +++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h @@ -280,6 +280,9 @@ public: // Returns the widget associated with this ScrollableArea. virtual Widget* widget() { return nullptr; } + virtual bool isFrameView() const { return false; } + virtual bool isPaintLayerScrollableArea() const { return false; } + // Need to promptly let go of owned animator objects. EAGERLY_FINALIZE(); DECLARE_VIRTUAL_TRACE(); |