Optimize fetching the Node for never-anonymous renderers.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 12:16:13 +0000 (12:16 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 12:16:13 +0000 (12:16 +0000)
commit402fe41f5639e1f07a4ef4d8b29e73ec3c5d3324
tree27247a0006eb00208011970e6c332745f05b25d4
parent9fd1dd3c54cbb4c89efe8fc0da025729c527f342
Optimize fetching the Node for never-anonymous renderers.
<https://webkit.org/b/121627>

Reviewed by Antti Koivisto.

Add a RenderObject::nodeForNonAnonymous() that can be used instead
of node() when a renderer is guaranteed non-anonymous.

Use this to implement reference element getters for the various
renderers that are known at compile-time to correspond to a DOM node.

Also renamed existingElement() => element() since using an alternate
name for a reference overload isn't actually necessary.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
38 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/Text.h
Source/WebCore/html/HTMLFormControlElement.h
Source/WebCore/html/HTMLFrameOwnerElement.h
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/rendering/RenderButton.cpp
Source/WebCore/rendering/RenderCombineText.h
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h
Source/WebCore/rendering/RenderDetailsMarker.h
Source/WebCore/rendering/RenderFieldset.h
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderFrameSet.cpp
Source/WebCore/rendering/RenderGrid.h
Source/WebCore/rendering/RenderHTMLCanvas.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListItem.cpp
Source/WebCore/rendering/RenderListItem.h
Source/WebCore/rendering/RenderMedia.h
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderMultiColumnBlock.h
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderRuby.h
Source/WebCore/rendering/RenderRubyText.h
Source/WebCore/rendering/RenderTableCaption.h
Source/WebCore/rendering/RenderTableCol.cpp
Source/WebCore/rendering/RenderTableCol.h
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderTextControlMultiLine.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderWidget.h
Source/WebCore/rendering/svg/RenderSVGBlock.h
Source/WebCore/rendering/svg/RenderSVGInline.h
Source/WebCore/rendering/svg/RenderSVGInlineText.h
Source/WebCore/rendering/svg/RenderSVGModelObject.h
Source/WebCore/rendering/svg/RenderSVGResourceClipper.h
Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Source/WebCore/svg/SVGElement.h
Source/WebCore/svg/SVGGraphicsElement.h