summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderText.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/RenderText.cpp')
-rw-r--r--WebCore/rendering/RenderText.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/WebCore/rendering/RenderText.cpp b/WebCore/rendering/RenderText.cpp
index 7635d07..0d1bd91 100644
--- a/WebCore/rendering/RenderText.cpp
+++ b/WebCore/rendering/RenderText.cpp
@@ -429,7 +429,7 @@ VisiblePosition RenderText::positionForPoint(const IntPoint& point)
// at the y coordinate of the first line or above
// and the x coordinate is to the left of the first text box left edge
offset = firstTextBox()->offsetForPosition(pointLineDirection);
- return createVisiblePosition(offset + firstTextBox()->start(), DOWNSTREAM);
+ return createVisiblePosition(offset + firstTextBox()->start(), offset > 0 ? VP_UPSTREAM_IF_POSSIBLE : DOWNSTREAM);
}
if (lastTextBox() && pointBlockDirection >= lastTextBox()->root()->selectionTop() && pointLineDirection >= lastTextBox()->logicalRight()) {
// at the y coordinate of the last line or below