Changeset 19172 in webkit


Ignore:
Timestamp:
Jan 26, 2007 6:04:41 PM (17 years ago)
Author:
aliceli1
Message:

LayoutTests:

Reviewed by Ada.

Added tests for <rdar://problem/4919097> REGRESSION: Ctrl-Y fails to yank (11076)

  • editing/pasteboard/emacs-ctrl-a-k-y-expected.checksum: Added.
  • editing/pasteboard/emacs-ctrl-a-k-y-expected.png: Added.
  • editing/pasteboard/emacs-ctrl-a-k-y-expected.txt: Added.
  • editing/pasteboard/emacs-ctrl-a-k-y.html: Added. Test for <rdar://problem/4919097>
  • editing/deleting/delete-by-word-001-expected.txt:
  • editing/deleting/delete-by-word-002-expected.txt:
  • editing/deleting/delete-to-end-of-paragraph-expected.txt:
  • editing/pasteboard/emacs-cntl-y-001-expected.txt: The expected results of these tests were affected by the WebCore checkin of the same number. The results are the same, but there were more editing delegates that were called, as expected. I suspect these tests were created during the time that <rdar://problem/4919097> was broken

WebCore:

Reviewed by Ada.

Fixed <rdar://problem/4919097> REGRESSION: Ctrl-Y fails to yank (11076)

  • editing/Editor.cpp: (WebCore::Editor::deleteWithDirection): If there's no selection, locally create a range that is to the end of the granularity unit and pass that to deleteRange().
Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r19159 r19172  
     12007-01-26  Alice Liu  <alice.liu@apple.com>
     2
     3        Reviewed by Ada.
     4
     5        Added tests for <rdar://problem/4919097> REGRESSION: Ctrl-Y fails to yank (11076)
     6
     7        * editing/pasteboard/emacs-ctrl-a-k-y-expected.checksum: Added.
     8        * editing/pasteboard/emacs-ctrl-a-k-y-expected.png: Added.
     9        * editing/pasteboard/emacs-ctrl-a-k-y-expected.txt: Added.
     10        * editing/pasteboard/emacs-ctrl-a-k-y.html: Added.
     11        Test for <rdar://problem/4919097>
     12
     13        * editing/deleting/delete-by-word-001-expected.txt:
     14        * editing/deleting/delete-by-word-002-expected.txt:
     15        * editing/deleting/delete-to-end-of-paragraph-expected.txt:
     16        * editing/pasteboard/emacs-cntl-y-001-expected.txt:
     17        The expected results of these tests were affected by the WebCore checkin of the same number.  The results are the same, but there were more editing delegates that were called, as expected.  I suspect these tests were created during the time that <rdar://problem/4919097> was broken
     18
    1192007-01-26  Alexey Proskuryakov  <ap@webkit.org>
    220
  • trunk/LayoutTests/editing/deleting/delete-by-word-001-expected.txt

    r15414 r19172  
    1616EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1717EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     18EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1819EDITING DELEGATE: shouldDeleteDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document
    19 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     20EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    2021EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    2122EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/editing/deleting/delete-by-word-002-expected.txt

    r15414 r19172  
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    55EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     6EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    67EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document
    7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     8EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    89EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    910EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.txt

    r18345 r19172  
    11EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 5 of BODY > HTML > #document
    22EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
     3EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    34EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    45EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document
  • trunk/LayoutTests/editing/pasteboard/emacs-cntl-y-001-expected.txt

    r16586 r19172  
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    55EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     6EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    67EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document
    7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     8EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    89EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    910EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/WebCore/ChangeLog

    r19171 r19172  
     12007-01-26  Alice Liu  <alice.liu@apple.com>
     2
     3        Reviewed by Ada.
     4
     5        Fixed <rdar://problem/4919097> REGRESSION: Ctrl-Y fails to yank (11076)
     6
     7        * editing/Editor.cpp:
     8        (WebCore::Editor::deleteWithDirection):
     9        If there's no selection, locally create a range that is to the end of the granularity unit and pass that to deleteRange().
     10
    1112007-01-26  Sam Weinig  <sam@webkit.org>
    212
     
    198208        (WebCore::adoptCFReference):
    199209
     210>>>>>>> .r19171
    2002112007-01-26  Darin Adler  <darin@apple.com>
    201212
  • trunk/WebCore/editing/Editor.cpp

    r19109 r19172  
    214214        return false;
    215215
     216    RefPtr<Range> range;
    216217    EditorDeleteAction deletionAction = deleteSelectionAction;
    217218
     
    219220   
    220221    if (m_frame->selectionController()->isRange()) {
     222        range = selectedRange();
    221223        smartDeleteOK = true;
    222224        if (isTypingAction)
    223225            deletionAction = deleteKeyAction;
    224226    } else {
     227        SelectionController selectionController;
     228        selectionController.setSelection(m_frame->selectionController()->selection());
     229        selectionController.modify(SelectionController::EXTEND, direction, granularity);
     230        range = selectionController.toRange();
     231       
    225232        switch (direction) {
    226233            case SelectionController::FORWARD:
     
    235242    }
    236243
    237     deleteRange(selectedRange().get(), killRing, false, smartDeleteOK, deletionAction, granularity);
     244    deleteRange(range.get(), killRing, false, smartDeleteOK, deletionAction, granularity);
    238245
    239246    return true;
Note: See TracChangeset for help on using the changeset viewer.