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

Side by Side Diff: public/web/WebInputEvent.h

Issue 490783003: Reduce hit test on ShowPress by moving event targeting to WebViewImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unnecessary headers Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 470
471 WebGestureEvent() 471 WebGestureEvent()
472 : WebInputEvent(sizeof(WebGestureEvent)) 472 : WebInputEvent(sizeof(WebGestureEvent))
473 , x(0) 473 , x(0)
474 , y(0) 474 , y(0)
475 , globalX(0) 475 , globalX(0)
476 , globalY(0) 476 , globalY(0)
477 { 477 {
478 memset(&data, 0, sizeof(data)); 478 memset(&data, 0, sizeof(data));
479 } 479 }
480
481 bool isScrollEvent() const
482 {
483 switch (type) {
484 case GestureScrollBegin:
485 case GestureScrollEnd:
486 case GestureScrollUpdate:
487 case GestureScrollUpdateWithoutPropagation:
488 case GestureFlingStart:
489 case GestureFlingCancel:
490 case GesturePinchBegin:
491 case GesturePinchEnd:
492 case GesturePinchUpdate:
493 return true;
494 case GestureShowPress:
495 case GestureTap:
496 case GestureTapUnconfirmed:
497 case GestureTapDown:
498 case GestureTapCancel:
499 case GestureDoubleTap:
500 case GestureTwoFingerTap:
501 case GestureLongPress:
502 case GestureLongTap:
503 return false;
504 default:
505 BLINK_ASSERT_NOT_REACHED();
506 return false;
507 }
508 }
480 }; 509 };
481 510
482 // WebTouchEvent -------------------------------------------------------------- 511 // WebTouchEvent --------------------------------------------------------------
483 512
484 class WebTouchEvent : public WebInputEvent { 513 class WebTouchEvent : public WebInputEvent {
485 public: 514 public:
486 // Maximum number of simultaneous touches supported on 515 // Maximum number of simultaneous touches supported on
487 // Ash/Aura. 516 // Ash/Aura.
488 enum { touchesLengthCap = 12 }; 517 enum { touchesLengthCap = 12 };
489 518
(...skipping 22 matching lines...) Expand all
512 , cancelable(true) 541 , cancelable(true)
513 { 542 {
514 } 543 }
515 }; 544 };
516 545
517 #pragma pack(pop) 546 #pragma pack(pop)
518 547
519 } // namespace blink 548 } // namespace blink
520 549
521 #endif 550 #endif
OLDNEW
« Source/web/tests/LinkHighlightTest.cpp ('K') | « Source/web/tests/LinkHighlightTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698