| Index: Source/core/editing/FrameSelection.cpp
|
| diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
|
| index 5a5f03ca12af958d053a017430e64f43cded1d55..229f473861437434ef32364958688bbf5d59dfa0 100644
|
| --- a/Source/core/editing/FrameSelection.cpp
|
| +++ b/Source/core/editing/FrameSelection.cpp
|
| @@ -1458,7 +1458,13 @@ void CaretBase::paintCaret(Node* node, GraphicsContext* context, const LayoutPoi
|
| return;
|
|
|
| Color caretColor = Color::black;
|
| - Element* element = node->rootEditableElement();
|
| +
|
| + Element* element;
|
| + if (node->isElementNode())
|
| + element = toElement(node);
|
| + else
|
| + element = node->parentElement();
|
| +
|
| if (element && element->renderer())
|
| caretColor = element->renderer()->style()->visitedDependentColor(CSSPropertyColor);
|
|
|
|
|