1. 13 May, 2011 1 commit
    • dcheng@chromium.org's avatar
      2011-05-13 Daniel Cheng <dcheng@chromium.org> · 0eb6dc60
      dcheng@chromium.org authored
              Reviewed by Tony Chang.
              Improve drag start logic
              Add a new test to test drag start edge cases on Mac (because of a non-zero text drag delay)
              as well as rebase an existing test.
              * fast/css/user-drag-none.html: Text nodes are no longer draggable.
              * platform/mac/editing/pasteboard/drag-selections-to-contenteditable-expected.txt: Added.
              * platform/mac/editing/pasteboard/drag-selections-to-contenteditable.html: Added.
      2011-05-13  Daniel Cheng  <dcheng@chromium.org>
              Reviewed by Tony Chang.
              Improve drag start logic
              Rewrite and simplify the dragging logic to better match IE, Firefox, and the behavior
              defined in the spec. Among other things:
              - draggableNode() no longer returns text nodes when dragging anchors.
              - When starting a drag over an image in a selection, prefer to drag the selection.
              - Several redundant hit tests have been removed.
              - Minor refactoring to make the logic easier to follow.
              Test: platform/mac/editing/pasteboard/drag-selections-to-contenteditable.html
              * WebCore.xcodeproj/project.pbxproj:
              * page/DragController.cpp:
              * page/DragController.h:
              * page/DragState.h:
              * page/EventHandler.cpp:
              * page/EventHandler.h:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  2. 27 Feb, 2010 1 commit
    • mitz@apple.com's avatar
      <rdar://problem/7696607> Links do not respect -webkit-user-drag: none · 29bb5006
      mitz@apple.com authored
      Reviewed by Maciej Stachowiak.
      Test: fast/css/user-drag-none.html
      * page/DragController.cpp:
      (WebCore::DragController::mayStartDragAtEventLocation): Added a node
      parameter. The image drag check is done against the node, rather than
      than against the hit test result. This prevents a non-draggable image
      with an auto-draggable ancestor from being dragged alone. The link drag
      check now ignores links that are -webkit-user-drag: none.
      * page/DragController.h:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::shouldDragAutoNode): Pass the current node
      to mayStartDragAtEventLocation().
      * fast/css/user-drag-none-expected.txt: Added.
      * fast/css/user-drag-none.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55353 268f45cc-cd09-0410-ab3c-d52691b4dbfc