summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 03:55:38 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-30 03:55:38 +0000
commitc19c953d175ab92aa790227ae007188c73986134 (patch)
tree8790c7bea1727a679f83f34ba38188bb781f4bfd /ui/base
parent9ecad220ad03c147c0f75c3d167614eeffa7d0b2 (diff)
downloadchromium_src-c19c953d175ab92aa790227ae007188c73986134.zip
chromium_src-c19c953d175ab92aa790227ae007188c73986134.tar.gz
chromium_src-c19c953d175ab92aa790227ae007188c73986134.tar.bz2
Initialize ScrollEvent offsets for ET_SCROLL_FLING_CANCEL
And app list should not process ET_SCROLL_FLING_CANCEL in its scroll event handler. BUG=162125 TEST=Verify no unexpected scrolling in app list. R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11419214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r--ui/base/events/event.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/base/events/event.cc b/ui/base/events/event.cc
index 27d5fc9..4658e46 100644
--- a/ui/base/events/event.cc
+++ b/ui/base/events/event.cc
@@ -510,9 +510,13 @@ ScrollEvent::ScrollEvent(const base::NativeEvent& native_event)
GetScrollOffsets(native_event, &x_offset_, &y_offset_, &finger_count_);
double start, end;
GetGestureTimes(native_event, &start, &end);
- } else if (type() == ET_SCROLL_FLING_START) {
+ } else if (type() == ET_SCROLL_FLING_START ||
+ type() == ET_SCROLL_FLING_CANCEL) {
bool is_cancel;
GetFlingData(native_event, &x_offset_, &y_offset_, &is_cancel);
+ } else {
+ NOTREACHED() << "Unexpected event type " << type()
+ << " when constructing a ScrollEvent.";
}
}