diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-26 12:17:21 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-26 12:17:55 +0000 |
commit | c3d0bb5bb15d008606b18b865841e19cd9bb5847 (patch) | |
tree | 25706f444200c7c4895371e78075b98f6f4c020b /chromium/cc | |
parent | 3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859 (diff) | |
download | qtwebengine-chromium-c3d0bb5bb15d008606b18b865841e19cd9bb5847.tar.gz |
BASELINE: Update chromium to 45.0.2454.79
Also remove third_party trace-viewer and hunspell again.
Change-Id: Iee0b3b27abcef9b1e87a0e39b71f6b785d1d19be
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'chromium/cc')
-rw-r--r-- | chromium/cc/trees/layer_tree_host_impl.cc | 14 | ||||
-rw-r--r-- | chromium/cc/trees/layer_tree_host_impl_unittest.cc | 19 |
2 files changed, 28 insertions, 5 deletions
diff --git a/chromium/cc/trees/layer_tree_host_impl.cc b/chromium/cc/trees/layer_tree_host_impl.cc index f616d517a3f..f122aeb58b9 100644 --- a/chromium/cc/trees/layer_tree_host_impl.cc +++ b/chromium/cc/trees/layer_tree_host_impl.cc @@ -1785,12 +1785,16 @@ void LayerTreeHostImpl::UpdateViewportContainerSizes() { // TODO(bokan): This code is currently specific to top controls. It should be // made general. crbug.com/464814. if (!TopControlsHeight()) { - if (outer_container) - outer_container->SetBoundsDelta(gfx::Vector2dF()); - inner_container->SetBoundsDelta(gfx::Vector2dF()); active_tree_->InnerViewportScrollLayer()->SetBoundsDelta(gfx::Vector2dF()); + if (outer_container) { + outer_container->SetBoundsDelta(gfx::Vector2dF()); + ViewportAnchor anchor(InnerViewportScrollLayer(), + OuterViewportScrollLayer()); + anchor.ResetViewportToAnchoredPosition(); + } + return; } @@ -1931,10 +1935,10 @@ void LayerTreeHostImpl::ActivateSyncTree() { DCHECK(!recycle_tree_); pending_tree_.swap(recycle_tree_); + UpdateViewportContainerSizes(); + active_tree_->SetRootLayerScrollOffsetDelegate( root_layer_scroll_offset_delegate_); - - UpdateViewportContainerSizes(); } else { active_tree_->ProcessUIResourceRequestQueue(); } diff --git a/chromium/cc/trees/layer_tree_host_impl_unittest.cc b/chromium/cc/trees/layer_tree_host_impl_unittest.cc index daa179f62eb..d20e603fd0c 100644 --- a/chromium/cc/trees/layer_tree_host_impl_unittest.cc +++ b/chromium/cc/trees/layer_tree_host_impl_unittest.cc @@ -2705,6 +2705,25 @@ TEST_F(LayerTreeHostImplTest, ScrollRootIgnored) { EXPECT_FALSE(did_request_commit_); } +TEST_F(LayerTreeHostImplTest, ClampingAfterActivation) { + host_impl_->CreatePendingTree(); + CreateScrollAndContentsLayers(host_impl_->pending_tree(), + gfx::Size(100, 100)); + host_impl_->ActivateSyncTree(); + + host_impl_->CreatePendingTree(); + const gfx::ScrollOffset pending_scroll = gfx::ScrollOffset(-100, -100); + LayerImpl* active_outer_layer = + host_impl_->active_tree()->OuterViewportScrollLayer(); + LayerImpl* pending_outer_layer = + host_impl_->pending_tree()->OuterViewportScrollLayer(); + pending_outer_layer->PushScrollOffsetFromMainThread(pending_scroll); + + host_impl_->ActivateSyncTree(); + // Scrolloffsets on the active tree will be clamped after activation. + EXPECT_EQ(active_outer_layer->CurrentScrollOffset(), gfx::ScrollOffset(0, 0)); +} + // TODO(bokan): Convert these tests to create inner and outer viewports. class LayerTreeHostImplTopControlsTest : public LayerTreeHostImplTest { public: |