Commit 39ed8520 authored by sadrul@chromium.org's avatar sadrul@chromium.org

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
parent c467898d
...@@ -122,14 +122,6 @@ LocatedEvent::LocatedEvent(EventType type, ...@@ -122,14 +122,6 @@ LocatedEvent::LocatedEvent(EventType type,
system_location_(0, 0) { 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) { void LocatedEvent::UpdateForRootTransform(const Transform& root_transform) {
// Transform has to be done at root level. // Transform has to be done at root level.
DCHECK_EQ(root_location_.x(), location_.x()); DCHECK_EQ(root_location_.x(), location_.x());
...@@ -245,9 +237,6 @@ void MouseEvent::SetClickCount(int click_count) { ...@@ -245,9 +237,6 @@ void MouseEvent::SetClickCount(int click_count) {
set_flags(f); set_flags(f);
} }
MouseEvent::MouseEvent(const MouseEvent& model) : LocatedEvent(model) {
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// MouseWheelEvent // MouseWheelEvent
...@@ -256,11 +245,6 @@ MouseWheelEvent::MouseWheelEvent(const base::NativeEvent& native_event) ...@@ -256,11 +245,6 @@ MouseWheelEvent::MouseWheelEvent(const base::NativeEvent& native_event)
offset_(GetMouseWheelOffset(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) MouseWheelEvent::MouseWheelEvent(const ScrollEvent& scroll_event)
: MouseEvent(scroll_event), : MouseEvent(scroll_event),
offset_(scroll_event.y_offset()) { offset_(scroll_event.y_offset()) {
......
...@@ -172,9 +172,6 @@ class UI_EXPORT LocatedEvent : public Event { ...@@ -172,9 +172,6 @@ class UI_EXPORT LocatedEvent : public Event {
const gfx::Point& root_location, const gfx::Point& root_location,
int flags); int flags);
// Called from MouseEvent's copy ctor.
explicit LocatedEvent(const LocatedEvent& model);
gfx::Point location_; gfx::Point location_;
// |location_| multiplied by an optional transformation matrix for // |location_| multiplied by an optional transformation matrix for
...@@ -266,10 +263,6 @@ class UI_EXPORT MouseEvent : public LocatedEvent { ...@@ -266,10 +263,6 @@ class UI_EXPORT MouseEvent : public LocatedEvent {
// flags. Use this to determine the button that was pressed or released. // flags. Use this to determine the button that was pressed or released.
int changed_button_flags() const { return changed_button_flags_; } int changed_button_flags() const { return changed_button_flags_; }
protected:
// Called from MouseWheelEvent's ctor.
explicit MouseEvent(const MouseEvent& model);
private: private:
// Returns the repeat count based on the previous mouse click, if it is // Returns the repeat count based on the previous mouse click, if it is
// recent enough and within a small enough distance. // recent enough and within a small enough distance.
...@@ -291,7 +284,6 @@ class UI_EXPORT MouseWheelEvent : public MouseEvent { ...@@ -291,7 +284,6 @@ class UI_EXPORT MouseWheelEvent : public MouseEvent {
static const int kWheelDelta; static const int kWheelDelta;
explicit MouseWheelEvent(const base::NativeEvent& native_event); explicit MouseWheelEvent(const base::NativeEvent& native_event);
explicit MouseWheelEvent(const MouseEvent& mouse_event);
explicit MouseWheelEvent(const ScrollEvent& scroll_event); explicit MouseWheelEvent(const ScrollEvent& scroll_event);
template <class T> template <class T>
......
...@@ -797,10 +797,8 @@ bool NativeWidgetAura::ShouldDescendIntoChildForEventHandling( ...@@ -797,10 +797,8 @@ bool NativeWidgetAura::ShouldDescendIntoChildForEventHandling(
bool NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) { bool NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) {
DCHECK(window_->IsVisible()); DCHECK(window_->IsVisible());
if (event->type() == ui::ET_MOUSEWHEEL) { if (event->type() == ui::ET_MOUSEWHEEL)
ui::MouseWheelEvent mwe(*event); return delegate_->OnMouseEvent(*event);
return delegate_->OnMouseEvent(mwe);
}
if (event->type() == ui::ET_SCROLL) { if (event->type() == ui::ET_SCROLL) {
if (delegate_->OnMouseEvent(*event)) if (delegate_->OnMouseEvent(*event))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment