| Index: cc/trees/layer_tree_host_impl.cc
|
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
| index 2f044eeab78af6ffb4d94972f5fc60b810aac68a..3a2abadd5d2fa7dec0be26ea8067a001c9d68a7e 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -244,8 +244,8 @@ LayerTreeHostImpl::LayerTreeHostImpl(
|
|
|
| // LTHI always has an active tree.
|
| active_tree_ = base::MakeUnique<LayerTreeImpl>(
|
| - this, new SyncedProperty<ScaleGroup>, new SyncedBrowserControls,
|
| - new SyncedElasticOverscroll);
|
| + this, new SyncedProperty<ScaleGroup>, new SyncedProperty<ScaleGroup>,
|
| + new SyncedBrowserControls, new SyncedElasticOverscroll);
|
| active_tree_->property_trees()->is_active = true;
|
|
|
| viewport_ = Viewport::Create(this);
|
| @@ -1182,10 +1182,11 @@ void LayerTreeHostImpl::BlockNotifyReadyToActivateForTesting(bool block) {
|
| void LayerTreeHostImpl::ResetTreesForTesting() {
|
| if (active_tree_)
|
| active_tree_->DetachLayers();
|
| - active_tree_ =
|
| - base::MakeUnique<LayerTreeImpl>(this, active_tree()->page_scale_factor(),
|
| - active_tree()->top_controls_shown_ratio(),
|
| - active_tree()->elastic_overscroll());
|
| + active_tree_ = base::MakeUnique<LayerTreeImpl>(
|
| + this, active_tree()->page_scale_factor(),
|
| + active_tree()->subframe_page_scale_factor(),
|
| + active_tree()->top_controls_shown_ratio(),
|
| + active_tree()->elastic_overscroll());
|
| active_tree_->property_trees()->is_active = true;
|
| if (pending_tree_)
|
| pending_tree_->DetachLayers();
|
| @@ -1526,6 +1527,7 @@ CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const {
|
| active_tree_->device_scale_factor();
|
|
|
| metadata.page_scale_factor = active_tree_->current_page_scale_factor();
|
| + // TODO(wjmaclean): Should we expose subframe PSF here?
|
| metadata.scrollable_viewport_size = active_tree_->ScrollableViewportSize();
|
| metadata.root_layer_size = active_tree_->ScrollableSize();
|
| metadata.min_page_scale_factor = active_tree_->min_page_scale_factor();
|
| @@ -1930,6 +1932,7 @@ void LayerTreeHostImpl::CreatePendingTree() {
|
| } else {
|
| pending_tree_ = base::MakeUnique<LayerTreeImpl>(
|
| this, active_tree()->page_scale_factor(),
|
| + active_tree()->subframe_page_scale_factor(),
|
| active_tree()->top_controls_shown_ratio(),
|
| active_tree()->elastic_overscroll());
|
| }
|
| @@ -3291,9 +3294,13 @@ void LayerTreeHostImpl::PinchGestureBegin() {
|
| void LayerTreeHostImpl::PinchGestureUpdate(float magnify_delta,
|
| const gfx::Point& anchor) {
|
| TRACE_EVENT0("cc", "LayerTreeHostImpl::PinchGestureUpdate");
|
| - if (!InnerViewportScrollLayer())
|
| - return;
|
| - viewport()->PinchUpdate(magnify_delta, anchor);
|
| + if (InnerViewportScrollLayer()) {
|
| + viewport()->PinchUpdate(magnify_delta, anchor);
|
| + } else {
|
| + float subframe_page_scale = active_tree_->GetSubframePageScaleFactor();
|
| + subframe_page_scale *= magnify_delta;
|
| + active_tree_->SetSubframePageScaleOnActiveTree(subframe_page_scale);
|
| + }
|
| client_->SetNeedsCommitOnImplThread();
|
| SetNeedsRedraw();
|
| client_->RenewTreePriority();
|
|
|