OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |