Make loops in RenderObject::containingBlock homogeneous in their forms to simplify
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2013 19:58:08 +0000 (19:58 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2013 19:58:08 +0000 (19:58 +0000)
commitc829a4bcdad49d702ed8af7662744c0c1e083f40
tree7a11c6171760833c5b0884a6a654cc1db3cf63b8
parent8a3e320c0f468b307834bf1f1b227c82e18622a0
Make loops in RenderObject::containingBlock homogeneous in their forms to simplify
https://bugs.webkit.org/show_bug.cgi?id=114853

Reviewed by David Hyatt.

This patch prepares us to avoid computing containing blocks during a depth-first traversal of the render tree.

Extracted inline functions out of RenderBlock::containingBlock to make the code simpler. Also moved the code
to obtain the nearest containing block out of the loop for a relatively positioned inline.

* rendering/RenderObject.cpp:
(WebCore::isNonReplacedInlineInFlowPosition): Extracted.
(WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Extracted.
(WebCore::isNonRenderBlockInline): Extracted.
(WebCore::RenderObject::containingBlock): Refactored as stated above.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObject.cpp