Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1178)

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Fix nits Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
index 00b2e022398ea77ecf08ea9a5bc881fe503aeb5a..91c715962d6a175c94658900d4be421b447e417b 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
@@ -25,7 +25,6 @@
#include "platform/scroll/ScrollbarTheme.h"
-#include "platform/PlatformMouseEvent.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/Color.h"
#include "platform/graphics/GraphicsContext.h"
@@ -39,6 +38,7 @@
#include "platform/scroll/ScrollbarThemeMock.h"
#include "platform/scroll/ScrollbarThemeOverlayMock.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebMouseEvent.h"
#include "public/platform/WebPoint.h"
#include "public/platform/WebRect.h"
#include "public/platform/WebScrollbarBehavior.h"
@@ -219,9 +219,10 @@ void ScrollbarTheme::paintScrollCorner(
}
bool ScrollbarTheme::shouldCenterOnThumb(const ScrollbarThemeClient& scrollbar,
- const PlatformMouseEvent& evt) {
+ const WebMouseEvent& evt) {
return Platform::current()->scrollbarBehavior()->shouldCenterOnThumb(
- evt.pointerProperties().button, evt.shiftKey(), evt.altKey());
+ evt.button, evt.modifiers() & WebInputEvent::ShiftKey,
+ evt.modifiers() & WebInputEvent::AltKey);
}
void ScrollbarTheme::paintTickmarks(GraphicsContext& context,
@@ -270,8 +271,9 @@ void ScrollbarTheme::paintTickmarks(GraphicsContext& context,
bool ScrollbarTheme::shouldSnapBackToDragOrigin(
const ScrollbarThemeClient& scrollbar,
- const PlatformMouseEvent& evt) {
- IntPoint mousePosition = scrollbar.convertFromRootFrame(evt.position());
+ const WebMouseEvent& evt) {
+ IntPoint mousePosition = scrollbar.convertFromRootFrame(
+ flooredIntPoint(evt.positionInRootFrame()));
mousePosition.move(scrollbar.x(), scrollbar.y());
return Platform::current()->scrollbarBehavior()->shouldSnapBackToDragOrigin(
mousePosition, trackRect(scrollbar),

Powered by Google App Engine
This is Rietveld 408576698