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

Unified Diff: third_party/WebKit/Source/core/page/AutoscrollController.h

Issue 2289213002: Implement Middle Click Autoscroll on all platforms not just Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into panscroll Created 4 years, 3 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/core/page/AutoscrollController.h
diff --git a/third_party/WebKit/Source/core/page/AutoscrollController.h b/third_party/WebKit/Source/core/page/AutoscrollController.h
index 3c19a2ee9b1e362d62b9c41966fb19bec3c426eb..6d95f39717c00e83e0adec1cd3a8ff19289f4a6c 100644
--- a/third_party/WebKit/Source/core/page/AutoscrollController.h
+++ b/third_party/WebKit/Source/core/page/AutoscrollController.h
@@ -44,42 +44,36 @@ enum AutoscrollType {
NoAutoscroll,
AutoscrollForDragAndDrop,
AutoscrollForSelection,
-#if OS(WIN)
- AutoscrollForPanCanStop,
- AutoscrollForPan,
-#endif
+ AutoscrollForMiddleClickCanStop,
+ AutoscrollForMiddleClick,
};
-// AutscrollController handels autoscroll and pan scroll for EventHandler.
+// AutscrollController handels autoscroll and middle click autoscroll for EventHandler.
class CORE_EXPORT AutoscrollController final : public GarbageCollected<AutoscrollController> {
public:
static AutoscrollController* create(Page&);
DECLARE_TRACE();
- static const int noPanScrollRadius = 15;
+ static const int noMiddleClickAutoscrollRadius = 15;
void animate(double monotonicFrameBeginTime);
bool autoscrollInProgress() const;
bool autoscrollInProgress(const LayoutBox*) const;
- bool panScrollInProgress() const;
+ bool middleClickAutoscrollInProgress() const;
void startAutoscrollForSelection(LayoutObject*);
void stopAutoscroll();
void stopAutoscrollIfNeeded(LayoutObject*);
void updateAutoscrollLayoutObject();
void updateDragAndDrop(Node* targetNode, const IntPoint& eventPosition, double eventTime);
-#if OS(WIN)
- void handleMouseReleaseForPanScrolling(LocalFrame*, const PlatformMouseEvent&);
- void startPanScrolling(LayoutBox*, const IntPoint&);
-#endif
+ void handleMouseReleaseForMiddleClickAutoscroll(LocalFrame*, const PlatformMouseEvent&);
+ void startMiddleClickAutoscroll(LayoutBox*, const IntPoint&);
private:
explicit AutoscrollController(Page&);
void startAutoscroll();
-#if OS(WIN)
- void updatePanScrollState(FrameView*, const IntPoint& lastKnownMousePosition);
-#endif
+ void updateMiddleClickAutoscrollState(FrameView*, const IntPoint& lastKnownMousePosition);
Member<Page> m_page;
LayoutBox* m_autoscrollLayoutObject;
@@ -87,9 +81,7 @@ private:
AutoscrollType m_autoscrollType;
IntPoint m_dragAndDropAutoscrollReferencePosition;
double m_dragAndDropAutoscrollStartTime;
-#if OS(WIN)
- IntPoint m_panScrollStartPos;
-#endif
+ IntPoint m_middleClickAutoscrollStartPos;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/page/AutoscrollController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698