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

Side by Side Diff: third_party/WebKit/public/platform/WebInputEvent.h

Issue 2227803003: Plumb phase/momentum for WheelEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Non-Mac compile. Created 4 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // This field exists to allow BrowserPlugin to mark MouseWheel events as 413 // This field exists to allow BrowserPlugin to mark MouseWheel events as
414 // 'resent' to handle the case where an event is not consumed when first 414 // 'resent' to handle the case where an event is not consumed when first
415 // encountered; it should be handled differently by the plugin when it is 415 // encountered; it should be handled differently by the plugin when it is
416 // sent for thesecond time. No code within Blink touches this, other than to 416 // sent for thesecond time. No code within Blink touches this, other than to
417 // plumb it through event conversions. 417 // plumb it through event conversions.
418 int resendingPluginId; 418 int resendingPluginId;
419 419
420 Phase phase; 420 Phase phase;
421 Phase momentumPhase; 421 Phase momentumPhase;
422 422
423 // Rubberbanding is an OSX visual effect. When a user scrolls the content
424 // area with a track pad, and the content area is already at its limit in
425 // the direction being scrolled, the entire content area is allowed to
426 // scroll slightly off screen, revealing a grey background. When the user
427 // lets go, the content area snaps back into place. Blink is responsible
428 // for this rubberbanding effect, but the embedder may wish to disable
429 // rubber banding in the left or right direction, if the scroll should have
430 // an alternate effect. The common case is that a scroll in the left or
431 // right directions causes a back or forwards navigation, respectively.
432 //
433 // These flags prevent rubber banding from starting in a given direction,
434 // but have no effect on an ongoing rubber banding. A rubber banding that
435 // started in the vertical direction is allowed to continue in the right
436 // direction, even if canRubberbandRight is 0.
437 bool canRubberbandLeft;
438 bool canRubberbandRight;
439
440 bool scrollByPage; 423 bool scrollByPage;
441 bool hasPreciseScrollingDeltas; 424 bool hasPreciseScrollingDeltas;
442 425
443 RailsMode railsMode; 426 RailsMode railsMode;
444 427
445 // Whether the event is blocking, non-blocking, all event 428 // Whether the event is blocking, non-blocking, all event
446 // listeners were passive or was forced to be non-blocking. 429 // listeners were passive or was forced to be non-blocking.
447 DispatchType dispatchType; 430 DispatchType dispatchType;
448 431
449 WebMouseWheelEvent() 432 WebMouseWheelEvent()
450 : WebMouseEvent(sizeof(WebMouseWheelEvent)) 433 : WebMouseEvent(sizeof(WebMouseWheelEvent))
451 , deltaX(0.0f) 434 , deltaX(0.0f)
452 , deltaY(0.0f) 435 , deltaY(0.0f)
453 , wheelTicksX(0.0f) 436 , wheelTicksX(0.0f)
454 , wheelTicksY(0.0f) 437 , wheelTicksY(0.0f)
455 , accelerationRatioX(1.0f) 438 , accelerationRatioX(1.0f)
456 , accelerationRatioY(1.0f) 439 , accelerationRatioY(1.0f)
457 , resendingPluginId(-1) 440 , resendingPluginId(-1)
458 , phase(PhaseNone) 441 , phase(PhaseNone)
459 , momentumPhase(PhaseNone) 442 , momentumPhase(PhaseNone)
460 , canRubberbandLeft(true)
461 , canRubberbandRight(true)
462 , scrollByPage(false) 443 , scrollByPage(false)
463 , hasPreciseScrollingDeltas(false) 444 , hasPreciseScrollingDeltas(false)
464 , railsMode(RailsModeFree) 445 , railsMode(RailsModeFree)
465 , dispatchType(Blocking) 446 , dispatchType(Blocking)
466 { 447 {
467 } 448 }
468 }; 449 };
469 450
470 // WebGestureEvent ------------------------------------------------------------- - 451 // WebGestureEvent ------------------------------------------------------------- -
471 452
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 , uniqueTouchEventId(0) 637 , uniqueTouchEventId(0)
657 { 638 {
658 } 639 }
659 }; 640 };
660 641
661 #pragma pack(pop) 642 #pragma pack(pop)
662 643
663 } // namespace blink 644 } // namespace blink
664 645
665 #endif 646 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698