| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |