Clean up confused use of Document::renderer and renderView
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2012 23:37:12 +0000 (23:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2012 23:37:12 +0000 (23:37 +0000)
commitc14a850182518bf01ec1b8698ac5206feef660c3
tree939b9112392573218c03dbbf6ee81356dbcacde3
parent6c218bc4c435a1b00d010980d7aa331480e12155
Clean up confused use of Document::renderer and renderView
https://bugs.webkit.org/show_bug.cgi?id=101484

Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-11-07
Reviewed by Ojan Vafai.

Document::renderer and Document::renderView are the same thing, but it seems
people don't always realize it and check if document()->renderer() is a RenderView.

This patch cleans up usage of document()->renderer() and document()->renderView() and
simplifies the code that was written without realizing they were the same thing.

No new tests, this is just a refactor.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::visiblePositionForPoint): Lots of simplification.
* dom/Element.cpp:
(WebCore::Element::screenRect):
(WebCore::Element::unregisterNamedFlowContentNode): Remove unneeded conditional.
* editing/FrameSelection.cpp: Remove verbose casts.
(WebCore::clearRenderViewSelection):
(WebCore::FrameSelection::recomputeCaretRect):
(WebCore::CaretBase::invalidateCaretRect):
(WebCore::FrameSelection::focusedOrActiveStateChanged):
* page/Frame.cpp:
(WebCore::Frame::contentRenderer): Vastly simplified.
* page/PrintContext.cpp: Remove verbose casts.
(WebCore::PrintContext::computePageRects):
(WebCore::PrintContext::computePageRectsWithPageSizeInternal):
* page/wince/FrameWinCE.cpp:
(WebCore::computePageRectsForFrame): Remove unreachable code.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::maximalOutlineSize): Remove verbose cast.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/PrintContext.cpp
Source/WebCore/page/wince/FrameWinCE.cpp
Source/WebCore/rendering/RenderObject.cpp