Chromium Code Reviews| Index: cc/trees/layer_tree_impl.cc |
| diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc |
| index 4604043663920750438b5de260b0d8a0249d36b2..1ba1609c2c82f3b9e175a555f9844ac066d4e131 100644 |
| --- a/cc/trees/layer_tree_impl.cc |
| +++ b/cc/trees/layer_tree_impl.cc |
| @@ -7,6 +7,8 @@ |
| #include "base/debug/trace_event.h" |
| #include "cc/animation/keyframed_animation_curve.h" |
| #include "cc/animation/scrollbar_animation_controller.h" |
| +#include "cc/base/math_util.h" |
| +#include "cc/base/util.h" |
| #include "cc/debug/traced_value.h" |
| #include "cc/layers/heads_up_display_layer_impl.h" |
| #include "cc/layers/layer.h" |
| @@ -238,6 +240,14 @@ gfx::SizeF LayerTreeImpl::ScrollableViewportSize() const { |
| 1.0f / total_page_scale_factor()); |
| } |
| +gfx::Rect LayerTreeImpl::RootScrollLayerDeviceViewportBounds() const { |
| + if (!root_scroll_layer_) |
| + return gfx::Rect(); |
| + return MathUtil::MapClippedRect( |
| + root_scroll_layer_->screen_space_transform(), |
| + gfx::Rect(root_scroll_layer_->content_bounds())); |
|
enne (OOO)
2013/11/05 01:05:17
I think this should do the same thing as Scrollabl
aelias_OOO_until_Jul13
2013/11/05 01:15:18
As far as I know, the Blink bug causing that to oc
ccameron
2013/11/05 01:15:20
Okay -- updated to use root scroll layer's first c
|
| +} |
| + |
| void LayerTreeImpl::UpdateMaxScrollOffset() { |
| LayerImpl* root_scroll = RootScrollLayer(); |
| if (!root_scroll || !root_scroll->children().size()) |