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

Side by Side Diff: Source/platform/scroll/Scrollbar.cpp

Issue 732483003: Remove GestureScrollUpdateWithoutPropagation event (blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years 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 | « Source/platform/PlatformGestureEvent.h ('k') | Source/web/PageWidgetDelegate.cpp » ('j') | 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) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 setPressedPart(theme()->hitTest(this, evt.position())); 346 setPressedPart(theme()->hitTest(this, evt.position()));
347 m_pressedPos = orientation() == HorizontalScrollbar ? convertFromContain ingWindow(evt.position()).x() : convertFromContainingWindow(evt.position()).y(); 347 m_pressedPos = orientation() == HorizontalScrollbar ? convertFromContain ingWindow(evt.position()).x() : convertFromContainingWindow(evt.position()).y();
348 return true; 348 return true;
349 case PlatformEvent::GestureTapDownCancel: 349 case PlatformEvent::GestureTapDownCancel:
350 case PlatformEvent::GestureScrollBegin: 350 case PlatformEvent::GestureScrollBegin:
351 if (m_pressedPart != ThumbPart) 351 if (m_pressedPart != ThumbPart)
352 return false; 352 return false;
353 m_scrollPos = m_pressedPos; 353 m_scrollPos = m_pressedPos;
354 return true; 354 return true;
355 case PlatformEvent::GestureScrollUpdate: 355 case PlatformEvent::GestureScrollUpdate:
356 case PlatformEvent::GestureScrollUpdateWithoutPropagation:
357 if (m_pressedPart != ThumbPart) 356 if (m_pressedPart != ThumbPart)
358 return false; 357 return false;
359 m_scrollPos += orientation() == HorizontalScrollbar ? evt.deltaX() : evt .deltaY(); 358 m_scrollPos += orientation() == HorizontalScrollbar ? evt.deltaX() : evt .deltaY();
360 moveThumb(m_scrollPos, false); 359 moveThumb(m_scrollPos, false);
361 return true; 360 return true;
362 case PlatformEvent::GestureScrollEnd: 361 case PlatformEvent::GestureScrollEnd:
363 case PlatformEvent::GestureLongPress: 362 case PlatformEvent::GestureLongPress:
364 case PlatformEvent::GestureFlingStart: 363 case PlatformEvent::GestureFlingStart:
365 m_scrollPos = 0; 364 m_scrollPos = 0;
366 m_pressedPos = 0; 365 m_pressedPos = 0;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 if (!m_scrollableArea) 550 if (!m_scrollableArea)
552 return 0; 551 return 0;
553 552
554 if (m_orientation == HorizontalScrollbar) 553 if (m_orientation == HorizontalScrollbar)
555 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu mScrollPosition().x(); 554 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu mScrollPosition().x();
556 555
557 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr ollPosition().y(); 556 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr ollPosition().y();
558 } 557 }
559 558
560 } // namespace blink 559 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/PlatformGestureEvent.h ('k') | Source/web/PageWidgetDelegate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698