Use lineageOfType to simplify two rendering helpers.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Jan 2014 11:45:54 +0000 (11:45 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Jan 2014 11:45:54 +0000 (11:45 +0000)
commit5d701779b5ded3a75f651eb1afff364c27b4ad20
tree1fac5a7e317751f589101a91a8b7621994a791a2
parentd2d67bae934b1ae6c63f13503046323d41189867
Use lineageOfType to simplify two rendering helpers.
<https://webkit.org/b/126498>

Reviewed by Antti Koivisto.

* rendering/RenderRuby.cpp:
(WebCore::findRubyRunParent):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::findTreeRootObject):

    Simplify two functions that walk their parent chain to find the
    closest ancestor of a certain type.

* rendering/RenderRubyRun.h:

    Add requisite isRendererOfType<RenderRubyRun>().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderRuby.cpp
Source/WebCore/rendering/RenderRubyRun.h
Source/WebCore/rendering/svg/SVGRenderSupport.cpp