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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 #include "core/page/FrameTree.h" | 71 #include "core/page/FrameTree.h" |
72 #include "core/frame/FrameView.h" | 72 #include "core/frame/FrameView.h" |
73 #include "core/inspector/InspectorController.h" | 73 #include "core/inspector/InspectorController.h" |
74 #include "core/page/MouseEventWithHitTestResults.h" | 74 #include "core/page/MouseEventWithHitTestResults.h" |
75 #include "core/page/Page.h" | 75 #include "core/page/Page.h" |
76 #include "core/frame/Settings.h" | 76 #include "core/frame/Settings.h" |
77 #include "core/page/SpatialNavigation.h" | 77 #include "core/page/SpatialNavigation.h" |
78 #include "core/page/TouchAdjustment.h" | 78 #include "core/page/TouchAdjustment.h" |
79 #include "core/rendering/HitTestRequest.h" | 79 #include "core/rendering/HitTestRequest.h" |
80 #include "core/rendering/HitTestResult.h" | 80 #include "core/rendering/HitTestResult.h" |
81 #include "core/rendering/RenderFlowThread.h" | |
82 #include "core/rendering/RenderLayer.h" | 81 #include "core/rendering/RenderLayer.h" |
83 #include "core/rendering/RenderRegion.h" | |
84 #include "core/rendering/RenderTextControlSingleLine.h" | 82 #include "core/rendering/RenderTextControlSingleLine.h" |
85 #include "core/rendering/RenderView.h" | 83 #include "core/rendering/RenderView.h" |
86 #include "core/rendering/RenderWidget.h" | 84 #include "core/rendering/RenderWidget.h" |
87 #include "core/rendering/style/CursorList.h" | 85 #include "core/rendering/style/CursorList.h" |
88 #include "core/rendering/style/RenderStyle.h" | 86 #include "core/rendering/style/RenderStyle.h" |
89 #include "core/svg/SVGDocument.h" | 87 #include "core/svg/SVGDocument.h" |
90 #include "core/svg/SVGElementInstance.h" | 88 #include "core/svg/SVGElementInstance.h" |
91 #include "core/svg/SVGUseElement.h" | 89 #include "core/svg/SVGUseElement.h" |
92 #include "platform/PlatformGestureEvent.h" | 90 #include "platform/PlatformGestureEvent.h" |
93 #include "platform/PlatformKeyboardEvent.h" | 91 #include "platform/PlatformKeyboardEvent.h" |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st
opNode; | 949 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st
opNode; |
952 bool didScroll = curBox->scroll(physicalDirection, granularity, delta); | 950 bool didScroll = curBox->scroll(physicalDirection, granularity, delta); |
953 | 951 |
954 if (didScroll && stopNode) | 952 if (didScroll && stopNode) |
955 *stopNode = curBox->node(); | 953 *stopNode = curBox->node(); |
956 | 954 |
957 if (didScroll || shouldStopBubbling) { | 955 if (didScroll || shouldStopBubbling) { |
958 setFrameWasScrolledByUser(); | 956 setFrameWasScrolledByUser(); |
959 return true; | 957 return true; |
960 } | 958 } |
961 | |
962 // FIXME: This should probably move to a virtual method on RenderBox, so
mething like | |
963 // RenderBox::scrollAncestor, and specialized for RenderFlowThread | |
964 curBox = curBox->containingBlock(); | 959 curBox = curBox->containingBlock(); |
965 if (curBox && curBox->isRenderNamedFlowThread()) { | |
966 RenderBox* flowedBox = curBox; | |
967 | |
968 if (RenderBox* startBox = node->renderBox()) | |
969 flowedBox = startBox; | |
970 | |
971 curBox = toRenderFlowThread(curBox)->regionFromAbsolutePointAndBox(a
bsolutePoint, flowedBox); | |
972 } | |
973 } | 960 } |
974 | 961 |
975 return false; | 962 return false; |
976 } | 963 } |
977 | 964 |
978 bool EventHandler::bubblingScroll(ScrollDirection direction, ScrollGranularity g
ranularity, Node* startingNode) | 965 bool EventHandler::bubblingScroll(ScrollDirection direction, ScrollGranularity g
ranularity, Node* startingNode) |
979 { | 966 { |
980 // The layout needs to be up to date to determine if we can scroll. We may b
e | 967 // The layout needs to be up to date to determine if we can scroll. We may b
e |
981 // here because of an onLoad event, in which case the final layout hasn't be
en performed yet. | 968 // here because of an onLoad event, in which case the final layout hasn't be
en performed yet. |
982 m_frame->document()->updateLayoutIgnorePendingStylesheets(); | 969 m_frame->document()->updateLayoutIgnorePendingStylesheets(); |
(...skipping 3041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4024 unsigned EventHandler::accessKeyModifiers() | 4011 unsigned EventHandler::accessKeyModifiers() |
4025 { | 4012 { |
4026 #if OS(MACOSX) | 4013 #if OS(MACOSX) |
4027 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4014 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
4028 #else | 4015 #else |
4029 return PlatformEvent::AltKey; | 4016 return PlatformEvent::AltKey; |
4030 #endif | 4017 #endif |
4031 } | 4018 } |
4032 | 4019 |
4033 } // namespace WebCore | 4020 } // namespace WebCore |
OLD | NEW |