| 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 BaseDateAndTimeInputType::destroyShadowSubtree(); | 354 BaseDateAndTimeInputType::destroyShadowSubtree(); |
| 355 } | 355 } |
| 356 | 356 |
| 357 void BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent(Node* oldFocusedNo
de, FocusDirection direction) | 357 void BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent(Node* oldFocusedNo
de, FocusDirection direction) |
| 358 { | 358 { |
| 359 if (!m_dateTimeEditElement) | 359 if (!m_dateTimeEditElement) |
| 360 return; | 360 return; |
| 361 if (direction == FocusDirectionBackward) { | 361 if (direction == FocusDirectionBackward) { |
| 362 if (element()->document()->page()) | 362 if (element()->document()->page()) |
| 363 element()->document()->page()->focusController()->advanceFocus(direc
tion, 0); | 363 element()->document()->page()->focusController()->advanceFocus(direc
tion, 0); |
| 364 } else if (direction == FocusDirectionNone) { | 364 } else if (direction == FocusDirectionNone || direction == FocusDirectionMou
se) { |
| 365 m_dateTimeEditElement->focusByOwner(oldFocusedNode); | 365 m_dateTimeEditElement->focusByOwner(oldFocusedNode); |
| 366 } else | 366 } else |
| 367 m_dateTimeEditElement->focusByOwner(); | 367 m_dateTimeEditElement->focusByOwner(); |
| 368 } | 368 } |
| 369 | 369 |
| 370 void BaseMultipleFieldsDateAndTimeInputType::forwardEvent(Event* event) | 370 void BaseMultipleFieldsDateAndTimeInputType::forwardEvent(Event* event) |
| 371 { | 371 { |
| 372 if (m_spinButtonElement) { | 372 if (m_spinButtonElement) { |
| 373 m_spinButtonElement->forwardEvent(event); | 373 m_spinButtonElement->forwardEvent(event); |
| 374 if (event->defaultHandled()) | 374 if (event->defaultHandled()) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 bool BaseMultipleFieldsDateAndTimeInputType::hasBadInput() const | 409 bool BaseMultipleFieldsDateAndTimeInputType::hasBadInput() const |
| 410 { | 410 { |
| 411 return element()->value().isEmpty() && m_dateTimeEditElement && m_dateTimeEd
itElement->anyEditableFieldsHaveValues(); | 411 return element()->value().isEmpty() && m_dateTimeEditElement && m_dateTimeEd
itElement->anyEditableFieldsHaveValues(); |
| 412 } | 412 } |
| 413 | 413 |
| 414 bool BaseMultipleFieldsDateAndTimeInputType::isKeyboardFocusable(KeyboardEvent*)
const | 414 bool BaseMultipleFieldsDateAndTimeInputType::isKeyboardFocusable(KeyboardEvent*)
const |
| 415 { | 415 { |
| 416 return element()->isFocusable(); | 416 return element()->isFocusable(); |
| 417 } | 417 } |
| 418 | 418 |
| 419 bool BaseMultipleFieldsDateAndTimeInputType::isMouseFocusable() const | |
| 420 { | |
| 421 return element()->isFocusable(); | |
| 422 } | |
| 423 | |
| 424 AtomicString BaseMultipleFieldsDateAndTimeInputType::localeIdentifier() const | 419 AtomicString BaseMultipleFieldsDateAndTimeInputType::localeIdentifier() const |
| 425 { | 420 { |
| 426 return element()->computeInheritedLanguage(); | 421 return element()->computeInheritedLanguage(); |
| 427 } | 422 } |
| 428 | 423 |
| 429 void BaseMultipleFieldsDateAndTimeInputType::minOrMaxAttributeChanged() | 424 void BaseMultipleFieldsDateAndTimeInputType::minOrMaxAttributeChanged() |
| 430 { | 425 { |
| 431 updateInnerTextValue(); | 426 updateInnerTextValue(); |
| 432 } | 427 } |
| 433 | 428 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 | 580 |
| 586 if (element()->isRequired() || !m_dateTimeEditElement->anyEditableFieldsHave
Values()) | 581 if (element()->isRequired() || !m_dateTimeEditElement->anyEditableFieldsHave
Values()) |
| 587 m_clearButton->setInlineStyleProperty(CSSPropertyVisibility, CSSValueHid
den); | 582 m_clearButton->setInlineStyleProperty(CSSPropertyVisibility, CSSValueHid
den); |
| 588 else | 583 else |
| 589 m_clearButton->removeInlineStyleProperty(CSSPropertyVisibility); | 584 m_clearButton->removeInlineStyleProperty(CSSPropertyVisibility); |
| 590 } | 585 } |
| 591 | 586 |
| 592 } // namespace WebCore | 587 } // namespace WebCore |
| 593 | 588 |
| 594 #endif | 589 #endif |
| OLD | NEW |