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

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

Issue 759073002: Add canScroll bit to WebMouseWheelEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 if (!node) 908 if (!node)
909 node = m_mousePressNode.get(); 909 node = m_mousePressNode.get();
910 910
911 if (!node || !node->renderer()) 911 if (!node || !node->renderer())
912 return false; 912 return false;
913 913
914 bool rootLayerScrolls = m_frame->settings() && m_frame->settings()->rootLaye rScrolls(); 914 bool rootLayerScrolls = m_frame->settings() && m_frame->settings()->rootLaye rScrolls();
915 RenderBox* curBox = node->renderer()->enclosingBox(); 915 RenderBox* curBox = node->renderer()->enclosingBox();
916 while (curBox && (rootLayerScrolls || !curBox->isRenderView())) { 916 while (curBox && (rootLayerScrolls || !curBox->isRenderView())) {
917 ScrollDirection physicalDirection = toPhysicalDirection( 917 ScrollDirection physicalDirection = toPhysicalDirection(
918 direction, curBox->isHorizontalWritingMode(), curBox->style()->slowI sFlippedBlocksWritingMode()); 918 direction, curBox->isHorizontalWritingMode(), curBox->style()->isFli ppedBlocksWritingMode());
Rick Byers 2014/11/27 15:55:14 What is this change?
lanwei 2014/12/02 06:28:22 I do not know, I did not make this change. I guess
919 919
920 // If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it 920 // If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it
921 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st opNode; 921 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st opNode;
922 bool didScroll = curBox->scroll(physicalDirection, granularity, delta); 922 bool didScroll = curBox->scroll(physicalDirection, granularity, delta);
923 923
924 if (didScroll && stopNode) 924 if (didScroll && stopNode)
925 *stopNode = curBox->node(); 925 *stopNode = curBox->node();
926 926
927 if (didScroll || shouldStopBubbling) { 927 if (didScroll || shouldStopBubbling) {
928 setFrameWasScrolledByUser(); 928 setFrameWasScrolledByUser();
(...skipping 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after
3859 unsigned EventHandler::accessKeyModifiers() 3859 unsigned EventHandler::accessKeyModifiers()
3860 { 3860 {
3861 #if OS(MACOSX) 3861 #if OS(MACOSX)
3862 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3862 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3863 #else 3863 #else
3864 return PlatformEvent::AltKey; 3864 return PlatformEvent::AltKey;
3865 #endif 3865 #endif
3866 } 3866 }
3867 3867
3868 } // namespace blink 3868 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698