From f5bed9da066b801da27bc7dc2bd81f62d1b1b32b Mon Sep 17 00:00:00 2001 From: Rafael Weinstein Date: Wed, 12 Nov 2014 18:14:51 -0800 Subject: [PATCH] Remove moar composited scrolling from sky R=abarth@chromium.org Review URL: https://codereview.chromium.org/722063002 --- engine/public/platform/WebLayer.h | 15 ---------- viewer/cc/web_layer_impl.cc | 48 ------------------------------- viewer/cc/web_layer_impl.h | 12 -------- 3 files changed, 75 deletions(-) diff --git a/engine/public/platform/WebLayer.h b/engine/public/platform/WebLayer.h index 028b8ab1910..471c03b565e 100644 --- a/engine/public/platform/WebLayer.h +++ b/engine/public/platform/WebLayer.h @@ -166,21 +166,6 @@ public: // To set a WebLayer as scrollable we must specify the corresponding clip layer. virtual void setScrollClipLayer(WebLayer*) = 0; - virtual bool scrollable() const = 0; - virtual void setUserScrollable(bool horizontal, bool vertical) = 0; - virtual bool userScrollableHorizontal() const = 0; - virtual bool userScrollableVertical() const = 0; - - virtual void setHaveWheelEventHandlers(bool) = 0; - virtual bool haveWheelEventHandlers() const = 0; - - virtual void setHaveScrollEventHandlers(bool) = 0; - virtual bool haveScrollEventHandlers() const = 0; - - virtual void setShouldScrollOnMainThread(bool) = 0; - virtual bool shouldScrollOnMainThread() const = 0; - - virtual void setNonFastScrollableRegion(const WebVector&) = 0; // The scroll client is notified when the scroll position of the WebLayer // changes. Only a single scroll client can be set for a WebLayer at a time. diff --git a/viewer/cc/web_layer_impl.cc b/viewer/cc/web_layer_impl.cc index f64f7479a01..3256fea3a8e 100644 --- a/viewer/cc/web_layer_impl.cc +++ b/viewer/cc/web_layer_impl.cc @@ -288,54 +288,6 @@ void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) { layer_->SetScrollClipLayerId(clip_layer->id()); } -bool WebLayerImpl::scrollable() const { - return layer_->scrollable(); -} - -void WebLayerImpl::setUserScrollable(bool horizontal, bool vertical) { - layer_->SetUserScrollable(horizontal, vertical); -} - -bool WebLayerImpl::userScrollableHorizontal() const { - return layer_->user_scrollable_horizontal(); -} - -bool WebLayerImpl::userScrollableVertical() const { - return layer_->user_scrollable_vertical(); -} - -void WebLayerImpl::setHaveWheelEventHandlers(bool have_wheel_event_handlers) { - layer_->SetHaveWheelEventHandlers(have_wheel_event_handlers); -} - -bool WebLayerImpl::haveWheelEventHandlers() const { - return layer_->have_wheel_event_handlers(); -} - -void WebLayerImpl::setHaveScrollEventHandlers(bool have_scroll_event_handlers) { - layer_->SetHaveScrollEventHandlers(have_scroll_event_handlers); -} - -bool WebLayerImpl::haveScrollEventHandlers() const { - return layer_->have_scroll_event_handlers(); -} - -void WebLayerImpl::setShouldScrollOnMainThread( - bool should_scroll_on_main_thread) { - layer_->SetShouldScrollOnMainThread(should_scroll_on_main_thread); -} - -bool WebLayerImpl::shouldScrollOnMainThread() const { - return layer_->should_scroll_on_main_thread(); -} - -void WebLayerImpl::setNonFastScrollableRegion(const WebVector& rects) { - cc::Region region; - for (size_t i = 0; i < rects.size(); ++i) - region.Union(rects[i]); - layer_->SetNonFastScrollableRegion(region); -} - void WebLayerImpl::setScrollClient(blink::WebLayerScrollClient* scroll_client) { if (scroll_client) { layer_->set_did_scroll_callback( diff --git a/viewer/cc/web_layer_impl.h b/viewer/cc/web_layer_impl.h index 5d8a8d92253..7364596a166 100644 --- a/viewer/cc/web_layer_impl.h +++ b/viewer/cc/web_layer_impl.h @@ -107,18 +107,6 @@ class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { virtual void setScrollPosition(blink::WebPoint position); virtual blink::WebPoint scrollPosition() const; virtual void setScrollClipLayer(blink::WebLayer* clip_layer); - virtual bool scrollable() const; - virtual void setUserScrollable(bool horizontal, bool vertical); - virtual bool userScrollableHorizontal() const; - virtual bool userScrollableVertical() const; - virtual void setHaveWheelEventHandlers(bool have_wheel_event_handlers); - virtual bool haveWheelEventHandlers() const; - virtual void setHaveScrollEventHandlers(bool have_scroll_event_handlers); - virtual bool haveScrollEventHandlers() const; - virtual void setShouldScrollOnMainThread(bool scroll_on_main); - virtual bool shouldScrollOnMainThread() const; - virtual void setNonFastScrollableRegion( - const blink::WebVector& region); virtual void setScrollClient(blink::WebLayerScrollClient* client); virtual bool isOrphan() const; virtual void setWebLayerClient(blink::WebLayerClient* client);