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 "cc/layer_impl.h" | 7 #include "cc/layer_impl.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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 } | 207 } |
208 | 208 |
209 if (!screenSpaceTransform().isInvertible()) { | 209 if (!screenSpaceTransform().isInvertible()) { |
210 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored nonInvertibleTransform "); | 210 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored nonInvertibleTransform "); |
211 return InputHandlerClient::ScrollIgnored; | 211 return InputHandlerClient::ScrollIgnored; |
212 } | 212 } |
213 | 213 |
214 if (!nonFastScrollableRegion().IsEmpty()) { | 214 if (!nonFastScrollableRegion().IsEmpty()) { |
215 bool clipped = false; | 215 bool clipped = false; |
216 gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(screenSp aceTransform().inverse(), screenSpacePoint, clipped); | 216 gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(screenSp aceTransform().inverse(), screenSpacePoint, clipped); |
217 gfx::PointF hitTestPointInLayerSpace = hitTestPointInContentSpace.Scale( 1 / contentsScaleX(), 1 / contentsScaleY()); | 217 gfx::PointF hitTestPointInLayerSpace = gfx::ScalePoint(hitTestPointInCon tentSpace, 1 / contentsScaleX(), 1 / contentsScaleY()); |
sky
2012/11/09 16:54:53
Dare I ask, how come the code in cc isn't followin
danakj
2012/11/09 17:04:25
We've fixed some of the style guide rules, but not
| |
218 if (!clipped && nonFastScrollableRegion().Contains(gfx::ToRoundedPoint(h itTestPointInLayerSpace))) { | 218 if (!clipped && nonFastScrollableRegion().Contains(gfx::ToRoundedPoint(h itTestPointInLayerSpace))) { |
219 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed nonFastScrollableRe gion"); | 219 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed nonFastScrollableRe gion"); |
220 return InputHandlerClient::ScrollOnMainThread; | 220 return InputHandlerClient::ScrollOnMainThread; |
221 } | 221 } |
222 } | 222 } |
223 | 223 |
224 if (type == InputHandlerClient::Wheel && haveWheelEventHandlers()) { | 224 if (type == InputHandlerClient::Wheel && haveWheelEventHandlers()) { |
225 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed wheelEventHandlers"); | 225 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed wheelEventHandlers"); |
226 return InputHandlerClient::ScrollOnMainThread; | 226 return InputHandlerClient::ScrollOnMainThread; |
227 } | 227 } |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
701 | 701 |
702 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) | 702 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) |
703 { | 703 { |
704 if (!m_scrollbarAnimationController) | 704 if (!m_scrollbarAnimationController) |
705 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is); | 705 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is); |
706 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 706 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
707 m_scrollbarAnimationController->updateScrollOffset(this); | 707 m_scrollbarAnimationController->updateScrollOffset(this); |
708 } | 708 } |
709 | 709 |
710 } // namespace cc | 710 } // namespace cc |
OLD | NEW |