[Webkit-unassigned] [Bug 36095] REGRESSION(r53287): drop event is not fired if dataTransfer.dropEffect is not explicitly set

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 14 14:35:52 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=36095


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #50675|review?                     |review+
               Flag|                            |




--- Comment #4 from Darin Adler <darin at apple.com>  2010-03-14 14:35:52 PST ---
(From update of attachment 50675)
> -    , m_dropEffect("none")
> +    , m_dropEffect("uninitialized")

Why not use the null string instead of the string "uninitialized"?

>  static DragOperation dragOpFromIEOp(const String& op)
>  {
>      // yep, it's really just this fixed set
> -    if (op == "uninitialized")
> +    if (op.isEmpty() || op == "uninitialized")
>          return DragOperationEvery;

What does this change accomplish?

> +    if (srcOpMask & DragOperationMove || srcOpMask & DragOperationGeneric)
> +        return (srcOpMask = DragOperationMove);

Could you write this in a more conventional fashion so the assignment statement
is more obvious?

    if (srcOpMask & DragOperationMove || srcOpMask & DragOperationGeneric) {
        srcOpMask = DragOperationMove;
        return DragOperationMove;
    }

A function like defaultOperationForDrag, that has a side effect of changing its
argument, probably needs a name with a verb rather than sounding just like a
clean getter with no side effects.

I'm going to say r=me, but I'm puzzled by the use of a specific string for the
uninitialized state and by the unexplained change to dragOpFromIEOp.

-- 
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