👕 Remove linter errors

This commit is contained in:
Kevin Sawicki 2017-06-29 16:50:55 -07:00 committed by Aleksei Kuzmin
parent c7cf844bcd
commit 4bb95acc2b
6 changed files with 33 additions and 20 deletions

View file

@ -5,6 +5,8 @@
#include "atom/browser/osr/osr_render_widget_host_view.h"
#include <algorithm>
#include <memory>
#include <utility>
#include <vector>
#include "base/callback_helpers.h"
@ -90,10 +92,11 @@ ui::MouseEvent UiMouseEventFromWebMouseEvent(blink::WebMouseEvent event) {
}
ui::MouseEvent ui_event(type,
gfx::Point(std::floor(event.PositionInWidget().x), std::floor(event.PositionInWidget().y)),
gfx::Point(std::floor(event.PositionInWidget().x), std::floor(event.PositionInWidget().y)),
ui::EventTimeForNow(),
button_flags, button_flags);
gfx::Point(std::floor(event.PositionInWidget().x),
std::floor(event.PositionInWidget().y)),
gfx::Point(std::floor(event.PositionInWidget().x),
std::floor(event.PositionInWidget().y)),
ui::EventTimeForNow(), button_flags, button_flags);
ui_event.SetClickCount(event.click_count);
return ui_event;
@ -1111,7 +1114,8 @@ void OffScreenRenderWidgetHostView::ProcessMouseEvent(
const ui::LatencyInfo& latency) {
for (auto proxy_view : proxy_views_) {
gfx::Rect bounds = proxy_view->GetBounds();
if (bounds.Contains(event.PositionInWidget().x, event.PositionInWidget().y)) {
if (bounds.Contains(event.PositionInWidget().x,
event.PositionInWidget().y)) {
blink::WebMouseEvent proxy_event(event);
proxy_event.SetPositionInWidget(
proxy_event.PositionInWidget().x - bounds.x(),
@ -1128,8 +1132,10 @@ void OffScreenRenderWidgetHostView::ProcessMouseEvent(
event.PositionInWidget().x, event.PositionInWidget().y)) {
blink::WebMouseEvent popup_event(event);
popup_event.SetPositionInWidget(
popup_event.PositionInWidget().x - popup_host_view_->popup_position_.x(),
popup_event.PositionInWidget().y - popup_host_view_->popup_position_.y());
popup_event.PositionInWidget().x -
popup_host_view_->popup_position_.x(),
popup_event.PositionInWidget().y -
popup_host_view_->popup_position_.y());
popup_host_view_->ProcessMouseEvent(popup_event, latency);
return;
@ -1146,7 +1152,8 @@ void OffScreenRenderWidgetHostView::ProcessMouseWheelEvent(
const ui::LatencyInfo& latency) {
for (auto proxy_view : proxy_views_) {
gfx::Rect bounds = proxy_view->GetBounds();
if (bounds.Contains(event.PositionInWidget().x, event.PositionInWidget().y)) {
if (bounds.Contains(event.PositionInWidget().x,
event.PositionInWidget().y)) {
blink::WebMouseWheelEvent proxy_event(event);
proxy_event.SetPositionInWidget(
proxy_event.PositionInWidget().x - bounds.x(),
@ -1164,8 +1171,10 @@ void OffScreenRenderWidgetHostView::ProcessMouseWheelEvent(
event.PositionInWidget().x, event.PositionInWidget().y)) {
blink::WebMouseWheelEvent popup_event(event);
popup_event.SetPositionInWidget(
popup_event.PositionInWidget().x - popup_host_view_->popup_position_.x(),
popup_event.PositionInWidget().y - popup_host_view_->popup_position_.y());
popup_event.PositionInWidget().x -
popup_host_view_->popup_position_.x(),
popup_event.PositionInWidget().y -
popup_host_view_->popup_position_.y());
popup_host_view_->ProcessMouseWheelEvent(popup_event, latency);
return;
} else {