Changeset 52126 in webkit


Ignore:
Timestamp:
Dec 14, 2009 5:14:35 PM (14 years ago)
Author:
enrica@apple.com
Message:

Pressing backspace inside a table cell erases all empty rows below it.
<rdar://problem/5565461>
https://bugs.webkit.org/show_bug.cgi?id=32526

Reviewed by John Sullivan.

WebCore:

No deletion is performed when the caret selection is on an empty table cell.

Test: editing/deleting/delete-empty-table.html

  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::deleteKeyPressed): Added check for empty table cells in
case of caret selection.

LayoutTests:

  • editing/deleting/delete-empty-table-expected.txt: Added.
  • editing/deleting/delete-empty-table.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52125 r52126  
     12009-12-14  Enrica Casucci  <enrica@apple.com>
     2
     3        Reviewed by John Sullivan.
     4
     5        Pressing backspace inside a table cell erases all empty rows below it.
     6        <rdar://problem/5565461>
     7        https://bugs.webkit.org/show_bug.cgi?id=32526
     8
     9        * editing/deleting/delete-empty-table-expected.txt: Added.
     10        * editing/deleting/delete-empty-table.html: Added.
     11
    1122009-12-14  Brian Weinstein  <bweinstein@apple.com>
    213
  • trunk/WebCore/ChangeLog

    r52123 r52126  
     12009-12-14  Enrica Casucci  <enrica@apple.com>
     2
     3        Reviewed by John Sullivan.
     4
     5        Pressing backspace inside a table cell erases all empty rows below it.
     6        <rdar://problem/5565461>
     7        https://bugs.webkit.org/show_bug.cgi?id=32526
     8
     9        No deletion is performed when the caret selection is on an empty table cell.
     10       
     11        Test: editing/deleting/delete-empty-table.html
     12
     13        * editing/TypingCommand.cpp:
     14        (WebCore::TypingCommand::deleteKeyPressed): Added check for empty table cells in
     15        case of caret selection.
     16
    1172009-12-14  Andrei Popescu  <andreip@google.com>
    218
  • trunk/WebCore/editing/TypingCommand.cpp

    r50358 r52126  
    451451           
    452452            VisiblePosition visibleStart(endingSelection().visibleStart());
     453            Node *startNode = visibleStart.deepEquivalent().node();
     454            // If we have a caret selection on an empty cell, we have nothing to do.
     455            if (startNode && startNode->renderer() && (startNode->renderer()->isTableCell() || (startNode->renderer()->isBR() && startNode->parentNode()->renderer() && startNode->parentNode()->renderer()->isTableCell())))
     456                return;
     457
    453458            // If the caret is at the start of a paragraph after a table, move content into the last table cell.
    454459            if (isStartOfParagraph(visibleStart) && isFirstPositionAfterTable(visibleStart.previous(true))) {
Note: See TracChangeset for help on using the changeset viewer.