[Webkit-unassigned] [Bug 122500] New: Simplify the loop in EventRetargeter::calculateEventPath
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 8 02:02:08 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=122500
Summary: Simplify the loop in
EventRetargeter::calculateEventPath
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Event Handling
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: rniwa at webkit.org
CC: sam at webkit.org, koivisto at iki.fi, benjamin at webkit.org,
akling at apple.com
The loop in EventRetargeter::calculateEventPath is better expressed as two nested loops along the line of:
for (Node* node = nodeOrHostIfPseudoElement(targetNode); node; node = toShadowRoot(node)->hostElement()) {
if (!target || !isSVGElement)
target = &eventTargetRespectingTargetRules(*node);
for (; node; node = node->parentNode()) {
...
if (!inDocument)
return;
if (node->isShadowRoot())
break;
}
if (!shouldEventCrossShadowBoundary(event, toShadowRoot(node), targetStack.last()))
return;
}
This codifies the semantics much more clearly.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list