Scrollable plugins not registered properly in ScrollingCoordinator
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2012 22:24:36 +0000 (22:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2012 22:24:36 +0000 (22:24 +0000)
commit228bbc0048a2dde7de7274f31b18780b79217af7
treec9638da87e7fe19b37d0e77885c73a51d3a5c703
parentc45e9a606f016d56b8892230aec7ccbf9e07caff
Scrollable plugins not registered properly in ScrollingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=82163

Patch by James Robinson <jamesr@chromium.org> on 2012-03-27
Reviewed by Anders Carlsson.

Source/WebCore:

Whenever a ScrollableArea is added or removed from a FrameView's ScrollableAreaSet, we have to recalculate the
nonFastScrollableRegion. This can happen for certain types of plugins that are scrollable.

This also reverts 112142 which was a not quite right way to handle these plugins.

* page/FrameView.cpp:
(WebCore::FrameView::addScrollableArea):
(WebCore::FrameView::removeScrollableArea):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::frameViewScrollableAreasDidChange):
(WebCore):
* page/scrolling/ScrollingCoordinator.h:
(ScrollingCoordinator):
* plugins/PluginViewBase.h:

Source/WebKit/chromium:

Since ScrollbarGroups are ScrollableAreas, they need to be able to report their bounds for the
ScrollingCoordinator's calculateNonFastScrollableRegion. This also changes ScrollbarGroups to only be registered
as ScrollableAreas on the FrameView's set when they actually have Scrollbars.

* src/ScrollbarGroup.cpp:
(WebKit::ScrollbarGroup::ScrollbarGroup):
(WebKit::ScrollbarGroup::~ScrollbarGroup):
(WebKit::ScrollbarGroup::scrollbarCreated):
(WebKit::ScrollbarGroup::scrollbarDestroyed):
(WebKit::ScrollbarGroup::setFrameRect):
(WebKit):
(WebKit::ScrollbarGroup::scrollableAreaBoundingBox):
* src/ScrollbarGroup.h:
(ScrollbarGroup):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::reportGeometry):
(WebKit):
(WebKit::WebPluginContainerImpl::scrollbarGroup):
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/plugins/PluginViewBase.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ScrollbarGroup.cpp
Source/WebKit/chromium/src/ScrollbarGroup.h
Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
Source/WebKit/chromium/src/WebPluginContainerImpl.h