| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
| 8 | 8 |
| 9 #include "CCLayerImpl.h" | 9 #include "CCLayerImpl.h" |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 void CCLayerImpl::removeFromParent() | 82 void CCLayerImpl::removeFromParent() |
| 83 { | 83 { |
| 84 if (!m_parent) | 84 if (!m_parent) |
| 85 return; | 85 return; |
| 86 | 86 |
| 87 CCLayerImpl* parent = m_parent; | 87 CCLayerImpl* parent = m_parent; |
| 88 m_parent = 0; | 88 m_parent = 0; |
| 89 | 89 |
| 90 for (size_t i = 0; i < parent->m_children.size(); ++i) { | 90 for (size_t i = 0; i < parent->m_children.size(); ++i) { |
| 91 if (parent->m_children[i].get() == this) { | 91 if (parent->m_children[i] == this) { |
| 92 parent->m_children.remove(i); | 92 parent->m_children.remove(i); |
| 93 return; | 93 return; |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 | 97 |
| 98 void CCLayerImpl::removeAllChildren() | 98 void CCLayerImpl::removeAllChildren() |
| 99 { | 99 { |
| 100 while (m_children.size()) | 100 while (m_children.size()) |
| 101 m_children[0]->removeFromParent(); | 101 m_children[0]->removeFromParent(); |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 if (!m_scrollbarAnimationController) | 619 if (!m_scrollbarAnimationController) |
| 620 m_scrollbarAnimationController = CCScrollbarAnimationController::create(
this); | 620 m_scrollbarAnimationController = CCScrollbarAnimationController::create(
this); |
| 621 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 621 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
| 622 m_scrollbarAnimationController->updateScrollOffset(this); | 622 m_scrollbarAnimationController->updateScrollOffset(this); |
| 623 } | 623 } |
| 624 | 624 |
| 625 } | 625 } |
| 626 | 626 |
| 627 | 627 |
| 628 #endif // USE(ACCELERATED_COMPOSITING) | 628 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |