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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandlerTest.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/input/EventHandler.h" 5 #include "core/input/EventHandler.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/Range.h" 8 #include "core/dom/Range.h"
9 #include "core/editing/Editor.h" 9 #include "core/editing/Editor.h"
10 #include "core/editing/FrameSelection.h" 10 #include "core/editing/FrameSelection.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 "<div class='lower'>" 66 "<div class='lower'>"
67 "<span class='line'>Line 1</span><span class='line'>Line 2</span><span " 67 "<span class='line'>Line 1</span><span class='line'>Line 2</span><span "
68 "class='line'>Line 3</span><span class='line'>Line 4</span><span " 68 "class='line'>Line 3</span><span class='line'>Line 4</span><span "
69 "class='line'>Line 5</span>" 69 "class='line'>Line 5</span>"
70 "<span class='line'>Line 6</span><span class='line'>Line 7</span><span " 70 "<span class='line'>Line 6</span><span class='line'>Line 7</span><span "
71 "class='line'>Line 8</span><span class='line'>Line 9</span><span " 71 "class='line'>Line 8</span><span class='line'>Line 9</span><span "
72 "class='line'>Line 10</span>" 72 "class='line'>Line 10</span>"
73 "</div>"); 73 "</div>");
74 74
75 FrameView* frameView = document().view(); 75 FrameView* frameView = document().view();
76 frameView->setScrollPosition(DoublePoint(0, 400), ProgrammaticScroll); 76 frameView->setScrollOffset(ScrollOffset(0, 400), ProgrammaticScroll);
77 77
78 PlatformMouseEvent mouseDownEvent( 78 PlatformMouseEvent mouseDownEvent(
79 IntPoint(0, 0), IntPoint(100, 200), WebPointerProperties::Button::Left, 79 IntPoint(0, 0), IntPoint(100, 200), WebPointerProperties::Button::Left,
80 PlatformEvent::MousePressed, 1, PlatformEvent::Modifiers::LeftButtonDown, 80 PlatformEvent::MousePressed, 1, PlatformEvent::Modifiers::LeftButtonDown,
81 WTF::monotonicallyIncreasingTime()); 81 WTF::monotonicallyIncreasingTime());
82 document().frame()->eventHandler().handleMousePressEvent(mouseDownEvent); 82 document().frame()->eventHandler().handleMousePressEvent(mouseDownEvent);
83 83
84 PlatformMouseEvent mouseMoveEvent( 84 PlatformMouseEvent mouseMoveEvent(
85 IntPoint(100, 50), IntPoint(200, 250), WebPointerProperties::Button::Left, 85 IntPoint(100, 50), IntPoint(200, 250), WebPointerProperties::Button::Left,
86 PlatformEvent::MouseMoved, 1, PlatformEvent::Modifiers::LeftButtonDown, 86 PlatformEvent::MouseMoved, 1, PlatformEvent::Modifiers::LeftButtonDown,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 PlatformMouseEvent mouseDownEvent( 248 PlatformMouseEvent mouseDownEvent(
249 IntPoint(0, 0), IntPoint(100, 200), WebPointerProperties::Button::Right, 249 IntPoint(0, 0), IntPoint(100, 200), WebPointerProperties::Button::Right,
250 PlatformEvent::MousePressed, 1, PlatformEvent::Modifiers::RightButtonDown, 250 PlatformEvent::MousePressed, 1, PlatformEvent::Modifiers::RightButtonDown,
251 WTF::monotonicallyIncreasingTime()); 251 WTF::monotonicallyIncreasingTime());
252 EXPECT_EQ( 252 EXPECT_EQ(
253 WebInputEventResult::HandledApplication, 253 WebInputEventResult::HandledApplication,
254 document().frame()->eventHandler().sendContextMenuEvent(mouseDownEvent)); 254 document().frame()->eventHandler().sendContextMenuEvent(mouseDownEvent));
255 } 255 }
256 256
257 } // namespace blink 257 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/input/PointerEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698