| OLD | NEW |
| 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 Loading... |
| 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 CreateCompositorElementId(DOMNodeIds::IdForNode(document), |
| 368 CompositorElementIdNamespace::kViewport)); |
| 368 } | 369 } |
| 369 } | 370 } |
| 370 | 371 |
| 371 root_transform_layer_->AddChild(inner_viewport_container_layer_.get()); | 372 root_transform_layer_->AddChild(inner_viewport_container_layer_.get()); |
| 372 inner_viewport_container_layer_->AddChild(overscroll_elasticity_layer_.get()); | 373 inner_viewport_container_layer_->AddChild(overscroll_elasticity_layer_.get()); |
| 373 overscroll_elasticity_layer_->AddChild(page_scale_layer_.get()); | 374 overscroll_elasticity_layer_->AddChild(page_scale_layer_.get()); |
| 374 page_scale_layer_->AddChild(inner_viewport_scroll_layer_.get()); | 375 page_scale_layer_->AddChild(inner_viewport_scroll_layer_.get()); |
| 375 | 376 |
| 376 // Ensure this class is set as the scroll layer's ScrollableArea. | 377 // Ensure this class is set as the scroll layer's ScrollableArea. |
| 377 coordinator->ScrollableAreaScrollLayerDidChange(this); | 378 coordinator->ScrollableAreaScrollLayerDidChange(this); |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 } else if (graphics_layer == root_transform_layer_.get()) { | 857 } else if (graphics_layer == root_transform_layer_.get()) { |
| 857 name = "Root Transform Layer"; | 858 name = "Root Transform Layer"; |
| 858 } else { | 859 } else { |
| 859 NOTREACHED(); | 860 NOTREACHED(); |
| 860 } | 861 } |
| 861 | 862 |
| 862 return name; | 863 return name; |
| 863 } | 864 } |
| 864 | 865 |
| 865 } // namespace blink | 866 } // namespace blink |
| OLD | NEW |