| OLD | NEW |
| 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 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 | 1811 |
| 1812 if (m_focusedElement == newFocusedElement) | 1812 if (m_focusedElement == newFocusedElement) |
| 1813 return true; | 1813 return true; |
| 1814 | 1814 |
| 1815 bool focusChangeBlocked = false; | 1815 bool focusChangeBlocked = false; |
| 1816 RefPtr<Element> oldFocusedElement = m_focusedElement; | 1816 RefPtr<Element> oldFocusedElement = m_focusedElement; |
| 1817 m_focusedElement = nullptr; | 1817 m_focusedElement = nullptr; |
| 1818 | 1818 |
| 1819 // Remove focus from the existing focus node (if any) | 1819 // Remove focus from the existing focus node (if any) |
| 1820 if (oldFocusedElement) { | 1820 if (oldFocusedElement) { |
| 1821 ASSERT(!oldFocusedElement->inDetach()); | |
| 1822 | |
| 1823 if (oldFocusedElement->active()) | 1821 if (oldFocusedElement->active()) |
| 1824 oldFocusedElement->setActive(false); | 1822 oldFocusedElement->setActive(false); |
| 1825 | 1823 |
| 1826 oldFocusedElement->setFocus(false); | 1824 oldFocusedElement->setFocus(false); |
| 1827 | 1825 |
| 1828 // Dispatch the blur event and let the node do any other blur related ac
tivities (important for text fields) | 1826 // Dispatch the blur event and let the node do any other blur related ac
tivities (important for text fields) |
| 1829 // If page lost focus, blur event will have already been dispatched | 1827 // If page lost focus, blur event will have already been dispatched |
| 1830 if (page() && (page()->focusController().isFocused())) { | 1828 if (page() && (page()->focusController().isFocused())) { |
| 1831 oldFocusedElement->dispatchBlurEvent(newFocusedElement.get()); | 1829 oldFocusedElement->dispatchBlurEvent(newFocusedElement.get()); |
| 1832 | 1830 |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2797 using namespace blink; | 2795 using namespace blink; |
| 2798 void showLiveDocumentInstances() | 2796 void showLiveDocumentInstances() |
| 2799 { | 2797 { |
| 2800 WeakDocumentSet& set = liveDocumentSet(); | 2798 WeakDocumentSet& set = liveDocumentSet(); |
| 2801 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 2799 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 2802 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 2800 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
| 2803 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 2801 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
| 2804 } | 2802 } |
| 2805 } | 2803 } |
| 2806 #endif | 2804 #endif |
| OLD | NEW |