Convert ScrollableArea ASSERT_NOT_REACHED virtuals
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 17:41:18 +0000 (17:41 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 17:41:18 +0000 (17:41 +0000)
commit5fb3b1b8c680fa8d385fd2ed55320f8420a9636a
tree84de1bbcaf8529c7f0c6912a2fb8dc0b8ccd1d5a
parentf51e7233a31ced3d985539e97222081cb45efdfa
Convert ScrollableArea ASSERT_NOT_REACHED virtuals
https://bugs.webkit.org/show_bug.cgi?id=93306

Reviewed by Darin Adler.

Source/WebCore:

ASSERT_NOT_REACHED is a bad way to make sure that a virtual function
gets an override, because it only fails at run-time in debug builds.

To fix this, convert the virtuals in ScrollableArea that have
ASSERT_NOT_REACHED to be either pure virtual or implemented directly
in ScrollableArea. Add implementations where necessary to make derived
classes concrete.

Additionally, consistently add OVERRIDE for virtual functions in
derived classes that override ScrollableArea methods.

* WebCore.exp.in:
* page/FrameView.h:
(FrameView):
* platform/ScrollView.h:
(ScrollView):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollPosition):
(WebCore):
(WebCore::ScrollableArea::minimumScrollPosition):
(WebCore::ScrollableArea::maximumScrollPosition):
(WebCore::ScrollableArea::visibleContentRect):
* platform/ScrollableArea.h:
(ScrollableArea):
(WebCore::ScrollableArea::overhangAmount):
* platform/chromium/FramelessScrollView.cpp:
(WebCore::FramelessScrollView::isOnActivePage):
(WebCore):
(WebCore::FramelessScrollView::scrollableAreaBoundingBox):
* platform/chromium/FramelessScrollView.h:
(FramelessScrollView):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::visibleHeight):
(WebCore):
(WebCore::PopupMenuWin::visibleWidth):
(WebCore::PopupMenuWin::contentsSize):
(WebCore::PopupMenuWin::isOnActivePage):
(WebCore::PopupMenuWin::scrollableAreaBoundingBox):
* platform/win/PopupMenuWin.h:
(PopupMenuWin):
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.h:
(RenderListBox):

Source/WebKit/chromium:

Add implementations where necessary to make derived classes concrete.
Add OVERRIDE for ScrollableArea functions.

* src/ScrollbarGroup.h:
(ScrollbarGroup):
(WebKit::ScrollbarGroup::scrollCornerRect):
* tests/ScrollAnimatorNoneTest.cpp:
(MockScrollableArea):

Source/WebKit/win:

Add implementations where necessary to make derived classes concrete.
Add OVERRIDE for ScrollableArea functions.

* WebScrollBar.cpp:
(WebScrollBar::visibleHeight):
(WebScrollBar::visibleWidth):
(WebScrollBar::contentsSize):
(WebScrollBar::isOnActivePage):
(WebScrollBar::scrollableAreaBoundingBox):
* WebScrollBar.h:
(WebScrollBar):

Source/WebKit2:

Add implementations where necessary to make derived classes concrete.
Add OVERRIDE for ScrollableArea functions.

* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::visibleHeight):
(WebKit):
(WebKit::WebPopupMenuProxyWin::visibleWidth):
(WebKit::WebPopupMenuProxyWin::contentsSize):
(WebKit::WebPopupMenuProxyWin::scrollableAreaBoundingBox):
* UIProcess/win/WebPopupMenuProxyWin.h:
(WebPopupMenuProxyWin):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/page/FrameView.h
Source/WebCore/platform/ScrollView.h
Source/WebCore/platform/ScrollableArea.cpp
Source/WebCore/platform/ScrollableArea.h
Source/WebCore/platform/chromium/FramelessScrollView.cpp
Source/WebCore/platform/chromium/FramelessScrollView.h
Source/WebCore/platform/win/PopupMenuWin.cpp
Source/WebCore/platform/win/PopupMenuWin.h
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListBox.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ScrollbarGroup.h
Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebScrollBar.cpp
Source/WebKit/win/WebScrollBar.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.cpp
Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.h
Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h