OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "cc/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/debug/trace_event_argument.h" | 8 #include "base/debug/trace_event_argument.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 } | 1261 } |
1262 | 1262 |
1263 void LayerImpl::SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, | 1263 void LayerImpl::SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, |
1264 LayerImpl* scrollbar_clip_layer, | 1264 LayerImpl* scrollbar_clip_layer, |
1265 bool on_resize) const { | 1265 bool on_resize) const { |
1266 DCHECK(scrollbar_layer); | 1266 DCHECK(scrollbar_layer); |
1267 LayerImpl* page_scale_layer = layer_tree_impl()->page_scale_layer(); | 1267 LayerImpl* page_scale_layer = layer_tree_impl()->page_scale_layer(); |
1268 | 1268 |
1269 DCHECK(this != page_scale_layer); | 1269 DCHECK(this != page_scale_layer); |
1270 DCHECK(scrollbar_clip_layer); | 1270 DCHECK(scrollbar_clip_layer); |
1271 DCHECK(this != layer_tree_impl()->InnerViewportScrollLayer() || | |
1272 IsContainerForFixedPositionLayers()); | |
1273 gfx::RectF clip_rect(gfx::PointF(), | 1271 gfx::RectF clip_rect(gfx::PointF(), |
1274 scrollbar_clip_layer->BoundsForScrolling()); | 1272 scrollbar_clip_layer->BoundsForScrolling()); |
1275 | 1273 |
1276 // See comment in MaxScrollOffset() regarding the use of the content layer | 1274 // See comment in MaxScrollOffset() regarding the use of the content layer |
1277 // bounds here. | 1275 // bounds here. |
1278 gfx::RectF scroll_rect(gfx::PointF(), BoundsForScrolling()); | 1276 gfx::RectF scroll_rect(gfx::PointF(), BoundsForScrolling()); |
1279 | 1277 |
1280 if (scroll_rect.size().IsEmpty()) | 1278 if (scroll_rect.size().IsEmpty()) |
1281 return; | 1279 return; |
1282 | 1280 |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 | 1588 |
1591 void LayerImpl::NotifyAnimationFinished( | 1589 void LayerImpl::NotifyAnimationFinished( |
1592 base::TimeTicks monotonic_time, | 1590 base::TimeTicks monotonic_time, |
1593 Animation::TargetProperty target_property, | 1591 Animation::TargetProperty target_property, |
1594 int group) { | 1592 int group) { |
1595 if (target_property == Animation::ScrollOffset) | 1593 if (target_property == Animation::ScrollOffset) |
1596 layer_tree_impl_->InputScrollAnimationFinished(); | 1594 layer_tree_impl_->InputScrollAnimationFinished(); |
1597 } | 1595 } |
1598 | 1596 |
1599 } // namespace cc | 1597 } // namespace cc |
OLD | NEW |