Closed Bug 145350 Opened 22 years ago Closed 22 years ago

New methods in nsDragAndDrop.js

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: p_ch, Assigned: p_ch)

References

Details

Attachments

(1 file, 2 obsolete files)

Since bug 139471 has grown too much, I think it is a good idea to split it, so
that it receives enough exposure.
I need these APIs (still backward compatible) for my patch.
What's new?
1) dragEnter method that calls DNDobserver.onDragEnter(). Defined the same way
as dragExit.
2) It's now possible to specify a DNDobserver.canDrop() method that tells
whether or not the drop can occur. Mouse cursor changes are therefore
automatically handled.
Motivations:
- same observer structure as the tree one.
- dragSession.canDrop is now reliably available in the user observer. I don't
have time for the moment to investigate it further, but, yes, it is necessary to
check canDrop for the Drop, dragover, dragenter and dragexit methods.
- heavy simplification of the observer code.
3) corrected some pasted and missing headers

There may be some issue to discuss: if canDrop == false, I don't call drop. I
think it makes sense, but I wanted to draw your attention on it, since it is the
only non-backward compatible thing.

Patch will follow.
Pink, Ben,  could you review this patch, please?
Attached patch Patch v1.0 (-wbu for review) (obsolete) — Splinter Review
Attached patch Patch v1.0 (obsolete) — Splinter Review
Blocks: 139471
Blocks: 92889
Attached patch Patch v1.1Splinter Review
r=timeless with the following change in checkCanDrop:
bail earlier if this.mDragService.getCurrentSession() is not defined in order
to save an indentation.
Attachment #84112 - Attachment is obsolete: true
Attachment #84113 - Attachment is obsolete: true
Attachment #84926 - Flags: review+
fixed
Status: NEW → ASSIGNED
really fixed
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Peirre, I'm not sure if this is the right bug but we can no longer drop on the
tabstrip. Is this caused by this patch or the one for bug
http://bugzilla.mozilla.org/show_bug.cgi?id=139471
wfm linux build 2002 08 08. 
please file a new bug explaining what the problem is and assign it to me.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: