| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 4 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. |
| 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 10 * | 10 * |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 { | 1299 { |
| 1300 LayoutTheme& layoutTheme = LayoutTheme::theme(); | 1300 LayoutTheme& layoutTheme = LayoutTheme::theme(); |
| 1301 int keyCode = event->keyCode(); | 1301 int keyCode = event->keyCode(); |
| 1302 | 1302 |
| 1303 return ((layoutTheme.popsMenuBySpaceKey() && event->keyCode() == ' ' && !m_t
ypeAhead.hasActiveSession(event)) | 1303 return ((layoutTheme.popsMenuBySpaceKey() && event->keyCode() == ' ' && !m_t
ypeAhead.hasActiveSession(event)) |
| 1304 || (layoutTheme.popsMenuByReturnKey() && keyCode == '\r')); | 1304 || (layoutTheme.popsMenuByReturnKey() && keyCode == '\r')); |
| 1305 } | 1305 } |
| 1306 | 1306 |
| 1307 void HTMLSelectElement::menuListDefaultEventHandler(Event* event) | 1307 void HTMLSelectElement::menuListDefaultEventHandler(Event* event) |
| 1308 { | 1308 { |
| 1309 // TODO(tkent): Remove isTrusted check when we ship |
| 1310 // TrustedEventsDefaultAction. |
| 1311 if (!event->isTrusted()) |
| 1312 return; |
| 1309 if (event->type() == EventTypeNames::keydown) { | 1313 if (event->type() == EventTypeNames::keydown) { |
| 1310 if (!layoutObject() || !event->isKeyboardEvent()) | 1314 if (!layoutObject() || !event->isKeyboardEvent()) |
| 1311 return; | 1315 return; |
| 1312 | 1316 |
| 1313 KeyboardEvent* keyEvent = toKeyboardEvent(event); | 1317 KeyboardEvent* keyEvent = toKeyboardEvent(event); |
| 1314 if (shouldOpenPopupForKeyDownEvent(keyEvent)) { | 1318 if (shouldOpenPopupForKeyDownEvent(keyEvent)) { |
| 1315 handlePopupOpenKeyboardEvent(event); | 1319 handlePopupOpenKeyboardEvent(event); |
| 1316 return; | 1320 return; |
| 1317 } | 1321 } |
| 1318 | 1322 |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1983 m_popupIsVisible = false; | 1987 m_popupIsVisible = false; |
| 1984 m_popup = nullptr; | 1988 m_popup = nullptr; |
| 1985 } | 1989 } |
| 1986 | 1990 |
| 1987 void HTMLSelectElement::resetTypeAheadSessionForTesting() | 1991 void HTMLSelectElement::resetTypeAheadSessionForTesting() |
| 1988 { | 1992 { |
| 1989 m_typeAhead.resetSession(); | 1993 m_typeAhead.resetSession(); |
| 1990 } | 1994 } |
| 1991 | 1995 |
| 1992 } // namespace blink | 1996 } // namespace blink |
| OLD | NEW |