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

Side by Side Diff: Source/core/dom/EventRetargeter.cpp

Issue 20246002: Rename ExperimentalShadowDOM runtime feature to ShadowDOM. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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/dom/Event.idl ('k') | Source/core/dom/shadow/ShadowRoot.idl » ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 break; 108 break;
109 if (!isSVGElement) { 109 if (!isSVGElement) {
110 ASSERT(!targetStack.isEmpty()); 110 ASSERT(!targetStack.isEmpty());
111 targetStack.removeLast(); 111 targetStack.removeLast();
112 } 112 }
113 } 113 }
114 } 114 }
115 115
116 void EventRetargeter::calculateAdjustedEventPathForEachNode(EventPath& eventPath ) 116 void EventRetargeter::calculateAdjustedEventPathForEachNode(EventPath& eventPath )
117 { 117 {
118 if (!RuntimeEnabledFeatures::experimentalShadowDOMEnabled()) 118 if (!RuntimeEnabledFeatures::shadowDOMEnabled())
119 return; 119 return;
120 TreeScope* lastScope = 0; 120 TreeScope* lastScope = 0;
121 size_t eventPathSize = eventPath.size(); 121 size_t eventPathSize = eventPath.size();
122 for (size_t i = 0; i < eventPathSize; ++i) { 122 for (size_t i = 0; i < eventPathSize; ++i) {
123 TreeScope* currentScope = eventPath[i]->node()->treeScope(); 123 TreeScope* currentScope = eventPath[i]->node()->treeScope();
124 if (currentScope == lastScope) { 124 if (currentScope == lastScope) {
125 // Fast path. 125 // Fast path.
126 eventPath[i]->setEventPath(eventPath[i - 1]->eventPath()); 126 eventPath[i]->setEventPath(eventPath[i - 1]->eventPath());
127 continue; 127 continue;
128 } 128 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 break; 274 break;
275 } 275 }
276 scope = scope->parentTreeScope(); 276 scope = scope->parentTreeScope();
277 } 277 }
278 for (Vector<TreeScope*, 32>::iterator iter = parentTreeScopes.begin(); iter < parentTreeScopes.end(); ++iter) 278 for (Vector<TreeScope*, 32>::iterator iter = parentTreeScopes.begin(); iter < parentTreeScopes.end(); ++iter)
279 relatedNodeMap.add(*iter, relatedNode); 279 relatedNodeMap.add(*iter, relatedNode);
280 return relatedNode; 280 return relatedNode;
281 } 281 }
282 282
283 } 283 }
OLDNEW
« no previous file with comments | « Source/core/dom/Event.idl ('k') | Source/core/dom/shadow/ShadowRoot.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698