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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 772743004: Remove more Node API. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/dom/CharacterData.h ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « sky/engine/core/dom/CharacterData.h ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698