RESOLVED FIXED 44295
Insertion point does not show when dragging text into an editable area
https://bugs.webkit.org/show_bug.cgi?id=44295
Summary Insertion point does not show when dragging text into an editable area
Simon Fraser (smfr)
Reported 2010-08-19 14:41:04 PDT
65681 caused the caret to use the last-computed caret rect when painting, rather than forcing a style update. That seems to have changed the drawing of the insertion caret during drag and drop. This affects the pixel results of this test: editing/selection/drag-in-iframe.html
Attachments
Patch (1.70 KB, patch)
2010-08-27 14:35 PDT, Simon Fraser (smfr)
tony: review+
Simon Fraser (smfr)
Comment 1 2010-08-20 09:53:27 PDT
Simon Fraser (smfr)
Comment 2 2010-08-27 13:56:36 PDT
My patch fixes the bug interactively, but the caret still doesn't get captured in the pixel result. Interactively, DragController::doSystemDrag() blocks in m_client->startDrag() until the drag is complete. In DRT, it seems to return immediately, so cleanupAfterSystemDrag() resets the drag caret to empty, before the snapshot is taken.
Simon Fraser (smfr)
Comment 3 2010-08-27 14:35:01 PDT
Enrica Casucci
Comment 4 2010-08-27 14:42:21 PDT
Comment on attachment 65769 [details] Patch > diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog > index c8f9bcf61fa93600c1aac821e070adcb3f67a2d9..95357b5dda1f94c6d24ea0838d6d22645fb4a4f8 100644 > --- a/WebCore/ChangeLog > +++ b/WebCore/ChangeLog > @@ -1,5 +1,26 @@ > 2010-08-27 Simon Fraser <simon.fraser@apple.com> > > + Reviewed by NOBODY (OOPS!). > + > + Insertion point does not show when dragging text into an editable area > + https://bugs.webkit.org/show_bug.cgi?id=44295 > + > + r65681 caused the caret to use the last-computed caret rect when > + painting, rather than forcing a style update. Because of this, > + we now need to eagerly update the caret rect when changing > + the drag selection. > + > + Not testable in DRT because the drag selection is always cleared > + before EventSender returns, so the drag caret can never show in > + the pixel results. > + > + Tested by running editing/selection/drag-in-iframe.html manually. > + > + * editing/SelectionController.cpp: > + (WebCore::SelectionController::setSelection): > + > +2010-08-27 Simon Fraser <simon.fraser@apple.com> > + > Reviewed by Tony Chang. > > Crash in CSSStyleSelector.cpp > diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp > index 3672e3e757bfdd87f40395e46004e4dab17e220d..97dde55e3cde543ccf23ea6344de4249ec8311ed 100644 > --- a/WebCore/editing/SelectionController.cpp > +++ b/WebCore/editing/SelectionController.cpp > @@ -118,6 +118,7 @@ void SelectionController::setSelection(const VisibleSelection& s, bool closeTypi > m_selection = s; > m_caretRectNeedsUpdate = true; > invalidateCaretRect(); > + updateCaretRect(); > return; > } > if (!m_frame) { Looks good to me.
Simon Fraser (smfr)
Comment 5 2010-08-27 15:50:52 PDT
Note You need to log in before you can comment on or make changes to this bug.