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

Side by Side Diff: third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp

Issue 1455943002: [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 * 24 *
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/events/TreeScopeEventContext.h" 28 #include "core/events/TreeScopeEventContext.h"
29 29
30 #include "core/dom/StaticNodeList.h" 30 #include "core/dom/StaticNodeList.h"
31 #include "core/dom/shadow/ShadowRoot.h" 31 #include "core/dom/shadow/ShadowRoot.h"
32 #include "core/events/EventPath.h" 32 #include "core/events/EventPath.h"
33 #include "core/events/TouchEventContext.h"
34 33
35 namespace blink { 34 namespace blink {
36 35
37 bool TreeScopeEventContext::isUnclosedTreeOf(const TreeScopeEventContext& other) 36 bool TreeScopeEventContext::isUnclosedTreeOf(const TreeScopeEventContext& other)
38 { 37 {
39 // Exclude closed nodes if necessary. 38 // Exclude closed nodes if necessary.
40 // If a node is in a closed shadow root, or in a tree whose ancestor has a c losed shadow root, 39 // If a node is in a closed shadow root, or in a tree whose ancestor has a c losed shadow root,
41 // it should not be visible to nodes above the closed shadow root. 40 // it should not be visible to nodes above the closed shadow root.
42 41
43 // (1) If |this| is an ancestor of |other| in tree-of-trees, include it. 42 // (1) If |this| is an ancestor of |other| in tree-of-trees, include it.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 m_preOrder = orderNumber; 116 m_preOrder = orderNumber;
118 m_containingClosedShadowTree = (rootNode().isShadowRoot() && !toShadowRoot(r ootNode()).isOpen()) ? this : nearestAncestorClosedTreeScopeEventContext; 117 m_containingClosedShadowTree = (rootNode().isShadowRoot() && !toShadowRoot(r ootNode()).isOpen()) ? this : nearestAncestorClosedTreeScopeEventContext;
119 for (size_t i = 0; i < m_children.size(); ++i) 118 for (size_t i = 0; i < m_children.size(); ++i)
120 orderNumber = m_children[i]->calculateTreeOrderAndSetNearestAncestorClos edTree(orderNumber + 1, containingClosedShadowTree()); 119 orderNumber = m_children[i]->calculateTreeOrderAndSetNearestAncestorClos edTree(orderNumber + 1, containingClosedShadowTree());
121 m_postOrder = orderNumber + 1; 120 m_postOrder = orderNumber + 1;
122 121
123 return orderNumber + 1; 122 return orderNumber + 1;
124 } 123 }
125 124
126 } // namespace blink 125 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698