WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
122500
Simplify the loop in EventRetargeter::calculateEventPath
https://bugs.webkit.org/show_bug.cgi?id=122500
Summary
Simplify the loop in EventRetargeter::calculateEventPath
Ryosuke Niwa
Reported
2013-10-08 02:00:59 PDT
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.
Attachments
Cleanup
(2.96 KB, patch)
2013-10-08 12:39 PDT
,
Ryosuke Niwa
koivisto
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2013-10-08 12:39:09 PDT
Created
attachment 213706
[details]
Cleanup
Ryosuke Niwa
Comment 2
2013-10-08 12:43:05 PDT
Committed
r157127
: <
http://trac.webkit.org/changeset/157127
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug