| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 327 |
| 328 initializeScrollbars(); | 328 initializeScrollbars(); |
| 329 } | 329 } |
| 330 | 330 |
| 331 m_innerViewportScrollLayer->removeAllChildren(); | 331 m_innerViewportScrollLayer->removeAllChildren(); |
| 332 m_innerViewportScrollLayer->addChild(currentLayerTreeRoot); | 332 m_innerViewportScrollLayer->addChild(currentLayerTreeRoot); |
| 333 } | 333 } |
| 334 | 334 |
| 335 void VisualViewport::initializeScrollbars() | 335 void VisualViewport::initializeScrollbars() |
| 336 { | 336 { |
| 337 // Do nothing if not attached to layer tree yet - will initialize upon attac
h. |
| 338 if (!m_innerViewportContainerLayer) |
| 339 return; |
| 340 |
| 337 if (visualViewportSuppliesScrollbars()) { | 341 if (visualViewportSuppliesScrollbars()) { |
| 338 if (!m_overlayScrollbarHorizontal->parent()) | 342 if (!m_overlayScrollbarHorizontal->parent()) |
| 339 m_innerViewportContainerLayer->addChild(m_overlayScrollbarHorizontal
.get()); | 343 m_innerViewportContainerLayer->addChild(m_overlayScrollbarHorizontal
.get()); |
| 340 if (!m_overlayScrollbarVertical->parent()) | 344 if (!m_overlayScrollbarVertical->parent()) |
| 341 m_innerViewportContainerLayer->addChild(m_overlayScrollbarVertical.g
et()); | 345 m_innerViewportContainerLayer->addChild(m_overlayScrollbarVertical.g
et()); |
| 342 } else { | 346 } else { |
| 343 m_overlayScrollbarHorizontal->removeFromParent(); | 347 m_overlayScrollbarHorizontal->removeFromParent(); |
| 344 m_overlayScrollbarVertical->removeFromParent(); | 348 m_overlayScrollbarVertical->removeFromParent(); |
| 345 } | 349 } |
| 346 | 350 |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 } else if (graphicsLayer == m_rootTransformLayer) { | 744 } else if (graphicsLayer == m_rootTransformLayer) { |
| 741 name = "Root Transform Layer"; | 745 name = "Root Transform Layer"; |
| 742 } else { | 746 } else { |
| 743 ASSERT_NOT_REACHED(); | 747 ASSERT_NOT_REACHED(); |
| 744 } | 748 } |
| 745 | 749 |
| 746 return name; | 750 return name; |
| 747 } | 751 } |
| 748 | 752 |
| 749 } // namespace blink | 753 } // namespace blink |
| OLD | NEW |