| 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |