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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 | 364 |
365 void BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent(Node* oldFocusedNo
de, FocusDirection direction) | 365 void BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent(Node* oldFocusedNo
de, FocusDirection direction) |
366 { | 366 { |
367 DateTimeEditElement* edit = dateTimeEditElement(); | 367 DateTimeEditElement* edit = dateTimeEditElement(); |
368 if (!edit || m_isDestroyingShadowSubtree) | 368 if (!edit || m_isDestroyingShadowSubtree) |
369 return; | 369 return; |
370 if (direction == FocusDirectionBackward) { | 370 if (direction == FocusDirectionBackward) { |
371 if (element()->document()->page()) | 371 if (element()->document()->page()) |
372 element()->document()->page()->focusController()->advanceFocus(direc
tion, 0); | 372 element()->document()->page()->focusController()->advanceFocus(direc
tion, 0); |
373 } else if (direction == FocusDirectionNone) { | 373 } else if (direction == FocusDirectionNone || direction == FocusDirectionMou
se) { |
374 edit->focusByOwner(oldFocusedNode); | 374 edit->focusByOwner(oldFocusedNode); |
375 } else | 375 } else |
376 edit->focusByOwner(); | 376 edit->focusByOwner(); |
377 } | 377 } |
378 | 378 |
379 void BaseMultipleFieldsDateAndTimeInputType::forwardEvent(Event* event) | 379 void BaseMultipleFieldsDateAndTimeInputType::forwardEvent(Event* event) |
380 { | 380 { |
381 if (SpinButtonElement* element = spinButtonElement()) { | 381 if (SpinButtonElement* element = spinButtonElement()) { |
382 element->forwardEvent(event); | 382 element->forwardEvent(event); |
383 if (event->defaultHandled()) | 383 if (event->defaultHandled()) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 { | 419 { |
420 DateTimeEditElement* edit = dateTimeEditElement(); | 420 DateTimeEditElement* edit = dateTimeEditElement(); |
421 return element()->value().isEmpty() && edit && edit->anyEditableFieldsHaveVa
lues(); | 421 return element()->value().isEmpty() && edit && edit->anyEditableFieldsHaveVa
lues(); |
422 } | 422 } |
423 | 423 |
424 bool BaseMultipleFieldsDateAndTimeInputType::isKeyboardFocusable(KeyboardEvent*)
const | 424 bool BaseMultipleFieldsDateAndTimeInputType::isKeyboardFocusable(KeyboardEvent*)
const |
425 { | 425 { |
426 return element()->isFocusable(); | 426 return element()->isFocusable(); |
427 } | 427 } |
428 | 428 |
429 bool BaseMultipleFieldsDateAndTimeInputType::isMouseFocusable() const | |
430 { | |
431 return element()->isFocusable(); | |
432 } | |
433 | |
434 AtomicString BaseMultipleFieldsDateAndTimeInputType::localeIdentifier() const | 429 AtomicString BaseMultipleFieldsDateAndTimeInputType::localeIdentifier() const |
435 { | 430 { |
436 return element()->computeInheritedLanguage(); | 431 return element()->computeInheritedLanguage(); |
437 } | 432 } |
438 | 433 |
439 void BaseMultipleFieldsDateAndTimeInputType::minOrMaxAttributeChanged() | 434 void BaseMultipleFieldsDateAndTimeInputType::minOrMaxAttributeChanged() |
440 { | 435 { |
441 updateInnerTextValue(); | 436 updateInnerTextValue(); |
442 } | 437 } |
443 | 438 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 | 593 |
599 if (element()->isRequired() || !dateTimeEditElement()->anyEditableFieldsHave
Values()) | 594 if (element()->isRequired() || !dateTimeEditElement()->anyEditableFieldsHave
Values()) |
600 clearButton->setInlineStyleProperty(CSSPropertyVisibility, CSSValueHidde
n); | 595 clearButton->setInlineStyleProperty(CSSPropertyVisibility, CSSValueHidde
n); |
601 else | 596 else |
602 clearButton->removeInlineStyleProperty(CSSPropertyVisibility); | 597 clearButton->removeInlineStyleProperty(CSSPropertyVisibility); |
603 } | 598 } |
604 | 599 |
605 } // namespace WebCore | 600 } // namespace WebCore |
606 | 601 |
607 #endif | 602 #endif |
OLD | NEW |