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

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: handle layouttests failure Created 4 years, 10 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 | « third_party/WebKit/ManualTests/caret-paint-after-last-text-is-removed.html ('k') | 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 fd90957a58fd8df90dcd66039ffb75dd0e540789..384fee5bcaf652058ababbf4a7ddb3815f29e38b 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -405,6 +405,15 @@ void FrameSelection::nodeWillBeRemoved(Node& node)
respondToNodeModification(node, removingNodeRemovesPosition(node, selection().base()), removingNodeRemovesPosition(node, selection().extent()),
removingNodeRemovesPosition(node, selection().start()), removingNodeRemovesPosition(node, selection().end()));
+
+ if (m_previousCaretNode && node.isSameNode(m_previousCaretNode.get())) {
yosin_UTC9 2016/02/24 03:55:25 |node == m_previousCaretNode| Node::isSmaeNode()
dshwang 2016/02/24 13:12:18 Done.
+ // Hits in ManualTests/caret-paint-after-last-text-is-removed.html
+ DisableCompositingQueryAsserts disabler;
+ invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect);
+ m_previousCaretNode = nullptr;
+ m_previousCaretRect = LayoutRect();
+ m_previousCaretVisibility = Hidden;
+ }
}
static bool intersectsNode(const VisibleSelection& selection, Node* node)
« no previous file with comments | « third_party/WebKit/ManualTests/caret-paint-after-last-text-is-removed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698