Changeset 64488 in webkit
- Timestamp:
- Aug 2, 2010 1:46:13 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64486 r64488 1 2010-07-20 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 focusing an unfocused contentEditable element should place the cursor at the beginning 6 https://bugs.webkit.org/show_bug.cgi?id=42646 7 8 r14666 made this change for the body and html elements, but not for all contentEditable 9 elements. Doing this for all contentEditable elements matches all other browsers. 10 11 * editing/deleting/5546763-expected.txt: 12 * editing/deleting/in-visibly-empty-root.html: 13 * editing/execCommand/4786404-1.html: 14 * editing/execCommand/4786404-2.html: 15 * editing/execCommand/remove-list-1-expected.txt: 16 * editing/pasteboard/5601583-1.html: 17 * editing/pasteboard/merge-end-1.html: 18 * editing/pasteboard/merge-end-2.html: 19 * editing/selection/move-begin-end-expected.txt: 20 * editing/selection/move-begin-end.html: 21 * editing/style/5279521.html: 22 * platform/mac/accessibility/selection-value-changes-for-aria-textbox-expected.txt: 23 * platform/mac/editing/input/text-input-controller-expected.txt: 24 * platform/mac/editing/pasteboard/input-field-1-expected.checksum: 25 * platform/mac/editing/pasteboard/input-field-1-expected.png: 26 * platform/mac/editing/pasteboard/input-field-1-expected.txt: 27 * platform/mac/editing/pasteboard/merge-end-1-expected.txt: 28 * platform/mac/editing/pasteboard/merge-end-2-expected.txt: 29 * platform/mac/editing/pasteboard/select-element-1-expected.txt: 30 * platform/mac/fast/dom/focus-contenteditable-expected.checksum: 31 * platform/mac/fast/dom/focus-contenteditable-expected.png: 32 * platform/mac/fast/dom/focus-contenteditable-expected.txt: 33 * platform/mac/fast/overflow/overflow-focus-ring-expected.checksum: 34 * platform/mac/fast/overflow/overflow-focus-ring-expected.png: 35 * platform/mac/fast/overflow/overflow-focus-ring-expected.txt: 36 1 37 2010-08-02 Csaba Osztrogonác <ossy@webkit.org> 2 38 -
trunk/LayoutTests/editing/deleting/5546763-expected.txt
r30635 r64488 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 5 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A >DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 7 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A > DIV > DIV > BODY > HTML > #document 7 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/editing/deleting/in-visibly-empty-root.html
r43044 r64488 14 14 var square = document.getElementById("square"); 15 15 root.focus(); 16 document.execCommand("SelectAll"); 16 17 document.execCommand("delete", "backward"); 17 18 if (!square.parentNode) -
trunk/LayoutTests/editing/execCommand/4786404-1.html
r19991 r64488 8 8 div.focus(); 9 9 10 document.execCommand("SelectAll"); 10 11 document.execCommand("RemoveFormat"); 11 12 </script> -
trunk/LayoutTests/editing/execCommand/4786404-2.html
r19991 r64488 8 8 div.focus(); 9 9 10 document.execCommand("SelectAll"); 10 11 document.execCommand("RemoveFormat"); 11 12 </script> -
trunk/LayoutTests/editing/execCommand/remove-list-1-expected.txt
r45239 r64488 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 60 of #text >LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 0 of LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 60 of #text > LI > OL > DIV > BODY > HTML > #document toDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 60 of #text > LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 0 of LI > OL > DIV > BODY > HTML > #document toDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 60 of #text > LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 8 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 60 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE -
trunk/LayoutTests/editing/pasteboard/5601583-1.html
r28694 r64488 9 9 copy = document.getElementById("copy"); 10 10 copy.focus(); 11 document.execCommand("SelectAll"); 11 12 document.execCommand("Copy"); 12 13 -
trunk/LayoutTests/editing/pasteboard/merge-end-1.html
r21475 r64488 12 12 13 13 e.focus(); 14 s.setPosition(e, 0);15 14 moveSelectionForwardByCharacterCommand(); 16 15 insertHTMLCommand("<div>bar</div>baz"); -
trunk/LayoutTests/editing/pasteboard/merge-end-2.html
r21475 r64488 12 12 13 13 e.focus(); 14 s.setPosition(e, 0);15 14 moveSelectionForwardByCharacterCommand(); 16 15 insertHTMLCommand("<div>bar</div>baz"); -
trunk/LayoutTests/editing/selection/move-begin-end-expected.txt
r54980 r64488 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE -
trunk/LayoutTests/editing/selection/move-begin-end.html
r56639 r64488 23 23 var area = document.getElementById('area'); 24 24 area.focus(); 25 26 // Position the caret at the beginning of the string.27 eventSender.keyDown("leftArrow");28 25 29 26 // Now move to the end -
trunk/LayoutTests/editing/style/5279521.html
r25358 r64488 5 5 var div = document.getElementById("div"); 6 6 div.focus(); 7 document.execCommand("SelectAll"); 7 8 document.execCommand("JustifyRight"); 8 9 </script> -
trunk/LayoutTests/platform/mac/accessibility/selection-value-changes-for-aria-textbox-expected.txt
r62960 r64488 1 ALERT: Successfully received AXSelectedTextChanged2 1 ALERT: Successfully received AXSelectedTextChanged 3 2 ALERT: Successfully received AXSelectedTextChanged -
trunk/LayoutTests/platform/mac/editing/input/text-input-controller-expected.txt
r45016 r64488 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text >DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 7 EDITING DELEGATE: shouldInsertText:to be deleted replacingDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped 7 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/input-field-1-expected.txt
r63291 r64488 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 1of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 8 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 1 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted -
trunk/LayoutTests/platform/mac/editing/pasteboard/merge-end-1-expected.txt
r63291 r64488 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/merge-end-2-expected.txt
r63291 r64488 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/select-element-1-expected.txt
r63403 r64488 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of DIV > BODY > HTML > #document to 2of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE3 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document toDOMRange:range from 1 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 7 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document 7 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.checksum
r38121 r64488 1 4 4d9c6d8e23cc883d5d8c6ef7c77df1d1 4d80417edd32171a30d1bae9e6c6ff37 -
trunk/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.txt
r63291 r64488 18 18 text run at (0,0) width 78: "Test Passed." 19 19 RenderBlock {DIV} at (0,878) size 769x0 20 selection start: position 0 of child 0 {#text} of child 5 {DIV} of body 21 selection end: position 19 of child 0 {#text} of child 5 {DIV} of body 20 caret: position 0 of child 0 {#text} of child 5 {DIV} of body 22 21 scrolled to 0,276 -
trunk/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.checksum
r43458 r64488 1 3e94a655f09a4899cbd3f4ecee6275d1 1 9ff8593259d6e2b537bf51a26e285ccc -
trunk/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.txt
r63291 r64488 46 46 text run at (0,612) width 500: "............................................................................................................................." 47 47 text run at (0,630) width 212: "....................................................." 48 selection start: position 0 of child 0 {#text} of child 1 {DIV} of body 49 selection end: position 4428 of child 0 {#text} of child 1 {DIV} of body 48 caret: position 0 of child 0 {#text} of child 1 {DIV} of body -
trunk/WebCore/ChangeLog
r64477 r64488 1 2010-07-20 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 focusing an unfocused contentEditable element should place the cursor at the beginning 6 https://bugs.webkit.org/show_bug.cgi?id=42646 7 8 r14666 made this change for the body and html elements, but not for all contentEditable 9 elements. Doing this for all contentEditable elements matches all other browsers. 10 11 * dom/Element.cpp: 12 (WebCore::Element::updateFocusAppearance): 13 1 14 2010-08-02 Ryosuke Niwa <rniwa@webkit.org> 2 15 -
trunk/WebCore/dom/Element.cpp
r64383 r64488 1333 1333 1334 1334 // FIXME: We should restore the previous selection if there is one. 1335 VisibleSelection newSelection = hasTagName(htmlTag) || hasTagName(bodyTag) ? VisibleSelection(Position(this, 0), DOWNSTREAM) : VisibleSelection::selectionFromContentsOfNode(this);1335 VisibleSelection newSelection = VisibleSelection(Position(this, 0), DOWNSTREAM); 1336 1336 1337 1337 if (frame->shouldChangeSelection(newSelection)) {
Note: See TracChangeset
for help on using the changeset viewer.