Closed Bug 497493 Opened 15 years ago Closed 14 years ago

Don't set mDragSession.canDrop during nsDragAndDrop.dragExit()

Categories

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

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: karlt, Unassigned)

References

Details

(Keywords: perf)

There is no need to set mDragSession.canDrop during nsDragAndDrop.dragExit(),
as the dragleave signal indicates that the drop will not occur on this
(temporary) destination.  Calling aDragDropObserver.canDrop() can take
significant time to wait for data from another application.

Similarly, there is no need to set mDragSession.canDrop during
nsDragAndDrop.dragEnter() as a dropover event will follow the dragenter event.
(In reply to comment #0)
> Similarly, there is no need to set mDragSession.canDrop during
> nsDragAndDrop.dragEnter() as a dropover event will follow the dragenter event.

Maybe that part is necessary as the element for the dropover event (current target element) is not necessarily the same element as the dragenter event (immediate user selection) if the dragenter event is not canceled.

http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#drag-and-drop-processing-model
Summary: Don't set mDragSession.canDrop during nsDragAndDrop.dragExit() or dragEnter() → Don't set mDragSession.canDrop during nsDragAndDrop.dragExit()
Is this still an issue? The nsDragAndDrop.js script is obsolete, not used in Firefox, and is only provided for compatibility with old code.
I haven't looked at this for a while, so haven't checked how the replacement behaves, but if nsDragAndDrop.js is not intended to be used then there's not much point keeping this bug around.

Guessing bug 545714 might be the relevant bug.
Status: NEW → RESOLVED
Closed: 14 years ago
Depends on: 545714
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.