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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 | 383 |
384 // If a field element has focus, set focus back to the <input> itself before | 384 // If a field element has focus, set focus back to the <input> itself before |
385 // deleting the field. This prevents unnecessary focusout/blur events. | 385 // deleting the field. This prevents unnecessary focusout/blur events. |
386 if (containsFocusedShadowElement()) | 386 if (containsFocusedShadowElement()) |
387 element().focus(); | 387 element().focus(); |
388 | 388 |
389 BaseDateAndTimeInputType::destroyShadowSubtree(); | 389 BaseDateAndTimeInputType::destroyShadowSubtree(); |
390 m_isDestroyingShadowSubtree = false; | 390 m_isDestroyingShadowSubtree = false; |
391 } | 391 } |
392 | 392 |
393 void BaseMultipleFieldsDateAndTimeInputType::handleFocusInEvent(Element* oldFocu
sedElement, FocusType type) | 393 void BaseMultipleFieldsDateAndTimeInputType::handleFocusInEvent(Element* oldFocu
sedElement, WebFocusType type) |
394 { | 394 { |
395 DateTimeEditElement* edit = dateTimeEditElement(); | 395 DateTimeEditElement* edit = dateTimeEditElement(); |
396 if (!edit || m_isDestroyingShadowSubtree) | 396 if (!edit || m_isDestroyingShadowSubtree) |
397 return; | 397 return; |
398 if (type == FocusTypeBackward) { | 398 if (type == WebFocusTypeBackward) { |
399 if (element().document().page()) | 399 if (element().document().page()) |
400 element().document().page()->focusController().advanceFocus(type); | 400 element().document().page()->focusController().advanceFocus(type); |
401 } else if (type == FocusTypeNone || type == FocusTypeMouse || type == FocusT
ypePage) { | 401 } else if (type == WebFocusTypeNone || type == WebFocusTypeMouse || type ==
WebFocusTypePage) { |
402 edit->focusByOwner(oldFocusedElement); | 402 edit->focusByOwner(oldFocusedElement); |
403 } else { | 403 } else { |
404 edit->focusByOwner(); | 404 edit->focusByOwner(); |
405 } | 405 } |
406 } | 406 } |
407 | 407 |
408 void BaseMultipleFieldsDateAndTimeInputType::forwardEvent(Event* event) | 408 void BaseMultipleFieldsDateAndTimeInputType::forwardEvent(Event* event) |
409 { | 409 { |
410 if (SpinButtonElement* element = spinButtonElement()) { | 410 if (SpinButtonElement* element = spinButtonElement()) { |
411 element->forwardEvent(event); | 411 element->forwardEvent(event); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 AXObject* BaseMultipleFieldsDateAndTimeInputType::popupRootAXObject() | 626 AXObject* BaseMultipleFieldsDateAndTimeInputType::popupRootAXObject() |
627 { | 627 { |
628 if (PickerIndicatorElement* picker = pickerIndicatorElement()) | 628 if (PickerIndicatorElement* picker = pickerIndicatorElement()) |
629 return picker->popupRootAXObject(); | 629 return picker->popupRootAXObject(); |
630 return nullptr; | 630 return nullptr; |
631 } | 631 } |
632 | 632 |
633 } // namespace blink | 633 } // namespace blink |
634 | 634 |
635 #endif | 635 #endif |
OLD | NEW |