Move RenderLayer::scrolledContentOffset calls to a common function
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Feb 2012 19:59:42 +0000 (19:59 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Feb 2012 19:59:42 +0000 (19:59 +0000)
commit850e0e2db6c93528cee37127f9a0315010bfd155
treed92f06a6a0cd0db79e9bec781626c979c89f5ff4
parent2b99f66cfffecaf5ee52dc63921d36ba30ad1211
Move RenderLayer::scrolledContentOffset calls to a common function
https://bugs.webkit.org/show_bug.cgi?id=76971

Reviewed by David Hyatt.

Refactoring without any change in behavior.

This change adds a RenderBox::scrolledContentOffset function to handle all
the calls that goes through the layer(). This indirection will enable us to
add layer() checks without patching a lot of call sites as part of bug 75568.

We also moved down the concept of scroll offset down to RenderBox where it belongs!

* rendering/RenderLayer.h:
(RenderLayer):
(WebCore::RenderLayer::scrolledContentOffset):
Moved scrolledContent to the private section of the class to prevent misuse.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::scrolledContentOffset):
New function to add an indirection with RenderLayer.

* editing/visible_units.cpp:
(WebCore::absoluteLineDirectionPointToLocalPointInBlock):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::selectionGapRectsForRepaint):
(WebCore::RenderBlock::paintSelection):
(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::offsetForContents):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetFromContainer):
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint):
(WebCore::RenderInline::computeRectForRepaint):
(WebCore::RenderInline::offsetFromContainer):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::offsetFromContainer):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlInnerBlock::positionForPoint):
Patched all those call sites to use the new function.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/visible_units.cpp
Source/WebCore/rendering/LayoutState.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLayer.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.cpp