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

Side by Side Diff: third_party/WebKit/Source/core/events/KeyboardEvent.cpp

Issue 2270293002: Replace ASSERT*() with DCHECK*() in core/events/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: isUnreachableNode -> checkReachableNode Created 4 years, 3 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
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 27 matching lines...) Expand all
38 case PlatformEvent::RawKeyDown: 38 case PlatformEvent::RawKeyDown:
39 return EventTypeNames::keydown; 39 return EventTypeNames::keydown;
40 case PlatformEvent::Char: 40 case PlatformEvent::Char:
41 return EventTypeNames::keypress; 41 return EventTypeNames::keypress;
42 case PlatformEvent::KeyDown: 42 case PlatformEvent::KeyDown:
43 // The caller should disambiguate the combined event into RawKeyDown or Char events. 43 // The caller should disambiguate the combined event into RawKeyDown or Char events.
44 break; 44 break;
45 default: 45 default:
46 break; 46 break;
47 } 47 }
48 ASSERT_NOT_REACHED(); 48 NOTREACHED();
49 return EventTypeNames::keydown; 49 return EventTypeNames::keydown;
50 } 50 }
51 51
52 static inline KeyboardEvent::KeyLocationCode keyLocationCode(const PlatformKeybo ardEvent& key) 52 static inline KeyboardEvent::KeyLocationCode keyLocationCode(const PlatformKeybo ardEvent& key)
53 { 53 {
54 if (key.isKeypad()) 54 if (key.isKeypad())
55 return KeyboardEvent::kDomKeyLocationNumpad; 55 return KeyboardEvent::kDomKeyLocationNumpad;
56 if (key.getModifiers() & PlatformEvent::IsLeft) 56 if (key.getModifiers() & PlatformEvent::IsLeft)
57 return KeyboardEvent::kDomKeyLocationLeft; 57 return KeyboardEvent::kDomKeyLocationLeft;
58 if (key.getModifiers() & PlatformEvent::IsRight) 58 if (key.getModifiers() & PlatformEvent::IsRight)
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 break; 188 break;
189 } 189 }
190 } 190 }
191 191
192 DEFINE_TRACE(KeyboardEvent) 192 DEFINE_TRACE(KeyboardEvent)
193 { 193 {
194 UIEventWithKeyState::trace(visitor); 194 UIEventWithKeyState::trace(visitor);
195 } 195 }
196 196
197 } // namespace blink 197 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/GestureEvent.cpp ('k') | third_party/WebKit/Source/core/events/MessageEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698