[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


           Summary: Simplify the loop in
           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)
        if (node->isShadowRoot())
    if (!shouldEventCrossShadowBoundary(event, toShadowRoot(node), targetStack.last()))

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