Changeset 153815 in webkit
- Timestamp:
- Aug 8, 2013 12:16:51 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r153814 r153815 1 2013-08-08 Andreas Kling <akling@apple.com> 2 3 REGRESSION(r139282): Old caret sometimes gets "stuck" (not repainted) in contenteditable elements. 4 <http://webkit.org/b/119520> 5 <rdar://problem/14658929> 6 7 Reviewed by Simon Fraser. 8 9 * fast/repaint/caret-jump-between-nodes-expected.txt: Added. 10 * fast/repaint/caret-jump-between-nodes.html: Added. 11 1 12 2013-08-07 Andrei Bucur <abucur@adobe.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r153814 r153815 1 2013-08-08 Andreas Kling <akling@apple.com> 2 3 REGRESSION(r139282): Old caret sometimes gets "stuck" (not repainted) in contenteditable elements. 4 <http://webkit.org/b/119520> 5 <rdar://problem/14658929> 6 7 Reviewed by Simon Fraser. 8 9 When computing a new caret rect, don't forget to repaint the old rect if the caret jumped 10 from one node to another. 11 We were being a little too clever, assuming that oldRect==newRect meant that no repaint was 12 necessary, but moving from (0,0) in one node to (0,0) in another would cause a ghost caret 13 in the old node. 14 15 Test: fast/repaint/caret-jump-between-nodes.html 16 17 * editing/FrameSelection.cpp: 18 (WebCore::FrameSelection::recomputeCaretRect): 19 20 Fall through all the way down to caret repaints if the selection's new anchor node is not 21 the same as m_previousCaretNode. 22 1 23 2013-08-07 Andrei Bucur <abucur@adobe.com> 2 24 -
trunk/Source/WebCore/editing/FrameSelection.cpp
r153366 r153815 1381 1381 return false; 1382 1382 1383 Node* caretNode = m_selection.start().deprecatedNode(); 1384 1383 1385 LayoutRect oldRect = localCaretRectWithoutUpdate(); 1384 1386 LayoutRect newRect = localCaretRect(); 1385 if (oldRect == newRect && !m_absCaretBoundsDirty) 1387 1388 if (caretNode == m_previousCaretNode && oldRect == newRect && !m_absCaretBoundsDirty) 1386 1389 return false; 1387 1390 1388 1391 IntRect oldAbsCaretBounds = m_absCaretBounds; 1389 m_absCaretBounds = absoluteBoundsForLocalRect( m_selection.start().deprecatedNode(), localCaretRectWithoutUpdate());1392 m_absCaretBounds = absoluteBoundsForLocalRect(caretNode, localCaretRectWithoutUpdate()); 1390 1393 m_absCaretBoundsDirty = false; 1391 1392 if ( oldAbsCaretBounds == m_absCaretBounds)1394 1395 if (caretNode == m_previousCaretNode && oldAbsCaretBounds == m_absCaretBounds) 1393 1396 return false; 1394 1397 … … 1397 1400 bool previousOrNewCaretNodeIsContentEditable = isContentEditable() || (m_previousCaretNode && m_previousCaretNode->isContentEditable()); 1398 1401 if (shouldRepaintCaret(view, previousOrNewCaretNodeIsContentEditable)) { 1399 Node* node = m_selection.start().deprecatedNode();1400 1402 if (m_previousCaretNode) 1401 1403 repaintCaretForLocalRect(m_previousCaretNode.get(), oldRect); 1402 m_previousCaretNode = node;1403 repaintCaretForLocalRect( node, newRect);1404 m_previousCaretNode = caretNode; 1405 repaintCaretForLocalRect(caretNode, newRect); 1404 1406 } 1405 1407 }
Note: See TracChangeset
for help on using the changeset viewer.