Add a setting to enable composited scrolling for frames
authorwangxianzhu@chromium.org <wangxianzhu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Jan 2013 01:51:14 +0000 (01:51 +0000)
committerwangxianzhu@chromium.org <wangxianzhu@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Jan 2013 01:51:14 +0000 (01:51 +0000)
commitbef6b4f0da6299fd7d7493554fedfe315298fb9e
tree03ace305c94dfafe8edf2832f9515d7aa6204e73
parent37d5156ce47dd8244bdfc1dfc8cc7483a1fcf141
Add a setting to enable composited scrolling for frames
https://bugs.webkit.org/show_bug.cgi?id=104950

Reviewed by James Robinson.

Source/WebCore:

Test: compositing/iframes/iframe-composited-scrolling.html

* page/FrameView.cpp:
(WebCore::FrameView::usesCompositedScrolling): Returns true if compositedScrollingForFramesEnabled and the frame is in forced compositing mode (which is set when forced compositing mode and compositing for scrollable frames are enabled), so that ScrollingCoordinator won't include the region of the frame in the nonFastScrollableRegion.
(WebCore):
* page/FrameView.h:
(FrameView):
* page/Settings.in: Add compositedScrollingForFramesEnabled setting.
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated): Changed the comment about which ScrollableAreas are non-fast-scrollable.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameViewDidScroll): Let ScrollongCoordinator know when the scrolling changes for a frame with composited scrolling enabled.

LayoutTests:

Test case to ensure iframes are not added into nonFastScrollableRegion when acceleratedCompositingForScrollableFramesEnabled and compositedScrollingForFramesEnabled.

* compositing/iframes/iframe-composited-scrolling-expected.txt: Added.
* compositing/iframes/iframe-composited-scrolling.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/iframes/iframe-composited-scrolling-expected.txt [new file with mode: 0644]
LayoutTests/compositing/iframes/iframe-composited-scrolling.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/page/Settings.in
Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp