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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 541993003: Generate focusin for input type=date/time when selected by tab (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to latest master and updated test Created 6 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 3569 matching lines...) Expand 10 before | Expand all | Expand 10 after
3580 if (page() && (page()->focusController().isFocused())) { 3580 if (page() && (page()->focusController().isFocused())) {
3581 m_focusedElement->dispatchFocusEvent(oldFocusedElement.get(), type); 3581 m_focusedElement->dispatchFocusEvent(oldFocusedElement.get(), type);
3582 3582
3583 3583
3584 if (m_focusedElement != newFocusedElement) { 3584 if (m_focusedElement != newFocusedElement) {
3585 // handler shifted focus 3585 // handler shifted focus
3586 focusChangeBlocked = true; 3586 focusChangeBlocked = true;
3587 goto SetFocusedElementDone; 3587 goto SetFocusedElementDone;
3588 } 3588 }
3589 3589
3590 m_focusedElement->dispatchFocusInEvent(EventTypeNames::focusin, oldF ocusedElement.get()); // DOM level 3 bubbling focus event. 3590 m_focusedElement->dispatchFocusInEvent(EventTypeNames::focusin, oldF ocusedElement.get(), type); // DOM level 3 bubbling focus event.
3591 3591
3592 if (m_focusedElement != newFocusedElement) { 3592 if (m_focusedElement != newFocusedElement) {
3593 // handler shifted focus 3593 // handler shifted focus
3594 focusChangeBlocked = true; 3594 focusChangeBlocked = true;
3595 goto SetFocusedElementDone; 3595 goto SetFocusedElementDone;
3596 } 3596 }
3597 3597
3598 // FIXME: We should remove firing DOMFocusInEvent event when we are sure no content depends 3598 // FIXME: We should remove firing DOMFocusInEvent event when we are sure no content depends
3599 // on it, probably when <rdar://problem/8503958> is m. 3599 // on it, probably when <rdar://problem/8503958> is m.
3600 m_focusedElement->dispatchFocusInEvent(EventTypeNames::DOMFocusIn, o ldFocusedElement.get()); // DOM level 2 for compatibility. 3600 m_focusedElement->dispatchFocusInEvent(EventTypeNames::DOMFocusIn, o ldFocusedElement.get(), type); // DOM level 2 for compatibility.
3601 3601
3602 if (m_focusedElement != newFocusedElement) { 3602 if (m_focusedElement != newFocusedElement) {
3603 // handler shifted focus 3603 // handler shifted focus
3604 focusChangeBlocked = true; 3604 focusChangeBlocked = true;
3605 goto SetFocusedElementDone; 3605 goto SetFocusedElementDone;
3606 } 3606 }
3607 } 3607 }
3608 3608
3609 m_focusedElement->setFocus(true); 3609 m_focusedElement->setFocus(true);
3610 3610
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after
5827 using namespace blink; 5827 using namespace blink;
5828 void showLiveDocumentInstances() 5828 void showLiveDocumentInstances()
5829 { 5829 {
5830 WeakDocumentSet& set = liveDocumentSet(); 5830 WeakDocumentSet& set = liveDocumentSet();
5831 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5831 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5832 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 5832 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
5833 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 5833 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
5834 } 5834 }
5835 } 5835 }
5836 #endif 5836 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-focusin-event-expected.txt ('k') | Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698