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

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

Issue 826363003: Oilpan: fix build after r188594. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixup Created 5 years, 11 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/TreeScopeEventContext.h ('k') | no next file » | 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 16 matching lines...) Expand all
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" 33 #include "core/events/TouchEventContext.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 WillBeHeapVector<RefPtrWillBeRawPtr<EventTarget>>& TreeScopeEventContext::ensure EventPath(EventPath& path) 37 WillBeHeapVector<RefPtrWillBeMember<EventTarget>>& TreeScopeEventContext::ensure EventPath(EventPath& path)
38 { 38 {
39 if (m_eventPath) 39 if (m_eventPath)
40 return *m_eventPath; 40 return *m_eventPath;
41 41
42 m_eventPath = adoptPtrWillBeNoop(new WillBeHeapVector<RefPtrWillBeRawPtr<Eve ntTarget>>()); 42 m_eventPath = adoptPtrWillBeNoop(new WillBeHeapVector<RefPtrWillBeMember<Eve ntTarget>>());
43 LocalDOMWindow* window = path.windowEventContext().window(); 43 LocalDOMWindow* window = path.windowEventContext().window();
44 m_eventPath->reserveCapacity(path.size() + window ? 1 : 0); 44 m_eventPath->reserveCapacity(path.size() + window ? 1 : 0);
45 for (size_t i = 0; i < path.size(); ++i) { 45 for (size_t i = 0; i < path.size(); ++i) {
46 Node& rootNode = path[i].treeScopeEventContext().rootNode(); 46 Node& rootNode = path[i].treeScopeEventContext().rootNode();
47 if (rootNode.isShadowRoot() && toShadowRoot(rootNode).type() == ShadowRo ot::AuthorShadowRoot) 47 if (rootNode.isShadowRoot() && toShadowRoot(rootNode).type() == ShadowRo ot::AuthorShadowRoot)
48 m_eventPath->append(path[i].node()); 48 m_eventPath->append(path[i].node());
49 else if (path[i].treeScopeEventContext().isInclusiveAncestorOf(*this)) 49 else if (path[i].treeScopeEventContext().isInclusiveAncestorOf(*this))
50 m_eventPath->append(path[i].node()); 50 m_eventPath->append(path[i].node());
51 } 51 }
52 if (window) 52 if (window)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 int TreeScopeEventContext::calculatePrePostOrderNumber(int orderNumber) 92 int TreeScopeEventContext::calculatePrePostOrderNumber(int orderNumber)
93 { 93 {
94 m_preOrder = orderNumber; 94 m_preOrder = orderNumber;
95 for (size_t i = 0; i < m_children.size(); ++i) 95 for (size_t i = 0; i < m_children.size(); ++i)
96 orderNumber = m_children[i]->calculatePrePostOrderNumber(orderNumber + 1 ); 96 orderNumber = m_children[i]->calculatePrePostOrderNumber(orderNumber + 1 );
97 m_postOrder = orderNumber + 1; 97 m_postOrder = orderNumber + 1;
98 return orderNumber + 1; 98 return orderNumber + 1;
99 } 99 }
100 100
101 } 101 }
OLDNEW
« no previous file with comments | « Source/core/events/TreeScopeEventContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698