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

Unified Diff: third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Keep coalesced events in main thread event queue unittests 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
« no previous file with comments | « content/renderer/render_widget_unittest.cc ('k') | third_party/WebKit/Source/web/ExternalPopupMenu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp b/third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp
index 0ae61f0ebd041bb458c94b3741d1adb4fec722c1..cf6c6d8b3cb8679c80771d5f56a25e6ba6ca8d29 100644
--- a/third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp
@@ -88,8 +88,9 @@ size_t WebCoalescedInputEvent::coalescedEventSize() const {
return m_coalescedEvents.size();
}
-const WebInputEvent* WebCoalescedInputEvent::coalescedEvent(int index) const {
- return m_coalescedEvents[index].get();
+const WebInputEvent& WebCoalescedInputEvent::coalescedEvent(
+ size_t index) const {
+ return *m_coalescedEvents[index].get();
}
std::vector<const WebInputEvent*>
@@ -114,7 +115,7 @@ WebCoalescedInputEvent::WebCoalescedInputEvent(const WebInputEvent& event)
WebCoalescedInputEvent::WebCoalescedInputEvent(
const WebInputEvent& event,
const std::vector<const WebInputEvent*>& coalescedEvents)
- : m_event(), m_coalescedEvents(coalescedEvents.size()) {
+ : m_event(), m_coalescedEvents() {
kinuko 2017/01/19 13:40:18 I don't think we need these empty initializers her
Navid Zolghadr 2017/01/19 21:46:25 Done.
m_event = makeWebScopedInputEvent(event);
for (const auto& coalescedEvent : coalescedEvents)
m_coalescedEvents.push_back(makeWebScopedInputEvent(*coalescedEvent));
« no previous file with comments | « content/renderer/render_widget_unittest.cc ('k') | third_party/WebKit/Source/web/ExternalPopupMenu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698