Changeset 238375 in webkit
- Timestamp:
- Nov 19, 2018 8:31:22 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r238365 r238375 1 2018-11-19 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Dragging image with a border-image larger than the image element crashes 4 https://bugs.webkit.org/show_bug.cgi?id=191817 5 <rdar://problem/46159222> 6 7 Reviewed by Ryosuke Niwa. 8 9 Verifies that an image that meets the pathological criteria described in Source/WebCore/ChangeLog can still be 10 dragged and dropped into an editable area. 11 12 * fast/events/drag-image-with-border-image.html: Added. 13 * platform/gtk/TestExpectations: 14 * platform/ios/TestExpectations: 15 * platform/mac-wk2/TestExpectations: 16 * platform/wpe/TestExpectations: 17 18 Enable this test only in WebKit1. 19 1 20 2018-11-18 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 21 -
trunk/LayoutTests/platform/gtk/TestExpectations
r238350 r238375 2502 2502 webkit.org/b/42194 fast/events/drag-and-drop-link.html [ Failure ] 2503 2503 webkit.org/b/157179 fast/events/drag-and-drop-link-into-focused-contenteditable.html [ Failure ] 2504 webkit.org/b/157179 fast/events/drag-image-with-border-image.html [ Failure ] 2504 2505 webkit.org/b/157179 fast/events/draggable-div-customdata.html [ Failure ] 2505 2506 webkit.org/b/157179 fast/events/draggable-div-nodata.html [ Failure ] -
trunk/LayoutTests/platform/ios/TestExpectations
r238279 r238375 282 282 fast/events/drag-file-crash.html [ Skip ] 283 283 fast/events/drag-image-filename.html [ Skip ] 284 fast/events/drag-image-with-border-image.html [ Skip ] 284 285 fast/events/drag-in-frames.html [ Skip ] 285 286 fast/events/drag-and-drop-link.html [ Skip ] -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r238299 r238375 130 130 fast/events/drag-and-drop-link-fast-multiple-times-does-not-crash.html 131 131 fast/events/drag-and-drop-link-containing-block.html 132 fast/events/drag-image-with-border-image.html 132 133 fast/events/drag-in-frames.html 133 134 fast/events/drag-parent-node.html -
trunk/LayoutTests/platform/wpe/TestExpectations
r238350 r238375 159 159 fast/events/drag-display-none-element.html [ Skip ] 160 160 fast/events/drag-image-filename.html [ Skip ] 161 fast/events/drag-image-with-border-image.html [ Skip ] 161 162 fast/events/drag-in-frames.html [ Skip ] 162 163 fast/events/drag-outside-window.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r238363 r238375 1 2018-11-19 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Dragging image with a border-image larger than the image element crashes 4 https://bugs.webkit.org/show_bug.cgi?id=191817 5 <rdar://problem/46159222> 6 7 Reviewed by Ryosuke Niwa. 8 9 When dragging an image element, if the image element has: 10 11 (1) box-sizing: border-box; 12 (2) a border-image 13 (3) a border-top-width that is at least as large as the height of the element and/or a border-left-width that is 14 at least as large as the width of the element 15 16 ...then upon drag, we will fail to create a suitable drag image using the bounding box of the image element 17 since the size is empty, thereby causing a crash. To fix this, we bail out of this bounding-rect-dependent 18 codepath for generating a drag image in the case where the bounding rect is empty, and instead fall back to an 19 icon representation for the drag image. 20 21 Test: fast/events/drag-image-with-border-image.html 22 23 * page/DragController.cpp: 24 (WebCore::DragController::doImageDrag): 25 1 26 2018-11-18 Zan Dobersek <zdobersek@igalia.com> 2 27 -
trunk/Source/WebCore/page/DragController.cpp
r237986 r238375 1205 1205 1206 1206 Image* image = getImage(element); 1207 if (image && shouldUseCachedImageForDragImage(*image) && (dragImage = DragImage { createDragImageFromImage(image, element.renderer() ? orientationDescription : ImageOrientationDescription()) })) {1207 if (image && !layoutRect.isEmpty() && shouldUseCachedImageForDragImage(*image) && (dragImage = DragImage { createDragImageFromImage(image, element.renderer() ? orientationDescription : ImageOrientationDescription()) })) { 1208 1208 dragImage = DragImage { fitDragImageToMaxSize(dragImage.get(), layoutRect.size(), maxDragImageSize()) }; 1209 1209 IntSize fittedSize = dragImageSize(dragImage.get());
Note: See TracChangeset
for help on using the changeset viewer.