| Index: Source/core/editing/VisibleUnits.cpp | 
| diff --git a/Source/core/editing/VisibleUnits.cpp b/Source/core/editing/VisibleUnits.cpp | 
| index 09889ef8b2a520bf413b02f4dc12fd9018ab39c3..06501033c1acc65927657e8099568ca2c5a717af 100644 | 
| --- a/Source/core/editing/VisibleUnits.cpp | 
| +++ b/Source/core/editing/VisibleUnits.cpp | 
| @@ -1124,11 +1124,11 @@ VisiblePosition startOfParagraph(const VisiblePosition& c, EditingBoundaryCrossi | 
| if (r->isBR() || isBlock(n)) | 
| break; | 
|  | 
| -        if (r->isText() && toRenderText(r)->renderedTextLength()) { | 
| +        if (r->isText() && toLayoutText(r)->renderedTextLength()) { | 
| ASSERT_WITH_SECURITY_IMPLICATION(n->isTextNode()); | 
| type = Position::PositionIsOffsetInAnchor; | 
| if (style->preserveNewline()) { | 
| -                RenderText* text = toRenderText(r); | 
| +                LayoutText* text = toLayoutText(r); | 
| int i = text->textLength(); | 
| int o = offset; | 
| if (n == startNode && o < i) | 
| @@ -1204,12 +1204,12 @@ VisiblePosition endOfParagraph(const VisiblePosition &c, EditingBoundaryCrossing | 
| break; | 
|  | 
| // FIXME: We avoid returning a position where the renderer can't accept the caret. | 
| -        if (r->isText() && toRenderText(r)->renderedTextLength()) { | 
| +        if (r->isText() && toLayoutText(r)->renderedTextLength()) { | 
| ASSERT_WITH_SECURITY_IMPLICATION(n->isTextNode()); | 
| -            int length = toRenderText(r)->textLength(); | 
| +            int length = toLayoutText(r)->textLength(); | 
| type = Position::PositionIsOffsetInAnchor; | 
| if (style->preserveNewline()) { | 
| -                RenderText* text = toRenderText(r); | 
| +                LayoutText* text = toLayoutText(r); | 
| int o = n == startNode ? offset : 0; | 
| for (int i = o; i < length; ++i) { | 
| if ((*text)[i] == '\n') | 
|  |