| 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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights |
| 7 * reserved. | 7 * reserved. |
| 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * Copyright (C) 2010 Google Inc. All rights reserved. | 9 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 10 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 10 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| (...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 if (!m_activeSelectionState) | 1280 if (!m_activeSelectionState) |
| 1281 return; | 1281 return; |
| 1282 } | 1282 } |
| 1283 | 1283 |
| 1284 // The key handling below shouldn't be used for non spatial navigation | 1284 // The key handling below shouldn't be used for non spatial navigation |
| 1285 // mode Mac | 1285 // mode Mac |
| 1286 if (LayoutTheme::theme().popsMenuByArrowKeys() && | 1286 if (LayoutTheme::theme().popsMenuByArrowKeys() && |
| 1287 !isSpatialNavigationEnabled(document().frame())) | 1287 !isSpatialNavigationEnabled(document().frame())) |
| 1288 return; | 1288 return; |
| 1289 | 1289 |
| 1290 int ignoreModifiers = PlatformEvent::ShiftKey | PlatformEvent::CtrlKey | |
| 1291 PlatformEvent::AltKey | PlatformMouseEvent::MetaKey; |
| 1292 if (keyEvent->modifiers() & ignoreModifiers) |
| 1293 return; |
| 1294 |
| 1290 const String& key = keyEvent->key(); | 1295 const String& key = keyEvent->key(); |
| 1291 bool handled = true; | 1296 bool handled = true; |
| 1292 const ListItems& listItems = this->listItems(); | 1297 const ListItems& listItems = this->listItems(); |
| 1293 HTMLOptionElement* option = selectedOption(); | 1298 HTMLOptionElement* option = selectedOption(); |
| 1294 int listIndex = option ? option->listIndex() : -1; | 1299 int listIndex = option ? option->listIndex() : -1; |
| 1295 | 1300 |
| 1296 if (key == "ArrowDown" || key == "ArrowRight") | 1301 if (key == "ArrowDown" || key == "ArrowRight") |
| 1297 option = nextValidOption(listIndex, SkipForwards, 1); | 1302 option = nextValidOption(listIndex, SkipForwards, 1); |
| 1298 else if (key == "ArrowUp" || key == "ArrowLeft") | 1303 else if (key == "ArrowUp" || key == "ArrowLeft") |
| 1299 option = nextValidOption(listIndex, SkipBackwards, 1); | 1304 option = nextValidOption(listIndex, SkipBackwards, 1); |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2031 m_popupUpdater = nullptr; | 2036 m_popupUpdater = nullptr; |
| 2032 } | 2037 } |
| 2033 | 2038 |
| 2034 void HTMLSelectElement::didMutateSubtree() { | 2039 void HTMLSelectElement::didMutateSubtree() { |
| 2035 DCHECK(popupIsVisible()); | 2040 DCHECK(popupIsVisible()); |
| 2036 DCHECK(m_popup); | 2041 DCHECK(m_popup); |
| 2037 m_popup->updateFromElement(PopupMenu::ByDOMChange); | 2042 m_popup->updateFromElement(PopupMenu::ByDOMChange); |
| 2038 } | 2043 } |
| 2039 | 2044 |
| 2040 } // namespace blink | 2045 } // namespace blink |
| OLD | NEW |