diff options
Diffstat (limited to 'WebCore/rendering/RenderText.cpp')
-rw-r--r-- | WebCore/rendering/RenderText.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/WebCore/rendering/RenderText.cpp b/WebCore/rendering/RenderText.cpp index ada3961..40c3d75 100644 --- a/WebCore/rendering/RenderText.cpp +++ b/WebCore/rendering/RenderText.cpp @@ -207,7 +207,7 @@ void RenderText::deleteTextBoxes() PassRefPtr<StringImpl> RenderText::originalText() const { Node* e = node(); - return e ? static_cast<Text*>(e)->string() : 0; + return e ? static_cast<Text*>(e)->dataImpl() : 0; } void RenderText::absoluteRects(Vector<IntRect>& rects, int tx, int ty) @@ -328,13 +328,13 @@ VisiblePosition RenderText::positionForPoint(const IntPoint& point) int offset; // FIXME: We should be able to roll these special cases into the general cases in the loop below. - if (firstTextBox() && point.y() < firstTextBox()->root()->bottomOverflow() && point.x() < firstTextBox()->m_x) { + if (firstTextBox() && point.y() < firstTextBox()->root()->lineBottom() && point.x() < firstTextBox()->m_x) { // 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(point.x()); return createVisiblePosition(offset + firstTextBox()->start(), DOWNSTREAM); } - if (lastTextBox() && point.y() >= lastTextBox()->root()->topOverflow() && point.x() >= lastTextBox()->m_x + lastTextBox()->m_width) { + if (lastTextBox() && point.y() >= lastTextBox()->root()->lineTop() && point.x() >= lastTextBox()->m_x + lastTextBox()->m_width) { // at the y coordinate of the last line or below // and the x coordinate is to the right of the last text box right edge offset = lastTextBox()->offsetForPosition(point.x()); @@ -343,8 +343,8 @@ VisiblePosition RenderText::positionForPoint(const IntPoint& point) InlineTextBox* lastBoxAbove = 0; for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { - if (point.y() >= box->root()->topOverflow()) { - int bottom = box->root()->nextRootBox() ? box->root()->nextRootBox()->topOverflow() : box->root()->bottomOverflow(); + if (point.y() >= box->root()->lineTop()) { + int bottom = box->root()->nextRootBox() ? box->root()->nextRootBox()->lineTop() : box->root()->lineBottom(); if (point.y() < bottom) { offset = box->offsetForPosition(point.x()); @@ -387,8 +387,8 @@ IntRect RenderText::localCaretRect(InlineBox* inlineBox, int caretOffset, int* e InlineTextBox* box = static_cast<InlineTextBox*>(inlineBox); - int height = box->root()->bottomOverflow() - box->root()->topOverflow(); - int top = box->root()->topOverflow(); + int height = box->root()->lineBottom() - box->root()->lineTop(); + int top = box->root()->lineTop(); int left = box->positionForOffset(caretOffset); |