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 3537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3548 target = underlyingEvent->target(); | 3548 target = underlyingEvent->target(); |
3549 else | 3549 else |
3550 target = eventTargetNodeForDocument(m_frame->document()); | 3550 target = eventTargetNodeForDocument(m_frame->document()); |
3551 if (!target) | 3551 if (!target) |
3552 return false; | 3552 return false; |
3553 | 3553 |
3554 RefPtrWillBeRawPtr<TextEvent> event = TextEvent::create(m_frame->domWindow()
, text, inputType); | 3554 RefPtrWillBeRawPtr<TextEvent> event = TextEvent::create(m_frame->domWindow()
, text, inputType); |
3555 event->setUnderlyingEvent(underlyingEvent); | 3555 event->setUnderlyingEvent(underlyingEvent); |
3556 | 3556 |
3557 target->dispatchEvent(event); | 3557 target->dispatchEvent(event); |
3558 return event->defaultHandled(); | 3558 return event->defaultHandled() || event->defaultPrevented(); |
3559 } | 3559 } |
3560 | 3560 |
3561 void EventHandler::defaultTextInputEventHandler(TextEvent* event) | 3561 void EventHandler::defaultTextInputEventHandler(TextEvent* event) |
3562 { | 3562 { |
3563 if (m_frame->editor().handleTextEvent(event)) | 3563 if (m_frame->editor().handleTextEvent(event)) |
3564 event->setDefaultHandled(); | 3564 event->setDefaultHandled(); |
3565 } | 3565 } |
3566 | 3566 |
3567 void EventHandler::defaultSpaceEventHandler(KeyboardEvent* event) | 3567 void EventHandler::defaultSpaceEventHandler(KeyboardEvent* event) |
3568 { | 3568 { |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4169 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 4169 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
4170 { | 4170 { |
4171 #if OS(MACOSX) | 4171 #if OS(MACOSX) |
4172 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); | 4172 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); |
4173 #else | 4173 #else |
4174 return PlatformEvent::AltKey; | 4174 return PlatformEvent::AltKey; |
4175 #endif | 4175 #endif |
4176 } | 4176 } |
4177 | 4177 |
4178 } // namespace blink | 4178 } // namespace blink |
OLD | NEW |