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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 void WebFrameWidgetImpl::themeChanged() { 304 void WebFrameWidgetImpl::themeChanged() {
305 FrameView* view = m_localRoot->frameView(); 305 FrameView* view = m_localRoot->frameView();
306 306
307 WebRect damagedRect(0, 0, m_size.width, m_size.height); 307 WebRect damagedRect(0, 0, m_size.width, m_size.height);
308 view->invalidateRect(damagedRect); 308 view->invalidateRect(damagedRect);
309 } 309 }
310 310
311 const WebInputEvent* WebFrameWidgetImpl::m_currentInputEvent = nullptr; 311 const WebInputEvent* WebFrameWidgetImpl::m_currentInputEvent = nullptr;
312 312
313 WebInputEventResult WebFrameWidgetImpl::handleInputEvent( 313 WebInputEventResult WebFrameWidgetImpl::handleInputEvent(
314 const WebInputEvent& inputEvent) { 314 const WebInputEvent& inputEvent,
315 const std::vector<const WebInputEvent*>& coalescedevents) {
315 TRACE_EVENT1("input", "WebFrameWidgetImpl::handleInputEvent", "type", 316 TRACE_EVENT1("input", "WebFrameWidgetImpl::handleInputEvent", "type",
316 WebInputEvent::GetName(inputEvent.type)); 317 WebInputEvent::GetName(inputEvent.type));
317 318
318 // Don't handle events once we've started shutting down. 319 // Don't handle events once we've started shutting down.
319 if (!page()) 320 if (!page())
320 return WebInputEventResult::NotHandled; 321 return WebInputEventResult::NotHandled;
321 322
322 // Report the event to be NOT processed by WebKit, so that the browser can 323 // Report the event to be NOT processed by WebKit, so that the browser can
323 // handle it appropriately. 324 // handle it appropriately.
324 if (m_ignoreInputEvents) 325 if (m_ignoreInputEvents)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 366 }
366 367
367 node->dispatchMouseEvent( 368 node->dispatchMouseEvent(
368 PlatformMouseEventBuilder( 369 PlatformMouseEventBuilder(
369 m_localRoot->frameView(), 370 m_localRoot->frameView(),
370 static_cast<const WebMouseEvent&>(inputEvent)), 371 static_cast<const WebMouseEvent&>(inputEvent)),
371 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount); 372 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount);
372 return WebInputEventResult::HandledSystem; 373 return WebInputEventResult::HandledSystem;
373 } 374 }
374 375
375 return PageWidgetDelegate::handleInputEvent(*this, inputEvent, 376 return PageWidgetDelegate::handleInputEvent(
376 m_localRoot->frame()); 377 *this, inputEvent, coalescedevents, m_localRoot->frame());
377 } 378 }
378 379
379 void WebFrameWidgetImpl::setCursorVisibilityState(bool isVisible) { 380 void WebFrameWidgetImpl::setCursorVisibilityState(bool isVisible) {
380 page()->setIsCursorVisible(isVisible); 381 page()->setIsCursorVisible(isVisible);
381 } 382 }
382 383
383 bool WebFrameWidgetImpl::hasTouchEventHandlersAt(const WebPoint& point) { 384 bool WebFrameWidgetImpl::hasTouchEventHandlersAt(const WebPoint& point) {
384 // FIXME: Implement this. Note that the point must be divided by 385 // FIXME: Implement this. Note that the point must be divided by
385 // pageScaleFactor. 386 // pageScaleFactor.
386 return true; 387 return true;
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 return nullptr; 1212 return nullptr;
1212 } 1213 }
1213 1214
1214 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1215 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1215 if (!m_imeAcceptEvents) 1216 if (!m_imeAcceptEvents)
1216 return nullptr; 1217 return nullptr;
1217 return focusedLocalFrameInWidget(); 1218 return focusedLocalFrameInWidget();
1218 } 1219 }
1219 1220
1220 } // namespace blink 1221 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698