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

Side by Side Diff: Source/core/html/HTMLSelectElement.cpp

Issue 434683002: Remove KeyboardEvent.altGraphKey (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/events/KeyboardEvent.idl ('k') | Source/core/page/EventHandler.cpp » ('j') | 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) 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 1179
1180 bool HTMLSelectElement::shouldOpenPopupForKeyDownEvent(KeyboardEvent* keyEvent) 1180 bool HTMLSelectElement::shouldOpenPopupForKeyDownEvent(KeyboardEvent* keyEvent)
1181 { 1181 {
1182 const String& keyIdentifier = keyEvent->keyIdentifier(); 1182 const String& keyIdentifier = keyEvent->keyIdentifier();
1183 RenderTheme& renderTheme = RenderTheme::theme(); 1183 RenderTheme& renderTheme = RenderTheme::theme();
1184 1184
1185 if (isSpatialNavigationEnabled(document().frame())) 1185 if (isSpatialNavigationEnabled(document().frame()))
1186 return false; 1186 return false;
1187 1187
1188 return ((renderTheme.popsMenuByArrowKeys() && (keyIdentifier == "Down" || k eyIdentifier == "Up")) 1188 return ((renderTheme.popsMenuByArrowKeys() && (keyIdentifier == "Down" || k eyIdentifier == "Up"))
1189 || (renderTheme.popsMenuByAltDownUpOrF4Key() && (keyIdentifier == "Down" || keyIdentifier == "Up") && (keyEvent->altKey() || keyEvent->altGraphKey())) 1189 || (renderTheme.popsMenuByAltDownUpOrF4Key() && (keyIdentifier == "Down" || keyIdentifier == "Up") && keyEvent->altKey())
1190 || (renderTheme.popsMenuByAltDownUpOrF4Key() && (!keyEvent->altKey() && !keyEvent->ctrlKey() && keyIdentifier == "F4"))); 1190 || (renderTheme.popsMenuByAltDownUpOrF4Key() && (!keyEvent->altKey() && !keyEvent->ctrlKey() && keyIdentifier == "F4")));
1191 } 1191 }
1192 1192
1193 bool HTMLSelectElement::shouldOpenPopupForKeyPressEvent(KeyboardEvent *event) 1193 bool HTMLSelectElement::shouldOpenPopupForKeyPressEvent(KeyboardEvent *event)
1194 { 1194 {
1195 RenderTheme& renderTheme = RenderTheme::theme(); 1195 RenderTheme& renderTheme = RenderTheme::theme();
1196 int keyCode = event->keyCode(); 1196 int keyCode = event->keyCode();
1197 1197
1198 return ((renderTheme.popsMenuBySpaceKey() && event->keyCode() == ' ') 1198 return ((renderTheme.popsMenuBySpaceKey() && event->keyCode() == ' ')
1199 || (renderTheme.popsMenuByReturnKey() && keyCode == '\r')); 1199 || (renderTheme.popsMenuByReturnKey() && keyCode == '\r'));
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 int focusedIndex = activeSelectionEndListIndex(); 1735 int focusedIndex = activeSelectionEndListIndex();
1736 if (focusedIndex < 0) 1736 if (focusedIndex < 0)
1737 focusedIndex = firstSelectableListIndex(); 1737 focusedIndex = firstSelectableListIndex();
1738 if (focusedIndex < 0) 1738 if (focusedIndex < 0)
1739 return nullptr; 1739 return nullptr;
1740 HTMLElement* focused = listItems()[focusedIndex]; 1740 HTMLElement* focused = listItems()[focusedIndex];
1741 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr ; 1741 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr ;
1742 } 1742 }
1743 1743
1744 } // namespace 1744 } // namespace
OLDNEW
« no previous file with comments | « Source/core/events/KeyboardEvent.idl ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698