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

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

Issue 691863003: Add a setting to do frame scrolls through the root layer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/core/page/scrolling/ScrollingCoordinator.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) 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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 893
894 if (!node) 894 if (!node)
895 node = m_frame->document()->focusedElement(); 895 node = m_frame->document()->focusedElement();
896 896
897 if (!node) 897 if (!node)
898 node = m_mousePressNode.get(); 898 node = m_mousePressNode.get();
899 899
900 if (!node || !node->renderer()) 900 if (!node || !node->renderer())
901 return false; 901 return false;
902 902
903 bool rootLayerScrolls = m_frame->settings() && m_frame->settings()->rootLaye rScrolls();
903 RenderBox* curBox = node->renderer()->enclosingBox(); 904 RenderBox* curBox = node->renderer()->enclosingBox();
904 while (curBox && !curBox->isRenderView()) { 905 while (curBox && (rootLayerScrolls || !curBox->isRenderView())) {
905 ScrollDirection physicalDirection = toPhysicalDirection( 906 ScrollDirection physicalDirection = toPhysicalDirection(
906 direction, curBox->isHorizontalWritingMode(), curBox->style()->slowI sFlippedBlocksWritingMode()); 907 direction, curBox->isHorizontalWritingMode(), curBox->style()->slowI sFlippedBlocksWritingMode());
907 908
908 // If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it 909 // If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it
909 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st opNode; 910 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st opNode;
910 bool didScroll = curBox->scroll(physicalDirection, granularity, delta); 911 bool didScroll = curBox->scroll(physicalDirection, granularity, delta);
911 912
912 if (didScroll && stopNode) 913 if (didScroll && stopNode)
913 *stopNode = curBox->node(); 914 *stopNode = curBox->node();
914 915
(...skipping 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after
3881 unsigned EventHandler::accessKeyModifiers() 3882 unsigned EventHandler::accessKeyModifiers()
3882 { 3883 {
3883 #if OS(MACOSX) 3884 #if OS(MACOSX)
3884 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3885 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3885 #else 3886 #else
3886 return PlatformEvent::AltKey; 3887 return PlatformEvent::AltKey;
3887 #endif 3888 #endif
3888 } 3889 }
3889 3890
3890 } // namespace blink 3891 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698