blob: 4384906b1aa13e059a449b7dd6d727b4e38d88f5 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "public/platform/WebMouseWheelEvent.h"
namespace blink {
float WebMouseWheelEvent::DeltaXInRootFrame() const {
return delta_x / frame_scale_;
}
float WebMouseWheelEvent::DeltaYInRootFrame() const {
return delta_y / frame_scale_;
}
WebMouseWheelEvent WebMouseWheelEvent::FlattenTransform() const {
WebMouseWheelEvent result = *this;
result.delta_x /= result.frame_scale_;
result.delta_y /= result.frame_scale_;
result.FlattenTransformSelf();
return result;
}
} // namespace blink