| 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 * 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "core/events/FocusEvent.h" | 38 #include "core/events/FocusEvent.h" |
| 39 #include "core/events/MouseEvent.h" | 39 #include "core/events/MouseEvent.h" |
| 40 #include "core/events/TouchEvent.h" | 40 #include "core/events/TouchEvent.h" |
| 41 #include "core/events/TouchEventContext.h" | 41 #include "core/events/TouchEventContext.h" |
| 42 #include "core/html/HTMLMediaElement.h" | 42 #include "core/html/HTMLMediaElement.h" |
| 43 #include "core/svg/SVGElementInstance.h" | 43 #include "core/svg/SVGElementInstance.h" |
| 44 #include "core/svg/SVGUseElement.h" | 44 #include "core/svg/SVGUseElement.h" |
| 45 | 45 |
| 46 namespace WebCore { | 46 namespace WebCore { |
| 47 | 47 |
| 48 Node* EventPath::parent(Node* node) | |
| 49 { | |
| 50 EventPath eventPath(node); | |
| 51 return eventPath.size() > 1 ? eventPath[1].node() : 0; | |
| 52 } | |
| 53 | |
| 54 EventTarget* EventPath::eventTargetRespectingTargetRules(Node* referenceNode) | 48 EventTarget* EventPath::eventTargetRespectingTargetRules(Node* referenceNode) |
| 55 { | 49 { |
| 56 ASSERT(referenceNode); | 50 ASSERT(referenceNode); |
| 57 | 51 |
| 58 if (referenceNode->isPseudoElement()) | 52 if (referenceNode->isPseudoElement()) |
| 59 return referenceNode->parentNode(); | 53 return referenceNode->parentNode(); |
| 60 | 54 |
| 61 if (!referenceNode->isSVGElement() || !referenceNode->isInShadowTree()) | 55 if (!referenceNode->isSVGElement() || !referenceNode->isInShadowTree()) |
| 62 return referenceNode; | 56 return referenceNode; |
| 63 | 57 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 369 |
| 376 #ifndef NDEBUG | 370 #ifndef NDEBUG |
| 377 void EventPath::checkReachability(TreeScope& treeScope, TouchList& touchList) | 371 void EventPath::checkReachability(TreeScope& treeScope, TouchList& touchList) |
| 378 { | 372 { |
| 379 for (size_t i = 0; i < touchList.length(); ++i) | 373 for (size_t i = 0; i < touchList.length(); ++i) |
| 380 ASSERT(touchList.item(i)->target()->toNode()->treeScope().isInclusiveOld
erSiblingShadowRootOrAncestorTreeScopeOf(treeScope)); | 374 ASSERT(touchList.item(i)->target()->toNode()->treeScope().isInclusiveOld
erSiblingShadowRootOrAncestorTreeScopeOf(treeScope)); |
| 381 } | 375 } |
| 382 #endif | 376 #endif |
| 383 | 377 |
| 384 } // namespace | 378 } // namespace |
| OLD | NEW |