| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 // If a field element has focus, set focus back to the <input> itself before | 383 // If a field element has focus, set focus back to the <input> itself before |
| 384 // deleting the field. This prevents unnecessary focusout/blur events. | 384 // deleting the field. This prevents unnecessary focusout/blur events. |
| 385 if (containsFocusedShadowElement()) | 385 if (containsFocusedShadowElement()) |
| 386 element().focus(); | 386 element().focus(); |
| 387 | 387 |
| 388 BaseDateAndTimeInputType::destroyShadowSubtree(); | 388 BaseDateAndTimeInputType::destroyShadowSubtree(); |
| 389 m_isDestroyingShadowSubtree = false; | 389 m_isDestroyingShadowSubtree = false; |
| 390 } | 390 } |
| 391 | 391 |
| 392 void BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent(Element* oldFocuse
dElement, FocusType type) | 392 void BaseMultipleFieldsDateAndTimeInputType::handleFocusInEvent(Element* oldFocu
sedElement, FocusType type) |
| 393 { | 393 { |
| 394 DateTimeEditElement* edit = dateTimeEditElement(); | 394 DateTimeEditElement* edit = dateTimeEditElement(); |
| 395 if (!edit || m_isDestroyingShadowSubtree) | 395 if (!edit || m_isDestroyingShadowSubtree) |
| 396 return; | 396 return; |
| 397 if (type == FocusTypeBackward) { | 397 if (type == FocusTypeBackward) { |
| 398 if (element().document().page()) | 398 if (element().document().page()) |
| 399 element().document().page()->focusController().advanceFocus(type); | 399 element().document().page()->focusController().advanceFocus(type); |
| 400 } else if (type == FocusTypeNone || type == FocusTypeMouse || type == FocusT
ypePage) { | 400 } else if (type == FocusTypeNone || type == FocusTypeMouse || type == FocusT
ypePage) { |
| 401 edit->focusByOwner(oldFocusedElement); | 401 edit->focusByOwner(oldFocusedElement); |
| 402 } else { | 402 } else { |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 AXObject* BaseMultipleFieldsDateAndTimeInputType::popupRootAXObject() | 628 AXObject* BaseMultipleFieldsDateAndTimeInputType::popupRootAXObject() |
| 629 { | 629 { |
| 630 if (PickerIndicatorElement* picker = pickerIndicatorElement()) | 630 if (PickerIndicatorElement* picker = pickerIndicatorElement()) |
| 631 return picker->popupRootAXObject(); | 631 return picker->popupRootAXObject(); |
| 632 return 0; | 632 return 0; |
| 633 } | 633 } |
| 634 | 634 |
| 635 } // namespace blink | 635 } // namespace blink |
| 636 | 636 |
| 637 #endif | 637 #endif |
| OLD | NEW |