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

Side by Side Diff: Source/core/events/TreeScopeEventContext.h

Issue 637223008: Use C++11 range-based loop in core/events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/events/ScopedEventQueue.cpp ('k') | Source/core/events/TreeScopeEventContext.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) 2014 Google Inc. All Rights Reserved. 2 * Copyright (C) 2014 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #if ENABLE(ASSERT) 76 #if ENABLE(ASSERT)
77 bool isUnreachableNode(EventTarget&); 77 bool isUnreachableNode(EventTarget&);
78 #endif 78 #endif
79 79
80 RawPtrWillBeMember<TreeScope> m_treeScope; 80 RawPtrWillBeMember<TreeScope> m_treeScope;
81 RefPtrWillBeMember<EventTarget> m_target; 81 RefPtrWillBeMember<EventTarget> m_target;
82 RefPtrWillBeMember<EventTarget> m_relatedTarget; 82 RefPtrWillBeMember<EventTarget> m_relatedTarget;
83 RefPtrWillBeMember<StaticNodeList> m_eventPath; 83 RefPtrWillBeMember<StaticNodeList> m_eventPath;
84 RefPtrWillBeMember<TouchEventContext> m_touchEventContext; 84 RefPtrWillBeMember<TouchEventContext> m_touchEventContext;
85 85
86 WillBeHeapVector<RawPtrWillBeMember<TreeScopeEventContext> > m_children; 86 WillBeHeapVector<RawPtrWillBeMember<TreeScopeEventContext>> m_children;
87 int m_preOrder; 87 int m_preOrder;
88 int m_postOrder; 88 int m_postOrder;
89 }; 89 };
90 90
91 #if ENABLE(ASSERT) 91 #if ENABLE(ASSERT)
92 inline bool TreeScopeEventContext::isUnreachableNode(EventTarget& target) 92 inline bool TreeScopeEventContext::isUnreachableNode(EventTarget& target)
93 { 93 {
94 // FIXME: Checks also for SVG elements. 94 // FIXME: Checks also for SVG elements.
95 return target.toNode() && !target.toNode()->isSVGElement() && !target.toNode ()->treeScope().isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(treeScope ()); 95 return target.toNode() && !target.toNode()->isSVGElement() && !target.toNode ()->treeScope().isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf(treeScope ());
96 } 96 }
(...skipping 15 matching lines...) Expand all
112 112
113 inline bool TreeScopeEventContext::isInclusiveAncestorOf(const TreeScopeEventCon text& other) 113 inline bool TreeScopeEventContext::isInclusiveAncestorOf(const TreeScopeEventCon text& other)
114 { 114 {
115 ASSERT(m_preOrder != -1 && m_postOrder != -1 && other.m_preOrder != -1 && ot her.m_postOrder != -1); 115 ASSERT(m_preOrder != -1 && m_postOrder != -1 && other.m_preOrder != -1 && ot her.m_postOrder != -1);
116 return m_preOrder <= other.m_preOrder && other.m_postOrder <= m_postOrder; 116 return m_preOrder <= other.m_preOrder && other.m_postOrder <= m_postOrder;
117 } 117 }
118 118
119 } 119 }
120 120
121 #endif // TreeScopeEventContext_h 121 #endif // TreeScopeEventContext_h
OLDNEW
« no previous file with comments | « Source/core/events/ScopedEventQueue.cpp ('k') | Source/core/events/TreeScopeEventContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698