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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelection.cpp

Issue 1654123002: Invalidate the previous caret even if the parent text node is removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: third_party/WebKit/Source/core/editing/FrameSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
index a648842505f763693a3dc2b41124900bb5cc3e1d..c7faeb663e28dafdf010feb8592c05aeafecba06 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -705,6 +705,9 @@ void FrameSelection::invalidateCaretRect()
invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect);
if (newNode && (shouldRepaintCaret(*newNode) || shouldRepaintCaret(view)))
invalidateLocalCaretRect(newNode, newRect);
+ // Must invalidate |m_previousCaretNode| even if it's detached from its parent. crbug.com/528922
+ if (m_previousCaretNode && newNode && !m_previousCaretNode->parentNode())
yosin_UTC9 2016/02/02 01:56:56 nit: s/!m_previousCaretNode->parentNode()/!m_previ
dshwang 2016/02/02 14:58:45 Done.
+ invalidateLocalCaretRect(newNode, m_previousCaretRect);
yosin_UTC9 2016/02/02 01:56:56 This call seems to be wrong, since |m_previousCare
dshwang 2016/02/02 14:58:45 True. this code expects |newNode| is formatted at
m_previousCaretNode = newNode;
m_previousCaretRect = newRect;
m_previousCaretVisibility = caretVisibility();
« 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