| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |