Changeset 60859 in webkit
- Timestamp:
- Jun 8, 2010 12:29:13 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r60858 r60859 1 2010-06-08 Erik Arvidsson <arv@chromium.org> 2 3 Reviewed by ojan@chromium.org. 4 5 REGRESSION: Weird focus behavior affects quoting on University of Washington message board system 6 https://bugs.webkit.org/show_bug.cgi?id=38548 7 8 We should not clear the selection when canStartSelection returns false. 9 10 * editing/pasteboard/drop-link-expected.txt: Mouse down on an element where canStartSelection returns 11 false no longer clears the selection so we get one less 12 notification from the editing delegate. 13 * editing/selection/click-in-focusable-link-should-not-clear-selection-expected.txt: Added. 14 * editing/selection/click-in-focusable-link-should-not-clear-selection.html: Added. 15 * editing/selection/script-tests/click-in-focusable-link-should-not-clear-selection.js: Added. 16 (description.getElementCenter): 17 (doubleClickOnElement): 18 (mouseDownOnElement): 19 (selectionShouldBe): 20 1 21 2010-06-08 Dirk Schulze <krit@webkit.org> 2 22 -
trunk/LayoutTests/editing/pasteboard/drop-link-expected.txt
r59917 r60859 9 9 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 10 10 EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document 11 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification12 11 EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification 13 12 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document givenAction:WebViewInsertActionDropped -
trunk/LayoutTests/editing/pasteboard/drop-link.html
r59917 r60859 46 46 var y = anchorToDrag.offsetTop + anchorToDrag.offsetHeight / 2; 47 47 48 console.log(window.getSelection().anchorNode.parentNode.outerHTML); 49 48 50 eventSender.mouseMoveTo(x, y); 49 51 … … 51 53 // Wait a moment so that the mouseDown will kick off a drag instead of navigating to the link 52 54 eventSender.leapForward(400); 55 56 console.log(window.getSelection().anchorNode.parentNode.outerHTML); 53 57 54 58 var destinationObject = document.getElementById(targetId); … … 58 62 eventSender.mouseMoveTo(x, y); 59 63 eventSender.mouseUp(); 64 console.log(window.getSelection().anchorNode.parentNode.outerHTML); 60 65 } 61 66 -
trunk/WebCore/ChangeLog
r60858 r60859 1 2010-06-08 Erik Arvidsson <arv@chromium.org> 2 3 Reviewed by ojan@chromium.org. 4 5 REGRESSION: Weird focus behavior affects quoting on University of Washington message board system 6 https://bugs.webkit.org/show_bug.cgi?id=38548 7 8 We should not clear the selection when canStartSelection returns false. 9 10 Test: editing/selection/click-in-focusable-link-should-not-clear-selection.html 11 12 * page/FocusController.cpp: 13 (WebCore::clearSelectionIfNeeded): Make sure we do not clear selection when canStartSelection 14 returns false. 15 1 16 2010-06-08 Dirk Schulze <krit@webkit.org> 2 17 -
trunk/WebCore/page/FocusController.cpp
r60581 r60859 512 512 return; 513 513 514 if (Node* mousePressNode = newFocusedFrame->eventHandler()->mousePressNode()) 515 if (mousePressNode->renderer() && !mousePressNode->canStartSelection()) 516 if (Node* root = s->rootEditableElement()) 517 if (Node* shadowAncestorNode = root->shadowAncestorNode()) 518 // Don't do this for textareas and text fields, when they lose focus their selections should be cleared 519 // and then restored when they regain focus, to match other browsers. 520 if (!shadowAncestorNode->hasTagName(inputTag) && !shadowAncestorNode->hasTagName(textareaTag)) 521 return; 514 if (Node* mousePressNode = newFocusedFrame->eventHandler()->mousePressNode()) { 515 if (mousePressNode->renderer() && !mousePressNode->canStartSelection()) { 516 // Don't clear the selection for contentEditable elements, but do clear it for input and textarea. See bug 38696. 517 Node * root = s->rootEditableElement(); 518 if (!root) 519 return; 520 521 if (Node* shadowAncestorNode = root->shadowAncestorNode()) { 522 if (!shadowAncestorNode->hasTagName(inputTag) && !shadowAncestorNode->hasTagName(textareaTag)) 523 return; 524 } 525 } 526 } 522 527 523 528 s->clear();
Note: See TracChangeset
for help on using the changeset viewer.