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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 1738623004: Rename enums/functions that collide in chromium style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-4
Patch Set: get-names-5: rebase-and-stuff Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 return true; 1725 return true;
1726 } 1726 }
1727 } 1727 }
1728 return false; 1728 return false;
1729 } 1729 }
1730 1730
1731 namespace { 1731 namespace {
1732 1732
1733 ScrollResult scrollAreaWithWheelEvent(const PlatformWheelEvent& event, Scrollabl eArea& scrollableArea) 1733 ScrollResult scrollAreaWithWheelEvent(const PlatformWheelEvent& event, Scrollabl eArea& scrollableArea)
1734 { 1734 {
1735 float deltaX = event.railsMode() != PlatformEvent::RailsModeVertical ? event .deltaX() : 0; 1735 float deltaX = event.getRailsMode() != PlatformEvent::RailsModeVertical ? ev ent.deltaX() : 0;
1736 float deltaY = event.railsMode() != PlatformEvent::RailsModeHorizontal ? eve nt.deltaY() : 0; 1736 float deltaY = event.getRailsMode() != PlatformEvent::RailsModeHorizontal ? event.deltaY() : 0;
1737 1737
1738 ScrollGranularity granularity = 1738 ScrollGranularity granularity =
1739 event.granularity() == ScrollByPixelWheelEvent ? ScrollByPixel : ScrollB yPage; 1739 event.granularity() == ScrollByPixelWheelEvent ? ScrollByPixel : ScrollB yPage;
1740 1740
1741 if (event.hasPreciseScrollingDeltas() && granularity == ScrollByPixel) 1741 if (event.hasPreciseScrollingDeltas() && granularity == ScrollByPixel)
1742 granularity = ScrollByPrecisePixel; 1742 granularity = ScrollByPrecisePixel;
1743 1743
1744 // If the event is a "PageWheelEvent" we should disregard the delta and 1744 // If the event is a "PageWheelEvent" we should disregard the delta and
1745 // scroll by *one* page length per event. 1745 // scroll by *one* page length per event.
1746 if (event.granularity() == ScrollByPageWheelEvent) { 1746 if (event.granularity() == ScrollByPageWheelEvent) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 if (!wheelEvent->canScroll()) 1844 if (!wheelEvent->canScroll())
1845 return; 1845 return;
1846 1846
1847 Node* stopNode = m_previousWheelScrolledNode.get(); 1847 Node* stopNode = m_previousWheelScrolledNode.get();
1848 ScrollGranularity granularity = wheelGranularityToScrollGranularity(wheelEve nt); 1848 ScrollGranularity granularity = wheelGranularityToScrollGranularity(wheelEve nt);
1849 1849
1850 // Break up into two scrolls if we need to. Diagonal movement on 1850 // Break up into two scrolls if we need to. Diagonal movement on
1851 // a MacBook pro is an example of a 2-dimensional mouse wheel event (where b oth deltaX and deltaY can be set). 1851 // a MacBook pro is an example of a 2-dimensional mouse wheel event (where b oth deltaX and deltaY can be set).
1852 1852
1853 // FIXME: enable scroll customization in this case. See crbug.com/410974. 1853 // FIXME: enable scroll customization in this case. See crbug.com/410974.
1854 if (wheelEvent->railsMode() != Event::RailsModeVertical 1854 if (wheelEvent->getRailsMode() != Event::RailsModeVertical
1855 && scroll(ScrollRightIgnoringWritingMode, granularity, startNode, &stopN ode, wheelEvent->deltaX()).didScroll) 1855 && scroll(ScrollRightIgnoringWritingMode, granularity, startNode, &stopN ode, wheelEvent->deltaX()).didScroll)
1856 wheelEvent->setDefaultHandled(); 1856 wheelEvent->setDefaultHandled();
1857 1857
1858 if (wheelEvent->railsMode() != Event::RailsModeHorizontal 1858 if (wheelEvent->getRailsMode() != Event::RailsModeHorizontal
1859 && scroll(ScrollDownIgnoringWritingMode, granularity, startNode, &stopNo de, wheelEvent->deltaY()).didScroll) 1859 && scroll(ScrollDownIgnoringWritingMode, granularity, startNode, &stopNo de, wheelEvent->deltaY()).didScroll)
1860 wheelEvent->setDefaultHandled(); 1860 wheelEvent->setDefaultHandled();
1861 1861
1862 m_previousWheelScrolledNode = stopNode; 1862 m_previousWheelScrolledNode = stopNode;
1863 } 1863 }
1864 1864
1865 WebInputEventResult EventHandler::handleGestureShowPress() 1865 WebInputEventResult EventHandler::handleGestureShowPress()
1866 { 1866 {
1867 m_lastShowPressTimestamp = WTF::monotonicallyIncreasingTime(); 1867 m_lastShowPressTimestamp = WTF::monotonicallyIncreasingTime();
1868 1868
(...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3980 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() 3980 PlatformEvent::Modifiers EventHandler::accessKeyModifiers()
3981 { 3981 {
3982 #if OS(MACOSX) 3982 #if OS(MACOSX)
3983 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); 3983 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey);
3984 #else 3984 #else
3985 return PlatformEvent::AltKey; 3985 return PlatformEvent::AltKey;
3986 #endif 3986 #endif
3987 } 3987 }
3988 3988
3989 } // namespace blink 3989 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698