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

Unified Diff: Source/core/events/EventPath.cpp

Issue 323343004: [SVG2] The exposed event target should be the <use> element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase :P Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/svg/custom/use-instanceRoot-event-bubbling-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventPath.cpp
diff --git a/Source/core/events/EventPath.cpp b/Source/core/events/EventPath.cpp
index b0fddc962cf8eec19043bbb09f79f0b7c831d6d5..69488936a2984346aff78b8942e09b27eb7e81fc 100644
--- a/Source/core/events/EventPath.cpp
+++ b/Source/core/events/EventPath.cpp
@@ -43,14 +43,6 @@
namespace WebCore {
-// SVG1.1 specified that the <use> instance tree would expose the target
-// element for events. This has been deprecated and will be removed.
-// See: crbug.com/313438
-static bool usesDeprecatedSVGUseTreeEventRules(Node* node)
-{
- return node->isSVGElement() && toSVGElement(node)->inUseShadowTree();
-}
-
EventTarget* EventPath::eventTargetRespectingTargetRules(Node* referenceNode)
{
ASSERT(referenceNode);
@@ -108,8 +100,7 @@ void EventPath::resetWith(Node* node)
m_treeScopeEventContexts.clear();
calculatePath();
calculateAdjustedTargets();
- if (!usesDeprecatedSVGUseTreeEventRules(node))
- calculateTreeScopePrePostOrderNumbers();
+ calculateTreeScopePrePostOrderNumbers();
}
void EventPath::addNodeEventContext(Node* node)
@@ -211,7 +202,6 @@ TreeScopeEventContext* EventPath::ensureTreeScopeEventContext(Node* currentTarge
void EventPath::calculateAdjustedTargets()
{
const TreeScope* lastTreeScope = 0;
- bool useDeprecatedSVGUseTreeEventRules = usesDeprecatedSVGUseTreeEventRules(at(0).node());
TreeScopeEventContextMap treeScopeEventContextMap;
TreeScopeEventContext* lastTreeScopeEventContext = 0;
@@ -220,16 +210,7 @@ void EventPath::calculateAdjustedTargets()
Node* currentNode = at(i).node();
TreeScope& currentTreeScope = currentNode->treeScope();
if (lastTreeScope != &currentTreeScope) {
- if (!useDeprecatedSVGUseTreeEventRules) {
- lastTreeScopeEventContext = ensureTreeScopeEventContext(currentNode, &currentTreeScope, treeScopeEventContextMap);
- } else {
- TreeScopeEventContextMap::AddResult addResult = treeScopeEventContextMap.add(&currentTreeScope, TreeScopeEventContext::create(currentTreeScope));
- lastTreeScopeEventContext = addResult.storedValue->value.get();
- if (addResult.isNewEntry) {
- // Don't adjust an event target for SVG.
- lastTreeScopeEventContext->setTarget(eventTargetRespectingTargetRules(at(0).node()));
- }
- }
+ lastTreeScopeEventContext = ensureTreeScopeEventContext(currentNode, &currentTreeScope, treeScopeEventContextMap);
}
ASSERT(lastTreeScopeEventContext);
at(i).setTreeScopeEventContext(lastTreeScopeEventContext);
« no previous file with comments | « LayoutTests/svg/custom/use-instanceRoot-event-bubbling-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698