summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp b/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp
index fc7f7f0..4cd55c5 100644
--- a/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/TextControlInnerElements.cpp
@@ -63,18 +63,17 @@ bool RenderTextControlInnerBlock::nodeAtPoint(const HitTestRequest& request, Hit
VisiblePosition RenderTextControlInnerBlock::positionForPoint(const IntPoint& point)
{
- int contentsX = point.x();
- int contentsY = point.y();
+ IntPoint contentsPoint(point);
// Multiline text controls have the scroll on shadowAncestorNode, so we need to take that
// into account here.
if (m_multiLine) {
RenderTextControl* renderer = toRenderTextControl(node()->shadowAncestorNode()->renderer());
if (renderer->hasOverflowClip())
- renderer->layer()->addScrolledContentOffset(contentsX, contentsY);
+ contentsPoint += renderer->layer()->scrolledContentOffset();
}
- return RenderBlock::positionForPoint(IntPoint(contentsX, contentsY));
+ return RenderBlock::positionForPoint(contentsPoint);
}
TextControlInnerElement::TextControlInnerElement(Document* doc, Node* shadowParent)