Title: [108422] trunk/Source
Revision
108422
Author
[email protected]
Date
2012-02-21 17:04:21 -0800 (Tue, 21 Feb 2012)

Log Message

Enable ScrollingCoordinator in chromium whenever compositing is enabled
https://bugs.webkit.org/show_bug.cgi?id=79165

Reviewed by Adam Barth.

Source/WebCore:

As the title says.

* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::setScrollLayer):
(WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::setScrollParameters):
(WebCore::ScrollingCoordinator::setWheelEventHandlerCount):
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
    Remove ASSERT_NOT_REACHED()ed from these functions, they are now expected to be called but do nothing.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
    Guard a mac-specific piece of code in #if PLATFORM(MAC). This code already has a FIXME.
* rendering/RenderLayerCompositor.cpp:
(WebCore::shouldCompositeOverflowControls):
    Make coordinatesScroll..() sufficient but not necessary for compositing overflow controls. In chromium, we
    want to composite overflow controls even for FrameViews that we aren't coordinating via the
    ScrollingCoordinator.

Source/WebKit/chromium:

* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::setViewport):
    Whenever the ScrollingCoordinator is enabled the scroll layer's position is expected to be updated
    externally to RenderLayerCompositor, so set it here.
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setAcceleratedCompositingEnabled):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (108421 => 108422)


--- trunk/Source/WebCore/ChangeLog	2012-02-22 01:01:31 UTC (rev 108421)
+++ trunk/Source/WebCore/ChangeLog	2012-02-22 01:04:21 UTC (rev 108422)
@@ -1,3 +1,30 @@
+2012-02-21  James Robinson  <[email protected]>
+
+        Enable ScrollingCoordinator in chromium whenever compositing is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=79165
+
+        Reviewed by Adam Barth.
+
+        As the title says.
+
+        * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
+        (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
+        (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
+        (WebCore::ScrollingCoordinator::setScrollLayer):
+        (WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
+        (WebCore::ScrollingCoordinator::setScrollParameters):
+        (WebCore::ScrollingCoordinator::setWheelEventHandlerCount):
+        (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
+            Remove ASSERT_NOT_REACHED()ed from these functions, they are now expected to be called but do nothing.
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::RenderLayerBacking):
+            Guard a mac-specific piece of code in #if PLATFORM(MAC). This code already has a FIXME.
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::shouldCompositeOverflowControls):
+            Make coordinatesScroll..() sufficient but not necessary for compositing overflow controls. In chromium, we
+            want to composite overflow controls even for FrameViews that we aren't coordinating via the
+            ScrollingCoordinator.
+
 2012-02-21  Adam Klein  <[email protected]>
 
         Setting innerText causes DOMSubtreeModified to be dispatched too early

Modified: trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp (108421 => 108422)


--- trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp	2012-02-22 01:01:31 UTC (rev 108421)
+++ trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp	2012-02-22 01:04:21 UTC (rev 108422)
@@ -36,25 +36,21 @@
 
 void ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange(FrameView*, GraphicsLayer* horizontalScrollbarLayer)
 {
-    ASSERT_NOT_REACHED();
     // FIXME: Implement!
 }
 
 void ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange(FrameView*, GraphicsLayer* verticalScrollbarLayer)
 {
-    ASSERT_NOT_REACHED();
     // FIXME: Implement!
 }
 
 void ScrollingCoordinator::setScrollLayer(GraphicsLayer* scrollLayer)
 {
-    ASSERT_NOT_REACHED();
     // FIXME: Implement!
 }
 
 void ScrollingCoordinator::setNonFastScrollableRegion(const Region&)
 {
-    ASSERT_NOT_REACHED();
     // FIXME: Implement!
 }
 
@@ -62,19 +58,16 @@
                                                bool hasEnabledHorizontalScrollbar, bool hasEnabledVerticalScrollbar,
                                                const IntRect& viewportRect, const IntSize& contentsSize)
 {
-    ASSERT_NOT_REACHED();
     // FIXME: Implement!
 }
 
 void ScrollingCoordinator::setWheelEventHandlerCount(unsigned)
 {
-    ASSERT_NOT_REACHED();
     // FIXME: Implement!
 }
 
 void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool)
 {
-    ASSERT_NOT_REACHED();
     // FIXME: Implement!
 }
 

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (108421 => 108422)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-02-22 01:01:31 UTC (rev 108421)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-02-22 01:04:21 UTC (rev 108422)
@@ -101,9 +101,11 @@
         if (page && frame && page->mainFrame() == frame) {
             m_isMainFrameRenderViewLayer = true;
 
+#if PLATFORM(MAC)
             // FIXME: It's a little weird that we base this decision on whether there's a scrolling coordinator or not.
             if (page->scrollingCoordinator())
                 m_usingTiledCacheLayer = true;
+#endif
         }
     }
     

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (108421 => 108422)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-02-22 01:01:31 UTC (rev 108421)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-02-22 01:04:21 UTC (rev 108422)
@@ -1712,7 +1712,8 @@
 
     if (Page* page = view->frame()->page()) {
         if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
-            return scrollingCoordinator->coordinatesScrollingForFrameView(view);
+            if (scrollingCoordinator->coordinatesScrollingForFrameView(view))
+                return true;
     }
 
 #if !PLATFORM(CHROMIUM)

