Index: Source/core/editing/Caret.h |
diff --git a/Source/core/editing/Caret.h b/Source/core/editing/Caret.h |
index 728f36e852e7cc07caa0ee9adfdaa5f4687d692c..674adf01ba8db39b46aea3a17f94adb1b27ea7a7 100644 |
--- a/Source/core/editing/Caret.h |
+++ b/Source/core/editing/Caret.h |
@@ -48,8 +48,10 @@ protected: |
void invalidateCaretRect(Node*, bool caretRectChanged = false); |
void clearCaretRect(); |
+ // Creating VisiblePosition causes synchronous layout so we should use the |
+ // PositionWithAffinity version if possible. |
+ // A position in HTMLTextFromControlElement is a typical example. |
bool updateCaretRect(Document*, const PositionWithAffinity& caretPosition); |
- // Simply calls above updateCaretRect using deepEquivalent() and affinity(). |
bool updateCaretRect(Document*, const VisiblePosition& caretPosition); |
IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&) const; |
bool shouldRepaintCaret(const RenderView*, bool isContentEditable) const; |