RESOLVED FIXED Bug 139110
REGRESSION: Dragging selected text changes the selection
https://bugs.webkit.org/show_bug.cgi?id=139110
Summary REGRESSION: Dragging selected text changes the selection
mitz
Reported 2014-11-30 10:12:44 PST
To reproduce: select several lines of (non-editable) text. Click and hold inside the selection, then begin dragging away. The selection shouldn’t change as you begin dragging, but it does.
Attachments
Ignore mouse events received after starting a drag (6.56 KB, patch)
2014-12-02 10:59 PST, mitz
simon.fraser: review+
Alexey Proskuryakov
Comment 1 2014-11-30 16:59:10 PST
What is this a regression from? I thought that I filed a bug about this several years ago (when it was a new regression), but I couldn't find it recently.
mitz
Comment 2 2014-11-30 17:04:03 PST
(In reply to comment #1) > What is this a regression from? I thought that I filed a bug about this > several years ago (when it was a new regression), but I couldn't find it > recently. I don’t know yet exactly when the regression happened. Currently, the bug doesn’t appear to happen in Legacy WebKit.
mitz
Comment 3 2014-12-01 17:56:47 PST
This is similar to bug 58406, and can be fixed in a similar manner.
mitz
Comment 4 2014-12-02 10:59:51 PST
Created attachment 242430 [details] Ignore mouse events received after starting a drag
Simon Fraser (smfr)
Comment 5 2014-12-02 12:19:47 PST
Comment on attachment 242430 [details] Ignore mouse events received after starting a drag View in context: https://bugs.webkit.org/attachment.cgi?id=242430&action=review > Source/WebKit2/WebProcess/WebPage/WebPage.h:700 > + void willStartDrag() { m_isStartingDrag = true; } > + void didStartDrag() { m_isStartingDrag = false; } These don't nest, so there should be an assertion that willStartDrag() isn't called twice.
mitz
Comment 6 2014-12-02 13:00:03 PST
(In reply to comment #5) > Comment on attachment 242430 [details] > Ignore mouse events received after starting a drag > > View in context: > https://bugs.webkit.org/attachment.cgi?id=242430&action=review > > > Source/WebKit2/WebProcess/WebPage/WebPage.h:700 > > + void willStartDrag() { m_isStartingDrag = true; } > > + void didStartDrag() { m_isStartingDrag = false; } > > These don't nest, so there should be an assertion that willStartDrag() isn't > called twice. Added assertions and committed <http://trac.webkit.org/r176687>.
Mark Lam
Comment 7 2014-12-03 09:16:09 PST
This commit introduced the following crashes: fast/events/clear-drag-state.html fast/css/user-drag-none.html editing/pasteboard/dataTransfer-setData-getData.html editing/pasteboard/drop-text-events-sideeffect-crash.html editing/pasteboard/drag-drop-iframe-refresh-crash.html editing/pasteboard/drop-text-events-sideeffect.html editing/selection/user-drag-element-and-user-select-none.html See: https://build.webkit.org/builders/Apple%20Mavericks%20Debug%20WK2%20%28Tests%29/builds/8311 https://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK2%20(Tests)/r176693%20(8311)/results.html I verified this by locally building and running one of the tests. r176686 passes, r176687 crashes.
mitz
Comment 8 2014-12-03 09:27:05 PST
(In reply to comment #7) > This commit introduced the following crashes: > > fast/events/clear-drag-state.html > fast/css/user-drag-none.html > editing/pasteboard/dataTransfer-setData-getData.html > editing/pasteboard/drop-text-events-sideeffect-crash.html > editing/pasteboard/drag-drop-iframe-refresh-crash.html > editing/pasteboard/drop-text-events-sideeffect.html > editing/selection/user-drag-element-and-user-select-none.html > > See: > https://build.webkit.org/builders/ > Apple%20Mavericks%20Debug%20WK2%20%28Tests%29/builds/8311 > https://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK2%20(Tests)/ > r176693%20(8311)/results.html > > I verified this by locally building and running one of the tests. r176686 > passes, r176687 crashes. Thank you. Note that those “crashes” are failures of one of the assertions added in the last moment.
Mark Lam
Comment 9 2014-12-03 09:50:46 PST
(In reply to comment #7) > This commit introduced the following crashes: > > fast/events/clear-drag-state.html > fast/css/user-drag-none.html > editing/pasteboard/dataTransfer-setData-getData.html > editing/pasteboard/drop-text-events-sideeffect-crash.html > editing/pasteboard/drag-drop-iframe-refresh-crash.html > editing/pasteboard/drop-text-events-sideeffect.html > editing/selection/user-drag-element-and-user-select-none.html Created https://bugs.webkit.org/show_bug.cgi?id=139224 to track this issue. I also updated the TestExpectation in that bug.
Note You need to log in before you can comment on or make changes to this bug.