Chromium Code Reviews| 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 02fd9921d87ecfd72dc766d6b7e02429d59dab69..e19f7cfd33a16e8947b7e9b36a9aef7cb2f98ee2 100644 |
| --- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp |
| +++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp |
| @@ -731,6 +731,15 @@ void FrameSelection::invalidateCaretRect() |
| m_previousCaretVisibility = m_caretBase->getCaretVisibility(); |
| } |
| +void FrameSelection::dataWillChange(const CharacterData& node) |
| +{ |
| + if (node == m_previousCaretNode) { |
| + // This invalidation is eager, and intentionally uses stale state. |
| + DisableCompositingQueryAsserts disabler; |
| + m_caretBase->invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect); |
|
yosin_UTC9
2016/04/29 15:03:12
Should we reset other states of previous cares lik
chrishtr
2016/04/29 20:09:40
I think those other changes will still be handled
|
| + } |
| +} |
| + |
| void FrameSelection::paintCaret(GraphicsContext& context, const LayoutPoint& paintOffset) |
| { |
| if (selection().isCaret() && m_shouldPaintCaret) { |