Loading browser/base/content/tabbrowser.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1925,6 +1925,9 @@ // "internet shortcut" dt.mozSetDataAt("text/plain", spec, 0); // Set the cursor to an arrow during tab drags. dt.mozCursor = "default"; var canvas = tabPreviews.capture(target, false); dt.setDragImage(canvas, 0, 0); aEvent.stopPropagation(); Loading content/events/src/nsDOMDataTransfer.cpp +21 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ nsDOMDataTransfer::nsDOMDataTransfer() mIsExternal(PR_FALSE), mUserCancelled(PR_FALSE), mDragImageX(0), mDragImageY(0) mDragImageY(0), mCursorState(PR_FALSE) { } Loading Loading @@ -297,6 +298,25 @@ nsDOMDataTransfer::GetMozItemCount(PRUint32* aCount) return NS_OK; } NS_IMETHODIMP nsDOMDataTransfer::GetMozCursor(nsAString& aCursorState) { if (mCursorState) aCursorState.AssignASCII("default"); else aCursorState.AssignASCII("auto"); return NS_OK; } NS_IMETHODIMP nsDOMDataTransfer::SetMozCursor(const nsAString& aCursorState) { // Lock the cursor to an arrow during the drag. mCursorState = aCursorState.EqualsASCII("default"); return NS_OK; } NS_IMETHODIMP nsDOMDataTransfer::MozTypesAt(PRUint32 aIndex, nsIDOMDOMStringList** aTypes) { Loading content/events/src/nsDOMDataTransfer.h +3 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,9 @@ protected: PRUint32 mDropEffect; PRUint32 mEffectAllowed; // Indicates the behavior of the cursor during drag operations PRPackedBool mCursorState; // readonly data transfers may not be modified except the drop effect and // effect allowed. PRPackedBool mReadOnly; Loading dom/interfaces/events/nsIDOMDataTransfer.idl +11 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ interface nsIVariant; [scriptable, uuid(B5947DD0-8E86-4B9C-AA65-C86303EFCF94)] [scriptable, uuid(E4970BA1-9567-455C-8B4E-4607D7E741BB)] interface nsIDOMDataTransfer : nsISupports { /** Loading Loading @@ -180,6 +180,16 @@ interface nsIDOMNSDataTransfer : nsISupports */ readonly attribute unsigned long mozItemCount; /** * Sets the drag cursor state. Primarily used to control the cursor during * tab drags, but could be expanded to other uses. * * Possible values: * auto - use default system behavior. * default - set the cursor to an arrow during the drag operation. */ attribute DOMString mozCursor; /** * Holds a list of the format types of the data that is stored for an item * at the specified index. If the index is not in the range from 0 to Loading widget/src/windows/nsDragService.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ nsDragService::StartInvokingDragSession(IDataObject * aDataObj, { // To do the drag we need to create an object that // implements the IDataObject interface (for OLE) nsNativeDragSource* nativeDragSource = new nsNativeDragSource(); nsNativeDragSource* nativeDragSource = new nsNativeDragSource(mDataTransfer); if (!nativeDragSource) return NS_ERROR_OUT_OF_MEMORY; Loading Loading
browser/base/content/tabbrowser.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1925,6 +1925,9 @@ // "internet shortcut" dt.mozSetDataAt("text/plain", spec, 0); // Set the cursor to an arrow during tab drags. dt.mozCursor = "default"; var canvas = tabPreviews.capture(target, false); dt.setDragImage(canvas, 0, 0); aEvent.stopPropagation(); Loading
content/events/src/nsDOMDataTransfer.cpp +21 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ nsDOMDataTransfer::nsDOMDataTransfer() mIsExternal(PR_FALSE), mUserCancelled(PR_FALSE), mDragImageX(0), mDragImageY(0) mDragImageY(0), mCursorState(PR_FALSE) { } Loading Loading @@ -297,6 +298,25 @@ nsDOMDataTransfer::GetMozItemCount(PRUint32* aCount) return NS_OK; } NS_IMETHODIMP nsDOMDataTransfer::GetMozCursor(nsAString& aCursorState) { if (mCursorState) aCursorState.AssignASCII("default"); else aCursorState.AssignASCII("auto"); return NS_OK; } NS_IMETHODIMP nsDOMDataTransfer::SetMozCursor(const nsAString& aCursorState) { // Lock the cursor to an arrow during the drag. mCursorState = aCursorState.EqualsASCII("default"); return NS_OK; } NS_IMETHODIMP nsDOMDataTransfer::MozTypesAt(PRUint32 aIndex, nsIDOMDOMStringList** aTypes) { Loading
content/events/src/nsDOMDataTransfer.h +3 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,9 @@ protected: PRUint32 mDropEffect; PRUint32 mEffectAllowed; // Indicates the behavior of the cursor during drag operations PRPackedBool mCursorState; // readonly data transfers may not be modified except the drop effect and // effect allowed. PRPackedBool mReadOnly; Loading
dom/interfaces/events/nsIDOMDataTransfer.idl +11 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ interface nsIVariant; [scriptable, uuid(B5947DD0-8E86-4B9C-AA65-C86303EFCF94)] [scriptable, uuid(E4970BA1-9567-455C-8B4E-4607D7E741BB)] interface nsIDOMDataTransfer : nsISupports { /** Loading Loading @@ -180,6 +180,16 @@ interface nsIDOMNSDataTransfer : nsISupports */ readonly attribute unsigned long mozItemCount; /** * Sets the drag cursor state. Primarily used to control the cursor during * tab drags, but could be expanded to other uses. * * Possible values: * auto - use default system behavior. * default - set the cursor to an arrow during the drag operation. */ attribute DOMString mozCursor; /** * Holds a list of the format types of the data that is stored for an item * at the specified index. If the index is not in the range from 0 to Loading
widget/src/windows/nsDragService.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ nsDragService::StartInvokingDragSession(IDataObject * aDataObj, { // To do the drag we need to create an object that // implements the IDataObject interface (for OLE) nsNativeDragSource* nativeDragSource = new nsNativeDragSource(); nsNativeDragSource* nativeDragSource = new nsNativeDragSource(mDataTransfer); if (!nativeDragSource) return NS_ERROR_OUT_OF_MEMORY; Loading