| 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 #include "CCLayerImpl.h" | 7 #include "CCLayerImpl.h" | 
| 8 | 8 | 
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" | 
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" | 
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 220     if (!scrollable()) { | 220     if (!scrollable()) { | 
| 221         TRACE_EVENT0("cc", "CCLayerImpl::tryScroll: Ignored not scrollable"); | 221         TRACE_EVENT0("cc", "CCLayerImpl::tryScroll: Ignored not scrollable"); | 
| 222         return CCInputHandlerClient::ScrollIgnored; | 222         return CCInputHandlerClient::ScrollIgnored; | 
| 223     } | 223     } | 
| 224 | 224 | 
| 225     return CCInputHandlerClient::ScrollStarted; | 225     return CCInputHandlerClient::ScrollStarted; | 
| 226 } | 226 } | 
| 227 | 227 | 
| 228 bool CCLayerImpl::drawCheckerboardForMissingTiles() const | 228 bool CCLayerImpl::drawCheckerboardForMissingTiles() const | 
| 229 { | 229 { | 
| 230     return m_drawCheckerboardForMissingTiles && !CCSettings::backgroundColorInst
     eadOfCheckerboard(); | 230     return m_drawCheckerboardForMissingTiles && !Settings::backgroundColorInstea
     dOfCheckerboard(); | 
| 231 } | 231 } | 
| 232 | 232 | 
| 233 IntRect CCLayerImpl::layerRectToContentRect(const WebKit::WebRect& layerRect) | 233 IntRect CCLayerImpl::layerRectToContentRect(const WebKit::WebRect& layerRect) | 
| 234 { | 234 { | 
| 235     float widthScale = static_cast<float>(contentBounds().width()) / bounds().wi
     dth(); | 235     float widthScale = static_cast<float>(contentBounds().width()) / bounds().wi
     dth(); | 
| 236     float heightScale = static_cast<float>(contentBounds().height()) / bounds().
     height(); | 236     float heightScale = static_cast<float>(contentBounds().height()) / bounds().
     height(); | 
| 237     FloatRect contentRect(layerRect.x, layerRect.y, layerRect.width, layerRect.h
     eight); | 237     FloatRect contentRect(layerRect.x, layerRect.y, layerRect.width, layerRect.h
     eight); | 
| 238     contentRect.scale(widthScale, heightScale); | 238     contentRect.scale(widthScale, heightScale); | 
| 239     return enclosingIntRect(contentRect); | 239     return enclosingIntRect(contentRect); | 
| 240 } | 240 } | 
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 671 | 671 | 
| 672 void CCLayerImpl::setVerticalScrollbarLayer(CCScrollbarLayerImpl* scrollbarLayer
     ) | 672 void CCLayerImpl::setVerticalScrollbarLayer(CCScrollbarLayerImpl* scrollbarLayer
     ) | 
| 673 { | 673 { | 
| 674     if (!m_scrollbarAnimationController) | 674     if (!m_scrollbarAnimationController) | 
| 675         m_scrollbarAnimationController = CCScrollbarAnimationController::create(
     this); | 675         m_scrollbarAnimationController = CCScrollbarAnimationController::create(
     this); | 
| 676     m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 676     m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 
| 677     m_scrollbarAnimationController->updateScrollOffset(this); | 677     m_scrollbarAnimationController->updateScrollOffset(this); | 
| 678 } | 678 } | 
| 679 | 679 | 
| 680 } | 680 } | 
| OLD | NEW | 
|---|