diff options
Diffstat (limited to 'WebCore/rendering/InlineTextBox.cpp')
-rw-r--r-- | WebCore/rendering/InlineTextBox.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp index d055185..575bdf2 100644 --- a/WebCore/rendering/InlineTextBox.cpp +++ b/WebCore/rendering/InlineTextBox.cpp @@ -1085,11 +1085,10 @@ unsigned InlineTextBox::caretMaxRenderedOffset() const int InlineTextBox::textPos() const { - // When computing the width of a text run, RenderBlock::computeInlineDirectionPositionsForLine() doesn't include the actual offset - // from the containing block edge in its measurement. textPos() should be consistent so the text are rendered in the same width. if (logicalLeft() == 0) return 0; - return logicalLeft() - root()->logicalLeft(); + RenderBlock* blockElement = renderer()->containingBlock(); + return logicalLeft() - blockElement->borderStart() - blockElement->paddingStart(); } int InlineTextBox::offsetForPosition(int lineOffset, bool includePartialGlyphs) const |