Changeset 145871 in webkit
- Timestamp:
- Mar 14, 2013 9:25:27 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r145870 r145871 1 2013-03-14 Shezan Baig <sbaig1@bloomberg.net> 2 3 Backspace/delete at start of table cell shouldn't step out of cell 4 https://bugs.webkit.org/show_bug.cgi?id=35372 5 6 Reviewed by Ryosuke Niwa. 7 8 * editing/deleting/backspace-at-table-cell-beginning-expected.txt: Added. 9 * editing/deleting/backspace-at-table-cell-beginning.html: Added. 10 * editing/deleting/forward-delete-at-table-cell-ending-expected.txt: Added. 11 * editing/deleting/forward-delete-at-table-cell-ending.html: Added. 12 1 13 2013-03-14 Xidorn Quan <quanxunzhen@gmail.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r145870 r145871 1 2013-03-14 Shezan Baig <sbaig1@bloomberg.net> 2 3 Backspace/delete at start of table cell shouldn't step out of cell 4 https://bugs.webkit.org/show_bug.cgi?id=35372 5 6 Reviewed by Ryosuke Niwa. 7 8 Make Delete and ForwardDelete commands be no-ops if we are at the first 9 position or last position of a table cell respectively. 10 11 Tests: editing/deleting/backspace-at-table-cell-beginning.html 12 editing/deleting/forward-delete-at-table-cell-ending.html 13 14 * editing/TypingCommand.cpp: 15 (WebCore::TypingCommand::deleteKeyPressed): 16 (WebCore::TypingCommand::forwardDeleteKeyPressed): 17 1 18 2013-03-14 Xidorn Quan <quanxunzhen@gmail.com> 2 19 -
trunk/Source/WebCore/editing/TypingCommand.cpp
r144911 r145871 466 466 467 467 VisiblePosition visibleStart(endingSelection().visibleStart()); 468 // If we have a caret selection on an empty cell, we have nothing to do. 469 if (isEmptyTableCell(visibleStart.deepEquivalent().containerNode())) 468 // If we have a caret selection at the beginning of a cell, we have nothing to do. 469 Node* enclosingTableCell = enclosingNodeOfType(visibleStart.deepEquivalent(), &isTableCell); 470 if (enclosingTableCell && visibleStart == firstPositionInNode(enclosingTableCell)) 470 471 return; 471 472 … … 555 556 Position downstreamEnd = endingSelection().end().downstream(); 556 557 VisiblePosition visibleEnd = endingSelection().visibleEnd(); 557 if (isEmptyTableCell(visibleEnd.deepEquivalent().containerNode())) 558 Node* enclosingTableCell = enclosingNodeOfType(visibleEnd.deepEquivalent(), &isTableCell); 559 if (enclosingTableCell && visibleEnd == lastPositionInNode(enclosingTableCell)) 558 560 return; 559 561 if (visibleEnd == endOfParagraph(visibleEnd))
Note: See TracChangeset
for help on using the changeset viewer.