[webkit-reviews] review granted: [Bug 121882] Clean up some uses of first/lastChildSlow : [Attachment 212525] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 24 17:32:25 PDT 2013


Andreas Kling <akling at apple.com> has granted Antti Koivisto <koivisto at iki.fi>'s
request for review:
Bug 121882: Clean up some uses of first/lastChildSlow
https://bugs.webkit.org/show_bug.cgi?id=121882

Attachment 212525: patch
https://bugs.webkit.org/attachment.cgi?id=212525&action=review

------- Additional Comments from Andreas Kling <akling at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=212525&action=review


r=me

> Source/WebCore/dom/Position.cpp:857
> +    for (RenderObject *o = renderer.firstChild(); o && o != stop; o =
o->nextInPreOrder())

* placement

> Source/WebCore/rendering/RenderBlock.cpp:1074
> +    if (anonymousBlock->continuation() || anonymousBlock->beingDestroyed())
>	   return false;

We should postpone the continuation() check if possible, since it does a hash
lookup.

> Source/WebCore/rendering/RenderBlock.cpp:5956
> -    RenderObject* firstLetterBlock = findFirstLetterBlock(this);
> +    RenderElement* firstLetterBlock = findFirstLetterBlock(this);

I think we can make findFirstLetterBlock() return RenderBlock*.


More information about the webkit-reviews mailing list