[webkit-reviews] review granted: [Bug 122494] Use references in EventRetargeter::calculateEventPath and EventRetargeter::eventTargetRespectingTargetRules : [Attachment 213669] Fixed EFL build

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 8 05:36:26 PDT 2013


Antti Koivisto <koivisto at iki.fi> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 122494: Use references in EventRetargeter::calculateEventPath and
EventRetargeter::eventTargetRespectingTargetRules
https://bugs.webkit.org/show_bug.cgi?id=122494

Attachment 213669: Fixed EFL build
https://bugs.webkit.org/attachment.cgi?id=213669&action=review

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=213669&action=review


> Source/WebCore/dom/EventRetargeter.cpp:89
> +    EventTarget* target = 0;
>  
> -    for (Node* node = nodeOrHostIfPseudoElement(targetNode); node; node =
node->parentOrShadowHostNode()) {
> -	   if (targetStack.isEmpty())
> -	       targetStack.append(eventTargetRespectingTargetRules(node));
> +    for (Node* node = nodeOrHostIfPseudoElement(&targetNode); node; node =
node->parentOrShadowHostNode()) {
> +	   if (!target)
> +	       target = &eventTargetRespectingTargetRules(*node);
> +

You could make target a reference too by moving the initialisation out of the
loop.

> Source/WebCore/dom/EventRetargeter.h:73
> +inline EventTarget& EventRetargeter::eventTargetRespectingTargetRules(Node&
referenceNode)
>  {

This could probably be moved out of line.


More information about the webkit-reviews mailing list