Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Unified Diff: Source/core/editing/Caret.h

Issue 429723006: Add comment about CaretBase::updateCaretRect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Caret.h
diff --git a/Source/core/editing/Caret.h b/Source/core/editing/Caret.h
index 728f36e852e7cc07caa0ee9adfdaa5f4687d692c..267d44771cd375ba9ffd442f73230a8ca1edc1a5 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 if possible.
+ // A position in HTMLTextFromControlElement is a typically example.
tkent 2014/07/30 01:25:07 typically -> typical
yoichio 2014/07/30 01:27:39 Done.
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698