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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 1161713004: Rename ScrollableArea::scroll to userScroll (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed comment Created 5 years, 6 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 | « Source/core/layout/LayoutBox.cpp ('k') | Source/platform/mac/ScrollAnimatorMac.h » ('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) 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 // here because of an onLoad event, in which case the final layout hasn't be en performed yet. 979 // here because of an onLoad event, in which case the final layout hasn't be en performed yet.
980 m_frame->document()->updateLayoutIgnorePendingStylesheets(); 980 m_frame->document()->updateLayoutIgnorePendingStylesheets();
981 // FIXME: enable scroll customization in this case. See crbug.com/410974. 981 // FIXME: enable scroll customization in this case. See crbug.com/410974.
982 if (scroll(direction, granularity, startingNode)) 982 if (scroll(direction, granularity, startingNode))
983 return true; 983 return true;
984 LocalFrame* frame = m_frame; 984 LocalFrame* frame = m_frame;
985 FrameView* view = frame->view(); 985 FrameView* view = frame->view();
986 if (view) { 986 if (view) {
987 ScrollDirectionPhysical physicalDirection = 987 ScrollDirectionPhysical physicalDirection =
988 toPhysicalDirection(direction, view->isVerticalDocument(), view->isF lippedDocument()); 988 toPhysicalDirection(direction, view->isVerticalDocument(), view->isF lippedDocument());
989 if (view->scrollableArea()->scroll(physicalDirection, granularity)) { 989 if (view->scrollableArea()->userScroll(physicalDirection, granularity)) {
990 setFrameWasScrolledByUser(); 990 setFrameWasScrolledByUser();
991 return true; 991 return true;
992 } 992 }
993 } 993 }
994 994
995 Frame* parentFrame = frame->tree().parent(); 995 Frame* parentFrame = frame->tree().parent();
996 if (!parentFrame || !parentFrame->isLocalFrame()) 996 if (!parentFrame || !parentFrame->isLocalFrame())
997 return false; 997 return false;
998 // FIXME: Broken for OOPI. 998 // FIXME: Broken for OOPI.
999 return toLocalFrame(parentFrame)->eventHandler().bubblingScroll(direction, g ranularity, m_frame->deprecatedLocalOwner()); 999 return toLocalFrame(parentFrame)->eventHandler().bubblingScroll(direction, g ranularity, m_frame->deprecatedLocalOwner());
(...skipping 2647 matching lines...) Expand 10 before | Expand all | Expand 10 after
3647 return; 3647 return;
3648 } 3648 }
3649 3649
3650 FrameView* view = m_frame->view(); 3650 FrameView* view = m_frame->view();
3651 if (!view) 3651 if (!view)
3652 return; 3652 return;
3653 3653
3654 ScrollDirectionPhysical physicalDirection = 3654 ScrollDirectionPhysical physicalDirection =
3655 toPhysicalDirection(direction, view->isVerticalDocument(), view->isFlipp edDocument()); 3655 toPhysicalDirection(direction, view->isVerticalDocument(), view->isFlipp edDocument());
3656 3656
3657 if (view->scrollableArea()->scroll(physicalDirection, ScrollByPage)) 3657 if (view->scrollableArea()->userScroll(physicalDirection, ScrollByPage))
3658 event->setDefaultHandled(); 3658 event->setDefaultHandled();
3659 } 3659 }
3660 3660
3661 void EventHandler::defaultBackspaceEventHandler(KeyboardEvent* event) 3661 void EventHandler::defaultBackspaceEventHandler(KeyboardEvent* event)
3662 { 3662 {
3663 ASSERT(event->type() == EventTypeNames::keydown); 3663 ASSERT(event->type() == EventTypeNames::keydown);
3664 3664
3665 if (event->ctrlKey() || event->metaKey() || event->altKey()) 3665 if (event->ctrlKey() || event->metaKey() || event->altKey())
3666 return; 3666 return;
3667 3667
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
4170 unsigned EventHandler::accessKeyModifiers() 4170 unsigned EventHandler::accessKeyModifiers()
4171 { 4171 {
4172 #if OS(MACOSX) 4172 #if OS(MACOSX)
4173 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4173 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4174 #else 4174 #else
4175 return PlatformEvent::AltKey; 4175 return PlatformEvent::AltKey;
4176 #endif 4176 #endif
4177 } 4177 }
4178 4178
4179 } // namespace blink 4179 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBox.cpp ('k') | Source/platform/mac/ScrollAnimatorMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698