diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-27 17:28:29 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-27 17:28:29 +0000 |
commit | 39ed8520e9ed03c2da702510436a1959e559b53f (patch) | |
tree | 30d71b33243173d2a52983c29171d06bbea36735 /ui | |
parent | c467898d5921c269494662dd3f9fda37e461c166 (diff) | |
download | chromium_src-39ed8520e9ed03c2da702510436a1959e559b53f.zip chromium_src-39ed8520e9ed03c2da702510436a1959e559b53f.tar.gz chromium_src-39ed8520e9ed03c2da702510436a1959e559b53f.tar.bz2 |
aura: Fix propagating wheel events.
BUG=144785
Review URL: https://chromiumcodereview.appspot.com/10868096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/base/event.cc | 16 | ||||
-rw-r--r-- | ui/base/event.h | 8 | ||||
-rw-r--r-- | ui/views/widget/native_widget_aura.cc | 6 |
3 files changed, 2 insertions, 28 deletions
diff --git a/ui/base/event.cc b/ui/base/event.cc index 1b31197..bb4af75 100644 --- a/ui/base/event.cc +++ b/ui/base/event.cc @@ -122,14 +122,6 @@ LocatedEvent::LocatedEvent(EventType type, system_location_(0, 0) { } -LocatedEvent::LocatedEvent(const LocatedEvent& model) - : Event(model), - location_(model.location_), - root_location_(model.root_location_), - valid_system_location_(model.valid_system_location_), - system_location_(model.system_location_) { -} - void LocatedEvent::UpdateForRootTransform(const Transform& root_transform) { // Transform has to be done at root level. DCHECK_EQ(root_location_.x(), location_.x()); @@ -245,9 +237,6 @@ void MouseEvent::SetClickCount(int click_count) { set_flags(f); } -MouseEvent::MouseEvent(const MouseEvent& model) : LocatedEvent(model) { -} - //////////////////////////////////////////////////////////////////////////////// // MouseWheelEvent @@ -256,11 +245,6 @@ MouseWheelEvent::MouseWheelEvent(const base::NativeEvent& native_event) offset_(GetMouseWheelOffset(native_event)) { } -MouseWheelEvent::MouseWheelEvent(const MouseEvent& mouse_event) - : MouseEvent(mouse_event), - offset_(GetMouseWheelOffset(mouse_event.native_event())) { -} - MouseWheelEvent::MouseWheelEvent(const ScrollEvent& scroll_event) : MouseEvent(scroll_event), offset_(scroll_event.y_offset()) { diff --git a/ui/base/event.h b/ui/base/event.h index fe4a1e4..bc388e3 100644 --- a/ui/base/event.h +++ b/ui/base/event.h @@ -172,9 +172,6 @@ class UI_EXPORT LocatedEvent : public Event { const gfx::Point& root_location, int flags); - // Called from MouseEvent's copy ctor. - explicit LocatedEvent(const LocatedEvent& model); - gfx::Point location_; // |location_| multiplied by an optional transformation matrix for @@ -266,10 +263,6 @@ class UI_EXPORT MouseEvent : public LocatedEvent { // flags. Use this to determine the button that was pressed or released. int changed_button_flags() const { return changed_button_flags_; } - protected: - // Called from MouseWheelEvent's ctor. - explicit MouseEvent(const MouseEvent& model); - private: // Returns the repeat count based on the previous mouse click, if it is // recent enough and within a small enough distance. @@ -291,7 +284,6 @@ class UI_EXPORT MouseWheelEvent : public MouseEvent { static const int kWheelDelta; explicit MouseWheelEvent(const base::NativeEvent& native_event); - explicit MouseWheelEvent(const MouseEvent& mouse_event); explicit MouseWheelEvent(const ScrollEvent& scroll_event); template <class T> diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc index 00e6e88..96c9e58 100644 --- a/ui/views/widget/native_widget_aura.cc +++ b/ui/views/widget/native_widget_aura.cc @@ -797,10 +797,8 @@ bool NativeWidgetAura::ShouldDescendIntoChildForEventHandling( bool NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) { DCHECK(window_->IsVisible()); - if (event->type() == ui::ET_MOUSEWHEEL) { - ui::MouseWheelEvent mwe(*event); - return delegate_->OnMouseEvent(mwe); - } + if (event->type() == ui::ET_MOUSEWHEEL) + return delegate_->OnMouseEvent(*event); if (event->type() == ui::ET_SCROLL) { if (delegate_->OnMouseEvent(*event)) |