Modified: trunk/Source/WebKit/chromium/ChangeLog (108421 => 108422)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-02-22 01:01:31 UTC (rev 108421)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-02-22 01:04:21 UTC (rev 108422)
@@ -1,3 +1,17 @@
+2012-02-21  James Robinson  <[email protected]>
+
+        Enable ScrollingCoordinator in chromium whenever compositing is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=79165
+
+        Reviewed by Adam Barth.
+
+        * src/NonCompositedContentHost.cpp:
+        (WebKit::NonCompositedContentHost::setViewport):
+            Whenever the ScrollingCoordinator is enabled the scroll layer's position is expected to be updated
+            externally to RenderLayerCompositor, so set it here.
+        * src/WebSettingsImpl.cpp:
+        (WebKit::WebSettingsImpl::setAcceleratedCompositingEnabled):
+
 2012-02-21  Daniel Cheng  <[email protected]>
 
         [chromium] Fix image drag out on Chromium

Modified: trunk/Source/WebKit/chromium/src/NonCompositedContentHost.cpp (108421 => 108422)


--- trunk/Source/WebKit/chromium/src/NonCompositedContentHost.cpp	2012-02-22 01:01:31 UTC (rev 108421)
+++ trunk/Source/WebKit/chromium/src/NonCompositedContentHost.cpp	2012-02-22 01:04:21 UTC (rev 108422)
@@ -27,6 +27,7 @@
 
 #include "NonCompositedContentHost.h"
 
+#include "FloatPoint.h"
 #include "FloatRect.h"
 #include "GraphicsLayer.h"
 #include "LayerChromium.h"
@@ -103,6 +104,7 @@
 
     m_viewportSize = viewportSize;
     scrollLayer()->setScrollPosition(scrollPosition);
+    scrollLayer()->setPosition(-scrollPosition);
     // Due to the possibility of pinch zoom, the noncomposited layer is always
     // assumed to be scrollable.
     scrollLayer()->setScrollable(true);

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp (108421 => 108422)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2012-02-22 01:01:31 UTC (rev 108421)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2012-02-22 01:04:21 UTC (rev 108422)
@@ -331,6 +331,7 @@
 void WebSettingsImpl::setAcceleratedCompositingEnabled(bool enabled)
 {
     m_settings->setAcceleratedCompositingEnabled(enabled);
+    m_settings->setScrollingCoordinatorEnabled(enabled);
 }
 
 void WebSettingsImpl::setForceCompositingMode(bool enabled)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to