[Webkit-unassigned] [Bug 31711] Fake drag example does not work properly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 1 23:57:08 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31711
--- Comment #14 from Alejandro G. Castro <alex at igalia.com> 2009-12-01 23:57:07 PST ---
(In reply to comment #12)
> (From update of attachment 43584 [details])
> The ChangeLog in this patch has tabs in it.
>
Oops, thanks for the review I'll fix it.
> Won't this change behavior when you click without dragging?
Not completely sure, that is why I would like someone with more experience in
the handle_event code could review it. My analysis is this:
m_beganSelectingText it is assigned in various places but it is used just in
two places in the code, the first one is the one we want to modify the
behaviour:
EventHandler.cpp:555
if (!m_beganSelectingText) {
m_beganSelectingText = true;
newSelection = VisibleSelection(targetPosition);
}
And the second one is in the release handler:
EventHandler.cpp:611
if (m_mouseDownWasSingleClickInSelection && !m_beganSelectingText
#if ENABLE(DRAG_SUPPORT)
&& m_dragStartPos == event.event().pos()
#endif
&& m_frame->selection()->isRange()
&& event.event().button() != RightButton) {
This case is caused when m_mouseDownWasSingleClickInSelection is true which
just can happen if the code where we have added the assignation of
m_beganSelectingText was not executed due to the return false after the
assignation:
EventHandler.cpp:320
if (!extendSelection && m_frame->selection()->contains(vPoint)) {
m_mouseDownWasSingleClickInSelection = true;
return false;
}
We added the assignation in the same method after these lines.
I hope it clarifies the rationale. I'll upload the new patch with Changelog
fixed.
Thanks again for the review :).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list