Chromium Code Reviews| 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 29 matching lines...) Expand all Loading... | |
| 40 #include "core/editing/TextIterator.h" | 40 #include "core/editing/TextIterator.h" |
| 41 #include "core/editing/htmlediting.h" | 41 #include "core/editing/htmlediting.h" |
| 42 #include "core/events/DOMWindowEventQueue.h" | 42 #include "core/events/DOMWindowEventQueue.h" |
| 43 #include "core/events/EventPath.h" | 43 #include "core/events/EventPath.h" |
| 44 #include "core/events/KeyboardEvent.h" | 44 #include "core/events/KeyboardEvent.h" |
| 45 #include "core/events/MouseEvent.h" | 45 #include "core/events/MouseEvent.h" |
| 46 #include "core/events/TextEvent.h" | 46 #include "core/events/TextEvent.h" |
| 47 #include "core/events/TouchEvent.h" | 47 #include "core/events/TouchEvent.h" |
| 48 #include "core/events/WheelEvent.h" | 48 #include "core/events/WheelEvent.h" |
| 49 #include "core/fetch/ImageResource.h" | 49 #include "core/fetch/ImageResource.h" |
| 50 #include "core/frame/EventHandlerRegistry.h" | |
| 51 #include "core/frame/FrameView.h" | 50 #include "core/frame/FrameView.h" |
| 52 #include "core/frame/LocalFrame.h" | 51 #include "core/frame/LocalFrame.h" |
| 53 #include "core/frame/Settings.h" | 52 #include "core/frame/Settings.h" |
| 54 #include "core/loader/FrameLoaderClient.h" | 53 #include "core/loader/FrameLoaderClient.h" |
| 55 #include "core/page/AutoscrollController.h" | 54 #include "core/page/AutoscrollController.h" |
| 56 #include "core/page/Chrome.h" | 55 #include "core/page/Chrome.h" |
| 57 #include "core/page/ChromeClient.h" | 56 #include "core/page/ChromeClient.h" |
| 58 #include "core/page/EditorClient.h" | 57 #include "core/page/EditorClient.h" |
| 59 #include "core/page/EventWithHitTestResults.h" | 58 #include "core/page/EventWithHitTestResults.h" |
| 60 #include "core/page/FocusController.h" | 59 #include "core/page/FocusController.h" |
| (...skipping 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2502 m_targetForTouchID.set(point.id(), node); | 2501 m_targetForTouchID.set(point.id(), node); |
| 2503 | 2502 |
| 2504 TouchAction effectiveTouchAction = computeEffectiveTouchAction(*node ); | 2503 TouchAction effectiveTouchAction = computeEffectiveTouchAction(*node ); |
| 2505 if (effectiveTouchAction != TouchActionAuto) | 2504 if (effectiveTouchAction != TouchActionAuto) |
| 2506 m_frame->page()->chrome().client().setTouchAction(effectiveTouch Action); | 2505 m_frame->page()->chrome().client().setTouchAction(effectiveTouch Action); |
| 2507 } | 2506 } |
| 2508 } | 2507 } |
| 2509 | 2508 |
| 2510 m_touchPressed = !allTouchReleased; | 2509 m_touchPressed = !allTouchReleased; |
| 2511 | 2510 |
| 2512 // If there's no document receiving touch events, or no handlers on the | 2511 // If there's no document receiving touch events, then we can skip all the |
| 2513 // document set to receive the events, then we can skip all the rest of | 2512 // rest of this work. |
| 2514 // this work. | 2513 if (!m_touchSequenceDocument || !m_touchSequenceDocument->frame()) { |
|
rafaelw
2014/11/10 20:31:21
PTAL
abarth-chromium
2014/11/10 21:03:42
Yep
| |
| 2515 if (!m_touchSequenceDocument || !m_touchSequenceDocument->frameHost() || !m_ touchSequenceDocument->frameHost()->eventHandlerRegistry().hasEventHandlers(Even tHandlerRegistry::TouchEvent) || !m_touchSequenceDocument->frame()) { | |
| 2516 if (allTouchReleased) { | 2514 if (allTouchReleased) { |
| 2517 m_touchSequenceDocument.clear(); | 2515 m_touchSequenceDocument.clear(); |
| 2518 m_touchSequenceUserGestureToken.clear(); | 2516 m_touchSequenceUserGestureToken.clear(); |
| 2519 } | 2517 } |
| 2520 return false; | 2518 return false; |
| 2521 } | 2519 } |
| 2522 | 2520 |
| 2523 // Build up the lists to use for the 'touches', 'targetTouches' and | 2521 // Build up the lists to use for the 'touches', 'targetTouches' and |
| 2524 // 'changedTouches' attributes in the JS event. See | 2522 // 'changedTouches' attributes in the JS event. See |
| 2525 // http://www.w3.org/TR/touch-events/#touchevent-interface for how these | 2523 // http://www.w3.org/TR/touch-events/#touchevent-interface for how these |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2735 unsigned EventHandler::accessKeyModifiers() | 2733 unsigned EventHandler::accessKeyModifiers() |
| 2736 { | 2734 { |
| 2737 #if OS(MACOSX) | 2735 #if OS(MACOSX) |
| 2738 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 2736 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 2739 #else | 2737 #else |
| 2740 return PlatformEvent::AltKey; | 2738 return PlatformEvent::AltKey; |
| 2741 #endif | 2739 #endif |
| 2742 } | 2740 } |
| 2743 | 2741 |
| 2744 } // namespace blink | 2742 } // namespace blink |
| OLD | NEW |