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

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

Issue 2565103002: Fix mismatched nullptr check for caret paint invalidation. (Closed)
Patch Set: Sync to head and add test baselines. Created 4 years 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
Index: third_party/WebKit/Source/core/editing/FrameCaret.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameCaret.cpp b/third_party/WebKit/Source/core/editing/FrameCaret.cpp
index 1246270df9b9f3987582294ea0e57469fe888a13..1a65d873c38e59ed34523d1164bfaf41cb6c35cd 100644
--- a/third_party/WebKit/Source/core/editing/FrameCaret.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameCaret.cpp
@@ -187,11 +187,12 @@ void FrameCaret::invalidateCaretRect(bool forceInvalidation) {
m_caretVisibility == m_previousCaretVisibility)
return;
- if (m_previousCaretNode && shouldRepaintCaret(*m_previousCaretAnchorNode)) {
+ if (m_previousCaretAnchorNode &&
+ shouldRepaintCaret(*m_previousCaretAnchorNode)) {
invalidateLocalCaretRect(m_previousCaretAnchorNode.get(),
m_previousCaretRect);
}
- if (newNode && shouldRepaintCaret(*newAnchorNode))
+ if (newAnchorNode && shouldRepaintCaret(*newAnchorNode))
invalidateLocalCaretRect(newAnchorNode, newRect);
m_previousCaretNode = newNode;
m_previousCaretAnchorNode = newAnchorNode;
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/virtual/spinvalidation/paint/invalidation/caret-contenteditable-content-after-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698