Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 1671103002: Prevent remaining keypress actions if textInput was canceled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use pageUp+space combination instead of timeout in layouttests Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/space-scroll-textinput-canceled-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/space-scroll-textinput-canceled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698