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

Side by Side Diff: third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp

Issue 2045603002: Handle the "key" field as opposed to keyIdentifier field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove initialization of the view Created 4 years, 6 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 void MultipleFieldsTemporalInputTypeView::requiredAttributeChanged() 429 void MultipleFieldsTemporalInputTypeView::requiredAttributeChanged()
430 { 430 {
431 updateClearButtonVisibility(); 431 updateClearButtonVisibility();
432 } 432 }
433 433
434 void MultipleFieldsTemporalInputTypeView::handleKeydownEvent(KeyboardEvent* even t) 434 void MultipleFieldsTemporalInputTypeView::handleKeydownEvent(KeyboardEvent* even t)
435 { 435 {
436 if (!element().focused()) 436 if (!element().focused())
437 return; 437 return;
438 if (m_pickerIndicatorIsVisible 438 if (m_pickerIndicatorIsVisible
439 && ((event->keyIdentifier() == "Down" && event->getModifierState("Alt")) || (LayoutTheme::theme().shouldOpenPickerWithF4Key() && event->keyIdentifier() == "F4"))) { 439 && ((event->key() == "ArrowDown" && event->getModifierState("Alt")) || ( LayoutTheme::theme().shouldOpenPickerWithF4Key() && event->key() == "F4"))) {
440 if (PickerIndicatorElement* element = pickerIndicatorElement()) 440 if (PickerIndicatorElement* element = pickerIndicatorElement())
441 element->openPopup(); 441 element->openPopup();
442 event->setDefaultHandled(); 442 event->setDefaultHandled();
443 } else { 443 } else {
444 forwardEvent(event); 444 forwardEvent(event);
445 } 445 }
446 } 446 }
447 447
448 bool MultipleFieldsTemporalInputTypeView::hasBadInput() const 448 bool MultipleFieldsTemporalInputTypeView::hasBadInput() const
449 { 449 {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 } 625 }
626 626
627 AXObject* MultipleFieldsTemporalInputTypeView::popupRootAXObject() 627 AXObject* MultipleFieldsTemporalInputTypeView::popupRootAXObject()
628 { 628 {
629 if (PickerIndicatorElement* picker = pickerIndicatorElement()) 629 if (PickerIndicatorElement* picker = pickerIndicatorElement())
630 return picker->popupRootAXObject(); 630 return picker->popupRootAXObject();
631 return nullptr; 631 return nullptr;
632 } 632 }
633 633
634 } // namespace blink 634 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698