-
ojan@chromium.org authored
Reviewed by David Levin. smartdelete should only occur after double-click https://bugs.webkit.org/show_bug.cgi?id=35314 * editing/deleting/non-smart-delete.html: * editing/pasteboard/drag-drop-modifies-page.html: * editing/pasteboard/page-zoom-expected.txt: Space is removed because we used to incorrectly smartpaste here. New behavior matches NSTextView. * editing/style/apply-through-end-of-document-expected.txt: The change here is that selectall + smartpaste doesn't put a BR, but selectall + normal-paste does. Not sure if that's a bug or not, but it's not a side effect of this change. * editing/style/style-boundary-005.html: * platform/mac/editing/deleting/non-smart-delete-expected.checksum: * platform/mac/editing/deleting/non-smart-delete-expected.png: * platform/mac/editing/deleting/non-smart-delete-expected.txt: * platform/mac/editing/execCommand/paste-1-expected.txt: * platform/mac/editing/execCommand/paste-2-expected.txt: * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.checksum: * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.png: * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.txt: * platform/mac/editing/selection/expanding-selections-expected.txt: * platform/mac/editing/selection/expanding-selections2-expected.txt: * platform/mac/editing/selection/triple-click-in-pre-expected.txt: The above three results change because granularity is no longer part of the seleciton, so changes in granularity don't fire selection change notifications. * platform/mac/editing/style/style-boundary-005-expected.checksum: * platform/mac/editing/style/style-boundary-005-expected.png: * platform/mac/editing/style/style-boundary-005-expected.txt: 2010-03-12 Ojan Vafai <ojan@chromium.org> Reviewed by David Levin. smartdelete should only occur after double-click https://bugs.webkit.org/show_bug.cgi?id=35314 1. Consolidate all notions of selection-granularity into SelectionController. 2. Now only mouse-based selections store a selection-granularity. This matches NSTextView. New tests were added in http://trac.webkit.org/changeset/55913. * WebCore.base.exp: * editing/MoveSelectionCommand.cpp: (WebCore::MoveSelectionCommand::MoveSelectionCommand): (WebCore::MoveSelectionCommand::doApply): * editing/MoveSelectionCommand.h: (WebCore::MoveSelectionCommand::create): * editing/SelectionController.cpp: (WebCore::SelectionController::SelectionController): (WebCore::SelectionController::setSelection): (WebCore::SelectionController::modify): (WebCore::SelectionController::clear): * editing/SelectionController.h: (WebCore::SelectionController::setSelection): (WebCore::SelectionController::granularity): * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::VisibleSelection): (WebCore::VisibleSelection::expandUsingGranularity): (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity): (WebCore::VisibleSelection::validate): * editing/VisibleSelection.h: (WebCore::operator==): * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): * page/DOMSelection.cpp: (WebCore::DOMSelection::extend): * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): * page/EventHandler.cpp: (WebCore::EventHandler::selectClosestWordFromMouseEvent): (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): (WebCore::EventHandler::handleMousePressEventTripleClick): (WebCore::EventHandler::handleMousePressEventSingleClick): (WebCore::EventHandler::updateSelectionForMouseDrag): * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::selectionGranularity): * page/Frame.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setSelectionRange): 2010-03-12 Ojan Vafai <ojan@chromium.org> Reviewed by David Levin. smartdelete should only occur after double-click https://bugs.webkit.org/show_bug.cgi?id=35314 * src/WebFrameImpl.cpp: (WebKit::WebFrameImpl::selectWordAroundPosition): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
406daf8b