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

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

Issue 694703002: Remove lots of dead virtuals from Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/Element.cpp ('k') | sky/engine/core/events/EventDispatcher.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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 for (HashSet<RawPtr<MutationObserverRegistration> >::iterator iter = transientRegistry->begin(); iter != transientRegistry->end(); ++iter) 1727 for (HashSet<RawPtr<MutationObserverRegistration> >::iterator iter = transientRegistry->begin(); iter != transientRegistry->end(); ++iter)
1728 (*iter)->observedSubtreeNodeWillDetach(*this); 1728 (*iter)->observedSubtreeNodeWillDetach(*this);
1729 } 1729 }
1730 } 1730 }
1731 } 1731 }
1732 1732
1733 void Node::handleLocalEvents(Event* event) 1733 void Node::handleLocalEvents(Event* event)
1734 { 1734 {
1735 if (!hasEventTargetData()) 1735 if (!hasEventTargetData())
1736 return; 1736 return;
1737
1738 if (isDisabledFormControl(this) && event->isMouseEvent())
1739 return;
1740
1741 fireEventListeners(event); 1737 fireEventListeners(event);
1742 } 1738 }
1743 1739
1744 void Node::dispatchScopedEvent(PassRefPtr<Event> event) 1740 void Node::dispatchScopedEvent(PassRefPtr<Event> event)
1745 { 1741 {
1746 dispatchScopedEventDispatchMediator(EventDispatchMediator::create(event)); 1742 dispatchScopedEventDispatchMediator(EventDispatchMediator::create(event));
1747 } 1743 }
1748 1744
1749 void Node::dispatchScopedEventDispatchMediator(PassRefPtr<EventDispatchMediator> eventDispatchMediator) 1745 void Node::dispatchScopedEventDispatchMediator(PassRefPtr<EventDispatchMediator> eventDispatchMediator)
1750 { 1746 {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 dispatchInputEvent(); 1840 dispatchInputEvent();
1845 } 1841 }
1846 } 1842 }
1847 1843
1848 void Node::willCallDefaultEventHandler(const Event&) 1844 void Node::willCallDefaultEventHandler(const Event&)
1849 { 1845 {
1850 } 1846 }
1851 1847
1852 bool Node::willRespondToMouseMoveEvents() 1848 bool Node::willRespondToMouseMoveEvents()
1853 { 1849 {
1854 if (isDisabledFormControl(this))
1855 return false;
1856 return hasEventListeners(EventTypeNames::mousemove) || hasEventListeners(Eve ntTypeNames::mouseover) || hasEventListeners(EventTypeNames::mouseout); 1850 return hasEventListeners(EventTypeNames::mousemove) || hasEventListeners(Eve ntTypeNames::mouseover) || hasEventListeners(EventTypeNames::mouseout);
1857 } 1851 }
1858 1852
1859 bool Node::willRespondToMouseClickEvents() 1853 bool Node::willRespondToMouseClickEvents()
1860 { 1854 {
1861 if (isDisabledFormControl(this))
1862 return false;
1863 return isContentEditable(UserSelectAllIsAlwaysNonEditable) || hasEventListen ers(EventTypeNames::mouseup) || hasEventListeners(EventTypeNames::mousedown) || hasEventListeners(EventTypeNames::click) || hasEventListeners(EventTypeNames::DO MActivate); 1855 return isContentEditable(UserSelectAllIsAlwaysNonEditable) || hasEventListen ers(EventTypeNames::mouseup) || hasEventListeners(EventTypeNames::mousedown) || hasEventListeners(EventTypeNames::click) || hasEventListeners(EventTypeNames::DO MActivate);
1864 } 1856 }
1865 1857
1866 bool Node::willRespondToTouchEvents() 1858 bool Node::willRespondToTouchEvents()
1867 { 1859 {
1868 if (isDisabledFormControl(this))
1869 return false;
1870 return hasEventListeners(EventTypeNames::touchstart) || hasEventListeners(Ev entTypeNames::touchmove) || hasEventListeners(EventTypeNames::touchcancel) || ha sEventListeners(EventTypeNames::touchend); 1860 return hasEventListeners(EventTypeNames::touchstart) || hasEventListeners(Ev entTypeNames::touchmove) || hasEventListeners(EventTypeNames::touchcancel) || ha sEventListeners(EventTypeNames::touchend);
1871 } 1861 }
1872 1862
1873 #if !ENABLE(OILPAN) 1863 #if !ENABLE(OILPAN)
1874 // This is here for inlining 1864 // This is here for inlining
1875 inline void TreeScope::removedLastRefToScope() 1865 inline void TreeScope::removedLastRefToScope()
1876 { 1866 {
1877 ASSERT_WITH_SECURITY_IMPLICATION(!deletionHasBegun()); 1867 ASSERT_WITH_SECURITY_IMPLICATION(!deletionHasBegun());
1878 if (m_guardRefCount) { 1868 if (m_guardRefCount) {
1879 // If removing a child removes the last self-only ref, we don't 1869 // If removing a child removes the last self-only ref, we don't
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 node->showTreeForThis(); 2048 node->showTreeForThis();
2059 } 2049 }
2060 2050
2061 void showNodePath(const blink::Node* node) 2051 void showNodePath(const blink::Node* node)
2062 { 2052 {
2063 if (node) 2053 if (node)
2064 node->showNodePathForThis(); 2054 node->showNodePathForThis();
2065 } 2055 }
2066 2056
2067 #endif 2057 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Element.cpp ('k') | sky/engine/core/events/EventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698