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

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

Issue 2877033002: Fix cc scrollbar layer issues with initialization, and use element ids throughout. (Closed)
Patch Set: none 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // set inner viewport container layer size. 356 // set inner viewport container layer size.
357 inner_viewport_container_layer_->SetMasksToBounds( 357 inner_viewport_container_layer_->SetMasksToBounds(
358 GetPage().GetSettings().GetMainFrameClipsContent()); 358 GetPage().GetSettings().GetMainFrameClipsContent());
359 inner_viewport_container_layer_->SetSize(FloatSize(size_)); 359 inner_viewport_container_layer_->SetSize(FloatSize(size_));
360 360
361 inner_viewport_scroll_layer_->PlatformLayer()->SetScrollClipLayer( 361 inner_viewport_scroll_layer_->PlatformLayer()->SetScrollClipLayer(
362 inner_viewport_container_layer_->PlatformLayer()); 362 inner_viewport_container_layer_->PlatformLayer());
363 inner_viewport_scroll_layer_->PlatformLayer()->SetUserScrollable(true, true); 363 inner_viewport_scroll_layer_->PlatformLayer()->SetUserScrollable(true, true);
364 if (MainFrame()) { 364 if (MainFrame()) {
365 if (Document* document = MainFrame()->GetDocument()) { 365 if (Document* document = MainFrame()->GetDocument()) {
366 inner_viewport_scroll_layer_->SetElementId(CreateCompositorElementId( 366 inner_viewport_scroll_layer_->SetElementId(
367 DOMNodeIds::IdForNode(document), CompositorSubElementId::kViewport)); 367 CompositorElementIdFromDOMNodeId(
368 DOMNodeIds::IdForNode(document),
369 CompositorElementIdNamespace::kViewport));
368 } 370 }
369 } 371 }
370 372
371 root_transform_layer_->AddChild(inner_viewport_container_layer_.get()); 373 root_transform_layer_->AddChild(inner_viewport_container_layer_.get());
372 inner_viewport_container_layer_->AddChild(overscroll_elasticity_layer_.get()); 374 inner_viewport_container_layer_->AddChild(overscroll_elasticity_layer_.get());
373 overscroll_elasticity_layer_->AddChild(page_scale_layer_.get()); 375 overscroll_elasticity_layer_->AddChild(page_scale_layer_.get());
374 page_scale_layer_->AddChild(inner_viewport_scroll_layer_.get()); 376 page_scale_layer_->AddChild(inner_viewport_scroll_layer_.get());
375 377
376 // Ensure this class is set as the scroll layer's ScrollableArea. 378 // Ensure this class is set as the scroll layer's ScrollableArea.
377 coordinator->ScrollableAreaScrollLayerDidChange(this); 379 coordinator->ScrollableAreaScrollLayerDidChange(this);
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 } else if (graphics_layer == root_transform_layer_.get()) { 858 } else if (graphics_layer == root_transform_layer_.get()) {
857 name = "Root Transform Layer"; 859 name = "Root Transform Layer";
858 } else { 860 } else {
859 NOTREACHED(); 861 NOTREACHED();
860 } 862 }
861 863
862 return name; 864 return name;
863 } 865 }
864 866
865 } // namespace blink 867 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698