Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 721473002: Removed ScrollingCoordinator and a bunch of composited scrolling' (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: moar Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp b/sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp
index bc6b0fd92cbbde6a00e2c6f1aad2780492164019..14e5a89430177618986f26ed0578ce41727cb93f 100644
--- a/sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -35,7 +35,6 @@
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/Page.h"
-#include "core/page/scrolling/ScrollingCoordinator.h"
#include "core/rendering/RenderLayerStackingNode.h"
#include "core/rendering/RenderLayerStackingNodeIterator.h"
#include "core/rendering/RenderView.h"
@@ -365,7 +364,6 @@ void RenderLayerCompositor::frameViewDidChangeSize()
if (m_containerLayer) {
FrameView* frameView = m_renderView.frameView();
m_containerLayer->setSize(frameView->unscaledVisibleContentSize());
- updateOverflowControlsLayers();
}
}
@@ -391,13 +389,6 @@ void RenderLayerCompositor::rootFixedBackgroundsChanged()
m_containerLayer->addChildBelow(backgroundLayer, m_scrollLayer.get());
}
-bool RenderLayerCompositor::scrollingLayerDidChange(RenderLayer* layer)
-{
- if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
- return scrollingCoordinator->scrollableAreaScrollLayerDidChange(layer->scrollableArea());
- return false;
-}
-
String RenderLayerCompositor::layerTreeAsText(LayerTreeFlags flags)
{
ASSERT(lifecycle().state() >= DocumentLifecycle::PaintInvalidationClean);
@@ -471,7 +462,6 @@ GraphicsLayer* RenderLayerCompositor::ensureRootTransformLayer()
m_rootTransformLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
m_overflowControlsHostLayer->addChild(m_rootTransformLayer.get());
m_rootTransformLayer->addChild(m_containerLayer.get());
- updateOverflowControlsLayers();
}
return m_rootTransformLayer.get();
@@ -617,49 +607,6 @@ bool RenderLayerCompositor::isTrackingPaintInvalidations() const
return m_isTrackingPaintInvalidations;
}
-bool RenderLayerCompositor::requiresHorizontalScrollbarLayer() const
-{
- // FIXME(sky): Remove
- return false;
-}
-
-bool RenderLayerCompositor::requiresVerticalScrollbarLayer() const
-{
- // FIXME(sky): Remove
- return false;
-}
-
-void RenderLayerCompositor::updateOverflowControlsLayers()
-{
- GraphicsLayer* controlsParent = m_rootTransformLayer.get() ? m_rootTransformLayer.get() : m_overflowControlsHostLayer.get();
-
- if (requiresHorizontalScrollbarLayer()) {
- if (!m_layerForHorizontalScrollbar) {
- m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), this);
- }
-
- if (m_layerForHorizontalScrollbar->parent() != controlsParent) {
- controlsParent->addChild(m_layerForHorizontalScrollbar.get());
- }
- } else if (m_layerForHorizontalScrollbar) {
- m_layerForHorizontalScrollbar->removeFromParent();
- m_layerForHorizontalScrollbar = nullptr;
- }
-
- if (requiresVerticalScrollbarLayer()) {
- if (!m_layerForVerticalScrollbar) {
- m_layerForVerticalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), this);
- }
-
- if (m_layerForVerticalScrollbar->parent() != controlsParent) {
- controlsParent->addChild(m_layerForVerticalScrollbar.get());
- }
- } else if (m_layerForVerticalScrollbar) {
- m_layerForVerticalScrollbar->removeFromParent();
- m_layerForVerticalScrollbar = nullptr;
- }
-}
-
void RenderLayerCompositor::ensureRootLayer()
{
RootLayerAttachment expectedAttachment = RootLayerAttachedViaChromeClient;
@@ -717,16 +664,6 @@ void RenderLayerCompositor::destroyRootLayer()
detachRootLayer();
- if (m_layerForHorizontalScrollbar) {
- m_layerForHorizontalScrollbar->removeFromParent();
- m_layerForHorizontalScrollbar = nullptr;
- }
-
- if (m_layerForVerticalScrollbar) {
- m_layerForVerticalScrollbar->removeFromParent();
- m_layerForVerticalScrollbar = nullptr;
- }
-
if (m_overflowControlsHostLayer) {
m_overflowControlsHostLayer = nullptr;
m_containerLayer = nullptr;
@@ -791,14 +728,6 @@ void RenderLayerCompositor::updateRootLayerAttachment()
ensureRootLayer();
}
-ScrollingCoordinator* RenderLayerCompositor::scrollingCoordinator() const
-{
- if (Page* page = this->page())
- return page->scrollingCoordinator();
-
- return 0;
-}
-
GraphicsLayerFactory* RenderLayerCompositor::graphicsLayerFactory() const
{
if (Page* page = this->page())
@@ -825,10 +754,6 @@ String RenderLayerCompositor::debugName(const GraphicsLayer* graphicsLayer)
name = "Root Transform Layer";
} else if (graphicsLayer == m_overflowControlsHostLayer.get()) {
name = "Overflow Controls Host Layer";
- } else if (graphicsLayer == m_layerForHorizontalScrollbar.get()) {
- name = "Horizontal Scrollbar Layer";
- } else if (graphicsLayer == m_layerForVerticalScrollbar.get()) {
- name = "Vertical Scrollbar Layer";
} else if (graphicsLayer == m_containerLayer.get()) {
name = "LocalFrame Clipping Layer";
} else if (graphicsLayer == m_scrollLayer.get()) {

Powered by Google App Engine
This is Rietveld 408576698