You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DataTransfer.setDragImage() steps are unclear on how to size passed in <img> #13099
If image is an img element, then set the drag data store bitmap to the element's image (at its natural size); otherwise, set the drag data store bitmap to an image generated from the given element (the exact mechanism for doing so is not currently specified).
For images that don't have a natural size, like dimensionless SVG images or an <img> with content: linear-gradient(...), its unclear what to do here.
For the most part, places where images need to be sized and displayed in some way like this should specify a concrete object size resolution algorithm to use.
Here though, I think it might make more sense to just defer to the engine so they can use whatever rules they use of drag-and-drop of images elsewhere. Or, if there is spec text about the normal (non-script) drag-and-drop of images, defer to that.
The one case that might be worth calling out is what to do about an <img> that is detached from the DOM, as that won't be handled in the non-script case. For that case, my suggestion would be to use the default sizing algorithm but allowing engines to set reasonable limits on maximum and minimum concrete sizes.
Activity
[Image Redux] Make createDragImageFromImage() take a NativeImage
[Image Redux] Make createDragImageFromImage() take a NativeImage