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

Side by Side Diff: content/renderer/render_widget.cc

Issue 2785533003: Animated scroll shouldn't consume unhandled scrolls for OOPIFs. (Closed)
Patch Set: Address nits, add comments. Created 3 years, 8 months 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 unified diff | Download patch
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 if (compositor_) 1273 if (compositor_)
1274 compositor_->SetViewportSize(physical_backing_size_); 1274 compositor_->SetViewportSize(physical_backing_size_);
1275 } 1275 }
1276 1276
1277 blink::WebLayerTreeView* RenderWidget::InitializeLayerTreeView() { 1277 blink::WebLayerTreeView* RenderWidget::InitializeLayerTreeView() {
1278 DCHECK(!host_closing_); 1278 DCHECK(!host_closing_);
1279 1279
1280 compositor_ = RenderWidgetCompositor::Create(this, compositor_deps_); 1280 compositor_ = RenderWidgetCompositor::Create(this, compositor_deps_);
1281 auto animation_host = cc::AnimationHost::CreateMainInstance(); 1281 auto animation_host = cc::AnimationHost::CreateMainInstance();
1282 1282
1283 // Oopif status must be set before the LayerTreeHost is created.
1284 compositor_->SetIsForOopif(for_oopif_);
1283 auto layer_tree_host = RenderWidgetCompositor::CreateLayerTreeHost( 1285 auto layer_tree_host = RenderWidgetCompositor::CreateLayerTreeHost(
1284 compositor_.get(), compositor_.get(), animation_host.get(), 1286 compositor_.get(), compositor_.get(), animation_host.get(),
1285 compositor_deps_, device_scale_factor_, screen_info_); 1287 compositor_deps_, device_scale_factor_, screen_info_);
1286 compositor_->Initialize(std::move(layer_tree_host), 1288 compositor_->Initialize(std::move(layer_tree_host),
1287 std::move(animation_host)); 1289 std::move(animation_host));
1288 1290
1289 compositor_->SetIsForOopif(for_oopif_);
1290 compositor_->SetViewportSize(physical_backing_size_); 1291 compositor_->SetViewportSize(physical_backing_size_);
1291 OnDeviceScaleFactorChanged(); 1292 OnDeviceScaleFactorChanged();
1292 compositor_->SetRasterColorSpace(screen_info_.icc_profile.GetColorSpace()); 1293 compositor_->SetRasterColorSpace(screen_info_.icc_profile.GetColorSpace());
1293 compositor_->SetContentSourceId(current_content_source_id_); 1294 compositor_->SetContentSourceId(current_content_source_id_);
1294 #if defined(USE_AURA) 1295 #if defined(USE_AURA)
1295 RendererWindowTreeClient* window_tree_client = 1296 RendererWindowTreeClient* window_tree_client =
1296 RendererWindowTreeClient::Get(routing_id_); 1297 RendererWindowTreeClient::Get(routing_id_);
1297 if (window_tree_client) 1298 if (window_tree_client)
1298 compositor_->SetLocalSurfaceId(window_tree_client->local_surface_id()); 1299 compositor_->SetLocalSurfaceId(window_tree_client->local_surface_id());
1299 #endif 1300 #endif
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 // browser side (https://crbug.com/669219). 2315 // browser side (https://crbug.com/669219).
2315 // If there is no WebFrameWidget, then there will be no 2316 // If there is no WebFrameWidget, then there will be no
2316 // InputMethodControllers for a WebLocalFrame. 2317 // InputMethodControllers for a WebLocalFrame.
2317 return nullptr; 2318 return nullptr;
2318 } 2319 }
2319 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2320 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2320 ->GetActiveWebInputMethodController(); 2321 ->GetActiveWebInputMethodController();
2321 } 2322 }
2322 2323
2323 } // namespace content 2324 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698