On Sep 14, 2010, at 5:41 PM, Dimitri Glazkov wrote:

> Sorry, I meant node->renderer()->node() != 0. My bad. This loop will
> always exit in in the first iteration.

It definitely is possible for renderers to have a null result from node(). I do 
not know for sure that it's impossible for node->renderer()->node() to be null 
under any circumstances. Anonymous renderers and inline continuations are among 
the ways a null node pointers. It might be that in all such circumstances, the 
renderer won't be returned by any node's renderer() method. It would be worth 
some analysis.

 - Maciej

> 
> :DG<
> 
> On Tue, Sep 14, 2010 at 4:45 PM, Adam Roben <aro...@apple.com> wrote:
>> On Sep 14, 2010, at 6:46 PM, Dimitri Glazkov wrote:
>> 
>>> I've been looking at this line here and it doesn't seem to make sense
>>> to me: 
>>> http://trac.webkit.org/browser/trunk/WebCore/page/EventHandler.cpp#L2153
>>> 
>>> It looks like the loop in question will always exit early, because it
>>> short-circuits to node->renderer()->node() == node, which seems like
>>> it always will be true. At least, that's what the layout tests say
>>> when I remove it.
>> 
>> I don't see anything in that loop that is equivalent to 
>> node->renderer()->node() == node. All I see are null-checks. Note that line 
>> 2154 declares a new variable with the name "node".
>> 
>> I don't know anything else about this code or what you're asking, though.
>> 
>> -Adam
>> 
>> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to