Open Bug 1501232 Opened 6 years ago Updated 2 years ago

[e10s]Linux/Gtk+ Drag & drop from web page is missing icon and breaks the drop

Categories

(Core :: Widget, defect, P2)

defect

Tracking

()

Tracking Status
firefox65 --- affected

People

(Reporter: stransky, Unassigned)

Details

This comes from https://gitlab.gnome.org/GNOME/mutter/issues/340 When performing D&D a pdf from https://moodle.univ-tlse3.fr/ the firefox freezes and nothing is dropped. Firefox tries to create ridiculously big icon during the drop (10181 x 21 in my case) and fails. The icon size is received at TabParent::RecvInvokeDragSession() where: (gdb) p aDragRect $7 = (const mozilla::LayoutDeviceIntRect &) @0x7fffffff6028: { <mozilla::gfx::BaseRect<int, mozilla::gfx::IntRectTyped<mozilla::LayoutDevicePixel>, mozilla::gfx::IntPointTyped<mozilla::La youtDevicePixel>, mozilla::gfx::IntSizeTyped<mozilla::LayoutDevicePixel>, mozilla::gfx::IntMarginTyped<mozilla::LayoutDevicePi xel> >> = { x = -9160, y = 526, width = 10181, height = 26 }, <mozilla::LayoutDevicePixel> = {<No data fields>}, <No data fields>}
Component: Widget: Gtk → Drag and Drop
Summary: [e10s] Drag & drop from web page is missing icon and breaks the drop → [e10s]Linux/Gtk+ Drag & drop from web page is missing icon and breaks the drop
Hm, this is not related to e10s - the large drop icon is created even without it, at: (gdb) p dragRect.width $25 = 10181 #0 0x00007fffedd01d43 in nsDragService::SetAlphaPixmap(mozilla::gfx::SourceSurface*, _GdkDragContext*, int, int, mozilla::gfx::IntRectTyped<mozilla::LayoutDevicePixel> const&) (this=0x7fffd5cdf430, aSurface=0x7fffc39ec200, aContext=0x7fffcb1632e0, aXOffset=10085, aYOffset=14, dragRect=...) at /home/komat/tmp676-trunk-gtk3/src2/widget/gtk/nsDragService.cpp:461 #1 0x00007fffedd06eda in nsDragService::SetDragIcon(_GdkDragContext*) (this=0x7fffd5cdf430, aContext=0x7fffcb1632e0) at /home/komat/tmp676-trunk-gtk3/src2/widget/gtk/nsDragService.cpp:1843 #2 0x00007fffedcffe00 in invisibleSourceDragBegin(_GtkWidget*, _GdkDragContext*, void*) (aWidget=0x7fffd1b37e60, aContext=0x7fffcb1632e0, aData=0x7fffd5cdf430) at /home/komat/tmp676-trunk-gtk3/src2/widget/gtk/nsDragService.cpp:1863
No longer blocks: 1312120
The drag element here contains a small bit of text that is absolutely positioned with a left set to -10000. This creates a wide drag feedback image. Likely, we just need to tweak the scaling algorithm for large drag images in some way. The scaling is done near the beginning of PresShell::PaintRangePaintInfo. Note that this isn't gtk specific; it also happens on Mac for example, although the large empty area draws transparent so it doesn't look visibly wrong. Jim, I know you looked at drag feedback image scaling way back in bug 732733. Maybe someone could take a look?
Flags: needinfo?(jmathies)
Priority: -- → P2
I'll add this to my widget queue. We've been getting some work done here but the dev responsible for that is headed into a larger project. We'll try to get back to some of this work in a couple months.
Flags: needinfo?(jmathies)
moving this over so I can find it.
Component: Drag and Drop → Widget
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.