summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/trees/layer_tree_host.cc4
-rw-r--r--cc/trees/layer_tree_host.h5
-rw-r--r--cc/trees/layer_tree_impl.cc18
-rw-r--r--cc/trees/layer_tree_impl.h6
-rw-r--r--cc/trees/layer_tree_impl_unittest.cc66
-rw-r--r--content/renderer/gpu/render_widget_compositor.cc4
-rw-r--r--content/renderer/gpu/render_widget_compositor.h1
-rw-r--r--content/renderer/render_view_impl.cc7
-rw-r--r--third_party/WebKit/Source/core/frame/VisualViewport.cpp3
-rw-r--r--third_party/WebKit/Source/web/DevToolsEmulator.cpp8
-rw-r--r--third_party/WebKit/Source/web/DevToolsEmulator.h2
-rw-r--r--third_party/WebKit/Source/web/WebSettingsImpl.cpp5
-rw-r--r--third_party/WebKit/Source/web/WebSettingsImpl.h1
-rw-r--r--third_party/WebKit/public/platform/WebLayerTreeView.h3
-rw-r--r--third_party/WebKit/public/web/WebSettings.h1
15 files changed, 0 insertions, 134 deletions
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index ee76c66..159aef6 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -99,7 +99,6 @@ LayerTreeHost::LayerTreeHost(InitParams* params)
top_controls_shrink_blink_size_(false),
top_controls_height_(0.f),
top_controls_shown_ratio_(0.f),
- hide_pinch_scrollbars_near_min_scale_(false),
device_scale_factor_(1.f),
visible_(false),
page_scale_factor_(1.f),
@@ -290,9 +289,6 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
// Setting property trees must happen before pushing the page scale.
sync_tree->SetPropertyTrees(property_trees_);
- sync_tree->set_hide_pinch_scrollbars_near_min_scale(
- hide_pinch_scrollbars_near_min_scale_);
-
sync_tree->PushPageScaleFromMainThread(
page_scale_factor_, min_page_scale_factor_, max_page_scale_factor_);
sync_tree->elastic_overscroll()->PushFromMainThread(elastic_overscroll_);
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index cbfa014..2a7ff5d 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -208,10 +208,6 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
void SetTopControlsHeight(float height, bool shrink);
void SetTopControlsShownRatio(float ratio);
- void set_hide_pinch_scrollbars_near_min_scale(bool hide) {
- hide_pinch_scrollbars_near_min_scale_ = hide;
- }
-
gfx::Size device_viewport_size() const { return device_viewport_size_; }
void ApplyPageScaleDeltaFromImplSide(float page_scale_delta);
@@ -447,7 +443,6 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
bool top_controls_shrink_blink_size_;
float top_controls_height_;
float top_controls_shown_ratio_;
- bool hide_pinch_scrollbars_near_min_scale_;
float device_scale_factor_;
bool visible_;
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 6b0c9fd..dda446a 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -56,7 +56,6 @@ LayerTreeImpl::LayerTreeImpl(
page_scale_factor_(page_scale_factor),
min_page_scale_factor_(0),
max_page_scale_factor_(0),
- hide_pinch_scrollbars_near_min_scale_(false),
device_scale_factor_(1.f),
elastic_overscroll_(elastic_overscroll),
viewport_size_invalid_(false),
@@ -310,9 +309,6 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
target_tree->set_top_controls_height(top_controls_height_);
target_tree->PushTopControls(nullptr);
- target_tree->set_hide_pinch_scrollbars_near_min_scale(
- hide_pinch_scrollbars_near_min_scale_);
-
// Active tree already shares the page_scale_factor object with pending
// tree so only the limits need to be provided.
target_tree->PushPageScaleFactorAndLimits(nullptr, min_page_scale_factor(),
@@ -519,7 +515,6 @@ void LayerTreeImpl::DidUpdatePageScale() {
set_needs_update_draw_properties();
DidUpdateScrollState(inner_viewport_scroll_layer_id_);
- HideInnerViewportScrollbarsIfNeeded();
}
void LayerTreeImpl::SetDeviceScaleFactor(float device_scale_factor) {
@@ -531,17 +526,6 @@ void LayerTreeImpl::SetDeviceScaleFactor(float device_scale_factor) {
layer_tree_host_impl_->SetFullRootLayerDamage();
}
-void LayerTreeImpl::HideInnerViewportScrollbarsIfNeeded() {
- float minimum_scale_to_show_at = min_page_scale_factor() * 1.05f;
- bool hide_scrollbars =
- hide_pinch_scrollbars_near_min_scale_ &&
- (current_page_scale_factor() < minimum_scale_to_show_at);
-
- for (ScrollbarLayerImplBase* scrollbar_layer :
- ScrollbarsFor(outer_viewport_scroll_layer_id_))
- scrollbar_layer->SetHideLayerAndSubtree(hide_scrollbars);
-}
-
SyncedProperty<ScaleGroup>* LayerTreeImpl::page_scale_factor() {
return page_scale_factor_.get();
}
@@ -594,8 +578,6 @@ void LayerTreeImpl::SetViewportLayersFromIds(
page_scale_layer_id_ = page_scale_layer_id;
inner_viewport_scroll_layer_id_ = inner_viewport_scroll_layer_id;
outer_viewport_scroll_layer_id_ = outer_viewport_scroll_layer_id;
-
- HideInnerViewportScrollbarsIfNeeded();
}
void LayerTreeImpl::ClearViewportLayers() {
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 8bc1ee7..10a2748 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -199,10 +199,6 @@ class CC_EXPORT LayerTreeImpl {
void SetDeviceScaleFactor(float device_scale_factor);
float device_scale_factor() const { return device_scale_factor_; }
- void set_hide_pinch_scrollbars_near_min_scale(bool hide) {
- hide_pinch_scrollbars_near_min_scale_ = hide;
- }
-
SyncedElasticOverscroll* elastic_overscroll() {
return elastic_overscroll_.get();
}
@@ -420,7 +416,6 @@ class CC_EXPORT LayerTreeImpl {
bool IsViewportLayerId(int id) const;
void UpdateScrollbars(int scroll_layer_id, int clip_layer_id);
void DidUpdatePageScale();
- void HideInnerViewportScrollbarsIfNeeded();
void PushTopControls(const float* top_controls_shown_ratio);
LayerTreeHostImpl* layer_tree_host_impl_;
int source_frame_number_;
@@ -441,7 +436,6 @@ class CC_EXPORT LayerTreeImpl {
scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor_;
float min_page_scale_factor_;
float max_page_scale_factor_;
- bool hide_pinch_scrollbars_near_min_scale_;
float device_scale_factor_;
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc
index dbe7205..182dff1 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -1335,72 +1335,6 @@ TEST_F(LayerTreeImplTest,
EXPECT_FALSE(result_layer);
}
-TEST_F(LayerTreeImplTest, MakeScrollbarsInvisibleNearMinPageScale) {
- const int kThumbThickness = 10;
- const int kTrackStart = 0;
- const bool kIsLeftSideVerticalScrollbar = false;
- const bool kIsOverlayScrollbar = true;
-
- LayerTreeImpl* active_tree = host_impl().active_tree();
- active_tree->set_hide_pinch_scrollbars_near_min_scale(true);
-
- scoped_ptr<LayerImpl> scroll_layer = LayerImpl::Create(active_tree, 1);
- scoped_ptr<SolidColorScrollbarLayerImpl> vertical_scrollbar_layer =
- SolidColorScrollbarLayerImpl::Create(active_tree,
- 2,
- VERTICAL,
- kThumbThickness,
- kTrackStart,
- kIsLeftSideVerticalScrollbar,
- kIsOverlayScrollbar);
- scoped_ptr<SolidColorScrollbarLayerImpl> horizontal_scrollbar_layer =
- SolidColorScrollbarLayerImpl::Create(active_tree,
- 3,
- HORIZONTAL,
- kThumbThickness,
- kTrackStart,
- kIsLeftSideVerticalScrollbar,
- kIsOverlayScrollbar);
-
- scoped_ptr<LayerImpl> clip_layer = LayerImpl::Create(active_tree, 4);
- scoped_ptr<LayerImpl> page_scale_layer = LayerImpl::Create(active_tree, 5);
- scoped_ptr<LayerImpl> outer_scroll_layer = LayerImpl::Create(active_tree, 6);
-
- scroll_layer->SetScrollClipLayer(clip_layer->id());
-
- LayerImpl* scroll_layer_ptr = scroll_layer.get();
- LayerImpl* outer_scroll_layer_ptr = outer_scroll_layer.get();
- LayerImpl* page_scale_layer_ptr = page_scale_layer.get();
-
- scroll_layer->AddChild(outer_scroll_layer.Pass());
- clip_layer->AddChild(page_scale_layer.Pass());
- page_scale_layer_ptr->AddChild(scroll_layer.Pass());
-
- active_tree->SetViewportLayersFromIds(Layer::INVALID_ID, // Overscroll
- page_scale_layer_ptr->id(),
- scroll_layer_ptr->id(),
- outer_scroll_layer_ptr->id());
-
- vertical_scrollbar_layer->SetScrollLayerId(outer_scroll_layer_ptr->id());
- horizontal_scrollbar_layer->SetScrollLayerId(outer_scroll_layer_ptr->id());
-
- active_tree->PushPageScaleFromMainThread(1.0f, 1.0f, 4.0f);
- EXPECT_TRUE(vertical_scrollbar_layer->hide_layer_and_subtree());
- EXPECT_TRUE(horizontal_scrollbar_layer->hide_layer_and_subtree());
-
- active_tree->PushPageScaleFromMainThread(1.04f, 1.0f, 4.0f);
- EXPECT_TRUE(vertical_scrollbar_layer->hide_layer_and_subtree());
- EXPECT_TRUE(horizontal_scrollbar_layer->hide_layer_and_subtree());
-
- active_tree->PushPageScaleFromMainThread(1.06f, 1.0f, 4.0f);
- EXPECT_FALSE(vertical_scrollbar_layer->hide_layer_and_subtree());
- EXPECT_FALSE(horizontal_scrollbar_layer->hide_layer_and_subtree());
-
- active_tree->PushPageScaleFromMainThread(1.5f, 1.0f, 4.0f);
- EXPECT_FALSE(vertical_scrollbar_layer->hide_layer_and_subtree());
- EXPECT_FALSE(horizontal_scrollbar_layer->hide_layer_and_subtree());
-}
-
TEST_F(LayerTreeImplTest,
HitCheckingTouchHandlerRegionsForSinglePositionedLayer) {
scoped_ptr<LayerImpl> root =
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 2e97735..5ab4629 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -851,10 +851,6 @@ void RenderWidgetCompositor::setTopControlsShownRatio(float ratio) {
layer_tree_host_->SetTopControlsShownRatio(ratio);
}
-void RenderWidgetCompositor::setHidePinchScrollbarsNearMinScale(bool hide) {
- layer_tree_host_->set_hide_pinch_scrollbars_near_min_scale(hide);
-}
-
void RenderWidgetCompositor::WillBeginMainFrame() {
widget_->WillBeginCompositorFrame();
}
diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h
index 2aecd43..ee101bb 100644
--- a/content/renderer/gpu/render_widget_compositor.h
+++ b/content/renderer/gpu/render_widget_compositor.h
@@ -136,7 +136,6 @@ class CONTENT_EXPORT RenderWidgetCompositor
bool animate) override;
void setTopControlsHeight(float height, bool shrink) override;
void setTopControlsShownRatio(float) override;
- void setHidePinchScrollbarsNearMinScale(bool) override;
// cc::LayerTreeHostClient implementation.
void WillBeginMainFrame() override;
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index d107331..c768e6a 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1131,13 +1131,6 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
settings->setDoubleTapToZoomEnabled(true);
web_view->setMaximumLegibleScale(prefs.default_maximum_page_scale_factor);
#endif
-
-#if !defined(OS_ANDROID) && !defined(OS_MACOSX)
- // On platforms where the pinch viewport and the layout viewport can
- // both show scrollbars, hide pinch scrollbars when we are near minimum
- // page scale. (See http://crbug.com/446411 and http://crbug.com/515746.)
- settings->setHidePinchScrollbarsNearMinScale(true);
-#endif
}
/*static*/
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index cc6e5b0..35d2993 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -411,9 +411,6 @@ void VisualViewport::registerLayersWithTreeView(WebLayerTreeView* layerTreeView)
m_pageScaleLayer->platformLayer(),
m_innerViewportScrollLayer->platformLayer(),
scrollLayer);
-
- // TODO(aelias): Remove this call after this setting is deleted.
- layerTreeView->setHidePinchScrollbarsNearMinScale(false);
}
bool VisualViewport::visualViewportSuppliesScrollbars() const
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.cpp b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
index 5d33126..8bef12c 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -74,7 +74,6 @@ DevToolsEmulator::DevToolsEmulator(WebViewImpl* webViewImpl)
, m_originalMaxTouchPoints(0)
, m_embedderScriptEnabled(webViewImpl->page()->settings().scriptEnabled())
, m_scriptExecutionDisabled(false)
- , m_hidePinchScrollbarsNearMinScale(false)
{
}
@@ -160,13 +159,6 @@ bool DevToolsEmulator::doubleTapToZoomEnabled() const
return m_touchEventEmulationEnabled ? true : m_doubleTapToZoomEnabled;
}
-void DevToolsEmulator::setHidePinchScrollbarsNearMinScale(bool enabled)
-{
- m_hidePinchScrollbarsNearMinScale = enabled;
- if (m_webViewImpl->layerTreeView())
- m_webViewImpl->layerTreeView()->setHidePinchScrollbarsNearMinScale(enabled);
-}
-
void DevToolsEmulator::setAvailablePointerTypes(int types)
{
m_embedderAvailablePointerTypes = types;
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.h b/third_party/WebKit/Source/web/DevToolsEmulator.h
index 9dd983c..87ad9f1 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.h
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.h
@@ -37,7 +37,6 @@ public:
void setScriptEnabled(bool);
void setDoubleTapToZoomEnabled(bool);
bool doubleTapToZoomEnabled() const;
- void setHidePinchScrollbarsNearMinScale(bool);
void setAvailablePointerTypes(int);
void setPrimaryPointerType(PointerType);
void setAvailableHoverTypes(int);
@@ -86,7 +85,6 @@ private:
bool m_embedderScriptEnabled;
bool m_scriptExecutionDisabled;
- bool m_hidePinchScrollbarsNearMinScale;
};
} // namespace blink
diff --git a/third_party/WebKit/Source/web/WebSettingsImpl.cpp b/third_party/WebKit/Source/web/WebSettingsImpl.cpp
index f5a470d..90ab496 100644
--- a/third_party/WebKit/Source/web/WebSettingsImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSettingsImpl.cpp
@@ -800,9 +800,4 @@ void WebSettingsImpl::setUseMobileViewportStyle(bool enabled)
m_devToolsEmulator->setUseMobileViewportStyle(enabled);
}
-void WebSettingsImpl::setHidePinchScrollbarsNearMinScale(bool enabled)
-{
- m_devToolsEmulator->setHidePinchScrollbarsNearMinScale(enabled);
-}
-
} // namespace blink
diff --git a/third_party/WebKit/Source/web/WebSettingsImpl.h b/third_party/WebKit/Source/web/WebSettingsImpl.h
index e99e602..a2e93d4 100644
--- a/third_party/WebKit/Source/web/WebSettingsImpl.h
+++ b/third_party/WebKit/Source/web/WebSettingsImpl.h
@@ -96,7 +96,6 @@ public:
void setReportWheelOverscroll(bool) override;
void setForceZeroLayoutHeight(bool) override;
void setFullscreenSupported(bool) override;
- void setHidePinchScrollbarsNearMinScale(bool) override;
void setHyperlinkAuditingEnabled(bool) override;
void setIgnoreMainFrameOverflowHiddenQuirk(bool) override;
void setImageAnimationPolicy(ImageAnimationPolicy) override;
diff --git a/third_party/WebKit/public/platform/WebLayerTreeView.h b/third_party/WebKit/public/platform/WebLayerTreeView.h
index 90df35b..441c36f 100644
--- a/third_party/WebKit/public/platform/WebLayerTreeView.h
+++ b/third_party/WebKit/public/platform/WebLayerTreeView.h
@@ -97,9 +97,6 @@ public:
// layers by the top controls height.
virtual void setTopControlsHeight(float height, bool shrinkViewport) { }
- // Sets whether to hide the scrollbars of the inner viewport when we are near the minimum page scale.
- virtual void setHidePinchScrollbarsNearMinScale(bool) { }
-
// Flow control and scheduling ---------------------------------------
// Indicates that an animation needs to be updated.
diff --git a/third_party/WebKit/public/web/WebSettings.h b/third_party/WebKit/public/web/WebSettings.h
index f960283..57f8df1 100644
--- a/third_party/WebKit/public/web/WebSettings.h
+++ b/third_party/WebKit/public/web/WebSettings.h
@@ -171,7 +171,6 @@ public:
virtual void setReportWheelOverscroll(bool) = 0;
virtual void setForceZeroLayoutHeight(bool) = 0;
virtual void setFullscreenSupported(bool) = 0;
- virtual void setHidePinchScrollbarsNearMinScale(bool) = 0;
virtual void setHyperlinkAuditingEnabled(bool) = 0;
virtual void setIgnoreMainFrameOverflowHiddenQuirk(bool) = 0;
virtual void setImageAnimationPolicy(ImageAnimationPolicy) = 0;