Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Unified Diff: cc/layers/layer_impl.cc

Issue 115153009: Merge 239675 "cc: Allow 'overflow: hidden' layers to be scrolled..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
===================================================================
--- cc/layers/layer_impl.cc (revision 240986)
+++ cc/layers/layer_impl.cc (working copy)
@@ -345,16 +345,6 @@
gfx::Vector2dF LayerImpl::ScrollBy(gfx::Vector2dF scroll) {
DCHECK(scrollable());
- gfx::Vector2dF scroll_hidden;
- if (!user_scrollable_horizontal_) {
- scroll_hidden.set_x(scroll.x());
- scroll.set_x(0.f);
- }
- if (!user_scrollable_vertical_) {
- scroll_hidden.set_y(scroll.y());
- scroll.set_y(0.f);
- }
-
gfx::Vector2dF min_delta = -scroll_offset_;
gfx::Vector2dF max_delta = max_scroll_offset_ - scroll_offset_;
// Clamp new_delta so that position + delta stays within scroll bounds.
@@ -362,7 +352,7 @@
new_delta.SetToMax(min_delta);
new_delta.SetToMin(max_delta);
gfx::Vector2dF unscrolled =
- ScrollDelta() + scroll + scroll_hidden - new_delta;
+ ScrollDelta() + scroll - new_delta;
SetScrollDelta(new_delta);
return unscrolled;
}
@@ -463,13 +453,6 @@
return InputHandler::ScrollIgnored;
}
- if (!user_scrollable_horizontal_ && !user_scrollable_vertical_) {
- TRACE_EVENT0("cc",
- "LayerImpl::TryScroll: Ignored. User gesture is not allowed"
- " to scroll this layer.");
- return InputHandler::ScrollIgnored;
- }
-
return InputHandler::ScrollStarted;
}
« no previous file with comments | « no previous file | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698