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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2835223003: Use kCamelCase in Document::ListenerType enum (Closed)
Patch Set: renamed Created 3 years, 7 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 child = child->previousSibling()) { 1512 child = child->previousSibling()) {
1513 if (child == child1) 1513 if (child == child1)
1514 return kDocumentPositionFollowing | connection; 1514 return kDocumentPositionFollowing | connection;
1515 } 1515 }
1516 return kDocumentPositionPreceding | connection; 1516 return kDocumentPositionPreceding | connection;
1517 } 1517 }
1518 } 1518 }
1519 1519
1520 // There was no difference between the two parent chains, i.e., one was a 1520 // There was no difference between the two parent chains, i.e., one was a
1521 // subset of the other. The shorter chain is the ancestor. 1521 // subset of the other. The shorter chain is the ancestor.
1522 return index1 < index2 1522 return index1 < index2 ? kDocumentPositionFollowing |
1523 ? kDocumentPositionFollowing | kDocumentPositionContainedBy | 1523 kDocumentPositionContainedBy | connection
1524 connection 1524 : kDocumentPositionPreceding |
1525 : kDocumentPositionPreceding | kDocumentPositionContains | 1525 kDocumentPositionContains | connection;
1526 connection;
1527 } 1526 }
1528 1527
1529 String Node::DebugName() const { 1528 String Node::DebugName() const {
1530 StringBuilder name; 1529 StringBuilder name;
1531 AppendUnsafe(name, DebugNodeName()); 1530 AppendUnsafe(name, DebugNodeName());
1532 if (IsElementNode()) { 1531 if (IsElementNode()) {
1533 const Element& this_element = ToElement(*this); 1532 const Element& this_element = ToElement(*this);
1534 if (this_element.HasID()) { 1533 if (this_element.HasID()) {
1535 name.Append(" id=\'"); 1534 name.Append(" id=\'");
1536 AppendUnsafe(name, this_element.GetIdAttribute()); 1535 AppendUnsafe(name, this_element.GetIdAttribute());
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 } 2118 }
2120 2119
2121 void Node::DispatchSubtreeModifiedEvent() { 2120 void Node::DispatchSubtreeModifiedEvent() {
2122 if (IsInShadowTree()) 2121 if (IsInShadowTree())
2123 return; 2122 return;
2124 2123
2125 #if DCHECK_IS_ON() 2124 #if DCHECK_IS_ON()
2126 DCHECK(!EventDispatchForbiddenScope::IsEventDispatchForbidden()); 2125 DCHECK(!EventDispatchForbiddenScope::IsEventDispatchForbidden());
2127 #endif 2126 #endif
2128 2127
2129 if (!GetDocument().HasListenerType(Document::DOMSUBTREEMODIFIED_LISTENER)) 2128 if (!GetDocument().HasListenerType(Document::kDOMSubtreeModifiedListener))
2130 return; 2129 return;
2131 2130
2132 DispatchScopedEvent( 2131 DispatchScopedEvent(
2133 MutationEvent::Create(EventTypeNames::DOMSubtreeModified, true)); 2132 MutationEvent::Create(EventTypeNames::DOMSubtreeModified, true));
2134 } 2133 }
2135 2134
2136 DispatchEventResult Node::DispatchDOMActivateEvent(int detail, 2135 DispatchEventResult Node::DispatchDOMActivateEvent(int detail,
2137 Event& underlying_event) { 2136 Event& underlying_event) {
2138 #if DCHECK_IS_ON() 2137 #if DCHECK_IS_ON()
2139 DCHECK(!EventDispatchForbiddenScope::IsEventDispatchForbidden()); 2138 DCHECK(!EventDispatchForbiddenScope::IsEventDispatchForbidden());
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 if (node) { 2567 if (node) {
2569 std::stringstream stream; 2568 std::stringstream stream;
2570 node->PrintNodePathTo(stream); 2569 node->PrintNodePathTo(stream);
2571 LOG(INFO) << stream.str(); 2570 LOG(INFO) << stream.str();
2572 } else { 2571 } else {
2573 LOG(INFO) << "Cannot showNodePath for <null>"; 2572 LOG(INFO) << "Cannot showNodePath for <null>";
2574 } 2573 }
2575 } 2574 }
2576 2575
2577 #endif 2576 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698