OLD | NEW |
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 float accelerationRatioY; | 354 float accelerationRatioY; |
355 | 355 |
356 // See comment at the top of the file for why an int is used here. | 356 // See comment at the top of the file for why an int is used here. |
357 int scrollByPage; | 357 int scrollByPage; |
358 | 358 |
359 // See comment at the top of the file for why an int is used here. | 359 // See comment at the top of the file for why an int is used here. |
360 int hasPreciseScrollingDeltas; | 360 int hasPreciseScrollingDeltas; |
361 Phase phase; | 361 Phase phase; |
362 Phase momentumPhase; | 362 Phase momentumPhase; |
363 | 363 |
| 364 // See comment at the top of the file for why an int is used here. |
| 365 // Rubberbanding is an OSX visual effect. When a user scrolls the content |
| 366 // area with a track pad, and the content area is already at its limit in |
| 367 // the direction being scrolled, the entire content area is allowed to |
| 368 // scroll slightly off screen, revealing a grey background. When the user |
| 369 // lets go, the content area snaps back into place. Blink is responsible |
| 370 // for this rubberbanding effect, but the embedder may wish to disable |
| 371 // rubber banding in the left or right direction, if the scroll should have |
| 372 // an alternate effect. The common case is that a scroll in the left or |
| 373 // right directions causes a back or forwards navigation, respectively. |
| 374 // |
| 375 // These flags prevent rubber banding from starting in a given direction, |
| 376 // but have no effect on an ongoing rubber banding. A rubber banding that |
| 377 // started in the vertical direction is allowed to continue in the right |
| 378 // direction, even if canRubberbandRight is 0. |
| 379 int canRubberbandLeft; |
| 380 int canRubberbandRight; |
| 381 |
364 WebMouseWheelEvent(unsigned sizeParam = sizeof(WebMouseWheelEvent)) | 382 WebMouseWheelEvent(unsigned sizeParam = sizeof(WebMouseWheelEvent)) |
365 : WebMouseEvent(sizeParam) | 383 : WebMouseEvent(sizeParam) |
366 , deltaX(0.0f) | 384 , deltaX(0.0f) |
367 , deltaY(0.0f) | 385 , deltaY(0.0f) |
368 , wheelTicksX(0.0f) | 386 , wheelTicksX(0.0f) |
369 , wheelTicksY(0.0f) | 387 , wheelTicksY(0.0f) |
370 , accelerationRatioX(1.0f) | 388 , accelerationRatioX(1.0f) |
371 , accelerationRatioY(1.0f) | 389 , accelerationRatioY(1.0f) |
372 , scrollByPage(false) | 390 , scrollByPage(false) |
373 , hasPreciseScrollingDeltas(false) | 391 , hasPreciseScrollingDeltas(false) |
374 , phase(PhaseNone) | 392 , phase(PhaseNone) |
375 , momentumPhase(PhaseNone) | 393 , momentumPhase(PhaseNone) |
| 394 , canRubberbandLeft(true) |
| 395 , canRubberbandRight(true) |
376 { | 396 { |
377 } | 397 } |
378 }; | 398 }; |
379 | 399 |
380 // WebGestureEvent -------------------------------------------------------------
- | 400 // WebGestureEvent -------------------------------------------------------------
- |
381 | 401 |
382 class WebGestureEvent : public WebInputEvent { | 402 class WebGestureEvent : public WebInputEvent { |
383 public: | 403 public: |
384 enum SourceDevice { | 404 enum SourceDevice { |
385 Touchpad, | 405 Touchpad, |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 , targetTouchesLength(0) | 501 , targetTouchesLength(0) |
482 { | 502 { |
483 } | 503 } |
484 }; | 504 }; |
485 | 505 |
486 #pragma pack(pop) | 506 #pragma pack(pop) |
487 | 507 |
488 } // namespace blink | 508 } // namespace blink |
489 | 509 |
490 #endif | 510 #endif |
OLD | NEW |