Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp

Issue 852083002: Propagate focus type to plugins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h ('k') | Source/core/html/forms/InputTypeView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698