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

Side by Side Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 2840143002: [cc] Change semantics of fixed-pos container layer
Patch Set: Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 // FIXME: The root transform layer should only be created on demand. 341 // FIXME: The root transform layer should only be created on demand.
342 root_transform_layer_ = GraphicsLayer::Create(this); 342 root_transform_layer_ = GraphicsLayer::Create(this);
343 inner_viewport_container_layer_ = GraphicsLayer::Create(this); 343 inner_viewport_container_layer_ = GraphicsLayer::Create(this);
344 overscroll_elasticity_layer_ = GraphicsLayer::Create(this); 344 overscroll_elasticity_layer_ = GraphicsLayer::Create(this);
345 page_scale_layer_ = GraphicsLayer::Create(this); 345 page_scale_layer_ = GraphicsLayer::Create(this);
346 inner_viewport_scroll_layer_ = GraphicsLayer::Create(this); 346 inner_viewport_scroll_layer_ = GraphicsLayer::Create(this);
347 overlay_scrollbar_horizontal_ = GraphicsLayer::Create(this); 347 overlay_scrollbar_horizontal_ = GraphicsLayer::Create(this);
348 overlay_scrollbar_vertical_ = GraphicsLayer::Create(this); 348 overlay_scrollbar_vertical_ = GraphicsLayer::Create(this);
349 349
350 // What is it really for? Are there any fixed-pos layers positioned
351 // by the VisualViewport actually?
bokan 2017/04/26 21:17:56 I believe this was a temporary state meant only to
trchen 2017/05/01 21:24:13 I removed it in patch set 2, but on a second thoug
350 ScrollingCoordinator* coordinator = GetPage().GetScrollingCoordinator(); 352 ScrollingCoordinator* coordinator = GetPage().GetScrollingCoordinator();
351 DCHECK(coordinator); 353 DCHECK(coordinator);
352 coordinator->SetLayerIsContainerForFixedPositionLayers( 354 coordinator->SetLayerIsContainerForFixedPositionLayers(
353 inner_viewport_scroll_layer_.get(), true); 355 page_scale_layer_.get(), true);
354 356
355 // Set masks to bounds so the compositor doesn't clobber a manually 357 // Set masks to bounds so the compositor doesn't clobber a manually
356 // set inner viewport container layer size. 358 // set inner viewport container layer size.
357 inner_viewport_container_layer_->SetMasksToBounds( 359 inner_viewport_container_layer_->SetMasksToBounds(
358 GetPage().GetSettings().GetMainFrameClipsContent()); 360 GetPage().GetSettings().GetMainFrameClipsContent());
359 inner_viewport_container_layer_->SetSize(FloatSize(size_)); 361 inner_viewport_container_layer_->SetSize(FloatSize(size_));
360 362
361 inner_viewport_scroll_layer_->PlatformLayer()->SetScrollClipLayer( 363 inner_viewport_scroll_layer_->PlatformLayer()->SetScrollClipLayer(
362 inner_viewport_container_layer_->PlatformLayer()); 364 inner_viewport_container_layer_->PlatformLayer());
363 inner_viewport_scroll_layer_->PlatformLayer()->SetUserScrollable(true, true); 365 inner_viewport_scroll_layer_->PlatformLayer()->SetUserScrollable(true, true);
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 } else if (graphics_layer == root_transform_layer_.get()) { 854 } else if (graphics_layer == root_transform_layer_.get()) {
853 name = "Root Transform Layer"; 855 name = "Root Transform Layer";
854 } else { 856 } else {
855 ASSERT_NOT_REACHED(); 857 ASSERT_NOT_REACHED();
856 } 858 }
857 859
858 return name; 860 return name;
859 } 861 }
860 862
861 } // namespace blink 863 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698