Index: Source/core/rendering/RenderText.cpp |
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp |
index 94a73bfa6c33b0177fc3fba9bb091965e1fcddc7..7a9acfdfde1904a31ac6970d7d64407d419b6ea5 100644 |
--- a/Source/core/rendering/RenderText.cpp |
+++ b/Source/core/rendering/RenderText.cpp |
@@ -528,7 +528,8 @@ static PositionWithAffinity createPositionWithAffinityForBox(const InlineBox* bo |
affinity = offset > box->caretMinOffset() ? VP_UPSTREAM_IF_POSSIBLE : DOWNSTREAM; |
break; |
} |
- return box->renderer()->createPositionWithAffinity(offset, affinity); |
+ int textStartOffset = box->renderer()->isText() ? toRenderText(box->renderer())->textStartOffset() : 0; |
+ return box->renderer()->createPositionWithAffinity(offset + textStartOffset, affinity); |
} |
static PositionWithAffinity createPositionWithAffinityForBoxAfterAdjustingOffsetForBiDi(const InlineTextBox* box, int offset, ShouldAffinityBeDownstream shouldAffinityBeDownstream) |