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,
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()) {
......
......@@ -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>
......
......@@ -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))
......
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