OLD | NEW |
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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 return; | 413 return; |
414 } | 414 } |
415 | 415 |
416 if (DateTimeEditElement* edit = dateTimeEditElement()) | 416 if (DateTimeEditElement* edit = dateTimeEditElement()) |
417 edit->defaultEventHandler(event); | 417 edit->defaultEventHandler(event); |
418 } | 418 } |
419 | 419 |
420 void BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged() | 420 void BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged() |
421 { | 421 { |
422 spinButtonElement()->releaseCapture(); | 422 spinButtonElement()->releaseCapture(); |
423 clearButtonElement()->releaseCapture(); | |
424 if (DateTimeEditElement* edit = dateTimeEditElement()) | 423 if (DateTimeEditElement* edit = dateTimeEditElement()) |
425 edit->disabledStateChanged(); | 424 edit->disabledStateChanged(); |
426 } | 425 } |
427 | 426 |
428 void BaseMultipleFieldsDateAndTimeInputType::requiredAttributeChanged() | 427 void BaseMultipleFieldsDateAndTimeInputType::requiredAttributeChanged() |
429 { | 428 { |
430 clearButtonElement()->releaseCapture(); | |
431 updateClearButtonVisibility(); | 429 updateClearButtonVisibility(); |
432 } | 430 } |
433 | 431 |
434 void BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent(KeyboardEvent* e
vent) | 432 void BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent(KeyboardEvent* e
vent) |
435 { | 433 { |
436 if (m_pickerIndicatorIsVisible | 434 if (m_pickerIndicatorIsVisible |
437 && ((event->keyIdentifier() == "Down" && event->getModifierState("Alt"))
|| (RenderTheme::theme().shouldOpenPickerWithF4Key() && event->keyIdentifier()
== "F4"))) { | 435 && ((event->keyIdentifier() == "Down" && event->getModifierState("Alt"))
|| (RenderTheme::theme().shouldOpenPickerWithF4Key() && event->keyIdentifier()
== "F4"))) { |
438 if (PickerIndicatorElement* element = pickerIndicatorElement()) | 436 if (PickerIndicatorElement* element = pickerIndicatorElement()) |
439 element->openPopup(); | 437 element->openPopup(); |
440 event->setDefaultHandled(); | 438 event->setDefaultHandled(); |
(...skipping 19 matching lines...) Expand all Loading... |
460 } | 458 } |
461 | 459 |
462 void BaseMultipleFieldsDateAndTimeInputType::minOrMaxAttributeChanged() | 460 void BaseMultipleFieldsDateAndTimeInputType::minOrMaxAttributeChanged() |
463 { | 461 { |
464 updateView(); | 462 updateView(); |
465 } | 463 } |
466 | 464 |
467 void BaseMultipleFieldsDateAndTimeInputType::readonlyAttributeChanged() | 465 void BaseMultipleFieldsDateAndTimeInputType::readonlyAttributeChanged() |
468 { | 466 { |
469 spinButtonElement()->releaseCapture(); | 467 spinButtonElement()->releaseCapture(); |
470 clearButtonElement()->releaseCapture(); | |
471 if (DateTimeEditElement* edit = dateTimeEditElement()) | 468 if (DateTimeEditElement* edit = dateTimeEditElement()) |
472 edit->readOnlyStateChanged(); | 469 edit->readOnlyStateChanged(); |
473 } | 470 } |
474 | 471 |
475 void BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState(const FormC
ontrolState& state) | 472 void BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState(const FormC
ontrolState& state) |
476 { | 473 { |
477 DateTimeEditElement* edit = dateTimeEditElement(); | 474 DateTimeEditElement* edit = dateTimeEditElement(); |
478 if (!edit) | 475 if (!edit) |
479 return; | 476 return; |
480 DateTimeFieldsState dateTimeFieldsState = DateTimeFieldsState::restoreFormCo
ntrolState(state); | 477 DateTimeFieldsState dateTimeFieldsState = DateTimeFieldsState::restoreFormCo
ntrolState(state); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 AXObject* BaseMultipleFieldsDateAndTimeInputType::popupRootAXObject() | 626 AXObject* BaseMultipleFieldsDateAndTimeInputType::popupRootAXObject() |
630 { | 627 { |
631 if (PickerIndicatorElement* picker = pickerIndicatorElement()) | 628 if (PickerIndicatorElement* picker = pickerIndicatorElement()) |
632 return picker->popupRootAXObject(); | 629 return picker->popupRootAXObject(); |
633 return 0; | 630 return 0; |
634 } | 631 } |
635 | 632 |
636 } // namespace blink | 633 } // namespace blink |
637 | 634 |
638 #endif | 635 #endif |
OLD | NEW |