Chromium Code Reviews| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 384 // Set masks to bounds so the compositor doesn't clobber a manually | 384 // Set masks to bounds so the compositor doesn't clobber a manually |
| 385 // set inner viewport container layer size. | 385 // set inner viewport container layer size. |
| 386 m_innerViewportContainerLayer->setMasksToBounds( | 386 m_innerViewportContainerLayer->setMasksToBounds( |
| 387 frameHost().settings().mainFrameClipsContent()); | 387 frameHost().settings().mainFrameClipsContent()); |
| 388 m_innerViewportContainerLayer->setSize(FloatSize(m_size)); | 388 m_innerViewportContainerLayer->setSize(FloatSize(m_size)); |
| 389 | 389 |
| 390 m_innerViewportScrollLayer->platformLayer()->setScrollClipLayer( | 390 m_innerViewportScrollLayer->platformLayer()->setScrollClipLayer( |
| 391 m_innerViewportContainerLayer->platformLayer()); | 391 m_innerViewportContainerLayer->platformLayer()); |
| 392 m_innerViewportScrollLayer->platformLayer()->setUserScrollable(true, true); | 392 m_innerViewportScrollLayer->platformLayer()->setUserScrollable(true, true); |
| 393 if (mainFrame()) { | 393 if (mainFrame()) { |
| 394 if (Document* document = mainFrame()->document()) | 394 if (Document* document = mainFrame()->document()) { |
| 395 m_innerViewportScrollLayer->setElementId(createCompositorElementId( | 395 m_innerViewportScrollLayer->setElementId(createCompositorElementId( |
| 396 DOMNodeIds::idForNode(document), CompositorSubElementId::Scroll)); | 396 DOMNodeIds::idForNode(document), CompositorSubElementId::Scroll)); |
|
bokan
2016/10/21 18:32:28
Should this be using the new Viewport subelement e
| |
| 397 } | |
| 397 } | 398 } |
| 398 | 399 |
| 399 m_rootTransformLayer->addChild(m_innerViewportContainerLayer.get()); | 400 m_rootTransformLayer->addChild(m_innerViewportContainerLayer.get()); |
| 400 m_innerViewportContainerLayer->addChild(m_overscrollElasticityLayer.get()); | 401 m_innerViewportContainerLayer->addChild(m_overscrollElasticityLayer.get()); |
| 401 m_overscrollElasticityLayer->addChild(m_pageScaleLayer.get()); | 402 m_overscrollElasticityLayer->addChild(m_pageScaleLayer.get()); |
| 402 m_pageScaleLayer->addChild(m_innerViewportScrollLayer.get()); | 403 m_pageScaleLayer->addChild(m_innerViewportScrollLayer.get()); |
| 403 | 404 |
| 404 // Ensure this class is set as the scroll layer's ScrollableArea. | 405 // Ensure this class is set as the scroll layer's ScrollableArea. |
| 405 coordinator->scrollableAreaScrollLayerDidChange(this); | 406 coordinator->scrollableAreaScrollLayerDidChange(this); |
| 406 | 407 |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 823 } else if (graphicsLayer == m_rootTransformLayer.get()) { | 824 } else if (graphicsLayer == m_rootTransformLayer.get()) { |
| 824 name = "Root Transform Layer"; | 825 name = "Root Transform Layer"; |
| 825 } else { | 826 } else { |
| 826 ASSERT_NOT_REACHED(); | 827 ASSERT_NOT_REACHED(); |
| 827 } | 828 } |
| 828 | 829 |
| 829 return name; | 830 return name; |
| 830 } | 831 } |
| 831 | 832 |
| 832 } // namespace blink | 833 } // namespace blink |
| OLD | NEW |