Changeset 211377 in webkit


Ignore:
Timestamp:
Jan 30, 2017, 10:59:36 AM (8 years ago)
Author:
Wenson Hsieh
Message:

Web content process crashes when initiating a drag on a very large image
https://bugs.webkit.org/show_bug.cgi?id=167564

Reviewed by Beth Dakin.

If we begin dragging an image element that is too large to show the cached image for, we will show an image file
icon instead of the cached image. This may return null if createDragImageIconForCachedImageFilename is
unimplemented, so in the meantime, we should not assume that dragImage will always exist before calling into
doSystemDrag in doImageDrag and bail from the drag operation if that is the case.

  • page/DragController.cpp:

(WebCore::DragController::doImageDrag):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r211376 r211377  
     12017-01-30  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        Web content process crashes when initiating a drag on a very large image
     4        https://bugs.webkit.org/show_bug.cgi?id=167564
     5
     6        Reviewed by Beth Dakin.
     7
     8        If we begin dragging an image element that is too large to show the cached image for, we will show an image file
     9        icon instead of the cached image. This may return null if createDragImageIconForCachedImageFilename is
     10        unimplemented, so in the meantime, we should not assume that dragImage will always exist before calling into
     11        doSystemDrag in doImageDrag and bail from the drag operation if that is the case.
     12
     13        * page/DragController.cpp:
     14        (WebCore::DragController::doImageDrag):
     15
    1162017-01-30  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebCore/page/DragController.cpp

    r211033 r211377  
    978978    }
    979979
     980    if (!dragImage)
     981        return;
     982
    980983    dragImageOffset = mouseDownPoint + scaledOrigin;
    981984    doSystemDrag(dragImage, dragImageOffset, dragOrigin, dataTransfer, frame, false);
Note: See TracChangeset for help on using the changeset viewer.