Open Bug 1922941 Opened 1 year ago Updated 1 year ago

Image mime types incorrectly reported as available for X11 clipboard

Categories

(Core :: Graphics: ImageLib, defect)

Firefox 131
defect

Tracking

()

UNCONFIRMED

People

(Reporter: vopros4, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0

Steps to reproduce:

  1. Right-click an image on a web page, "Copy Image".
  2. Run in console xclip -out -selection clipboard -target TARGETS
  3. Run in console xclip -out -selection clipboard -target image/tiff > 1.tif

Actual results:

The first time xclip listed data formats, which Firefox offers for the copied image:

$ xclip -out -selection clipboard -target TARGETS
TIMESTAMP
TARGETS
MULTIPLE
SAVE_TARGETS
text/html
text/_moz_htmlinfo
text/_moz_htmlcontext
image/png
image/jpeg
image/bmp
image/x-bmp
image/x-MS-bmp
image/x-icon
image/x-ico
image/x-win-bitmap
image/vnd.microsoft.icon
application/ico
image/ico
image/icon
text/ico
image/jxl
image/tiff

The second time I got an error:

$ xclip -out -selection clipboard -target image/tiff > 1.tif
Error: target image/tiff not available

Expected results:

For mime-types image/png, image/jpeg, image/bmp, image/x-bmp, image/x-MS-bmp a correct image file is created in all Firefox variations I tried. Vanilla Firefox 131.0 also works correctly for all other MS bitmap and icon types: image/x-icon, image/x-ico, image/x-win-bitmap, image/vnd.microsoft.icon, application/ico, image/ico, image/icon, text/ico.

image/jxl and image/tiff should also return correct image data in corresponding formats. Otherwise, Firefox should not report those types as available.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: ImageLib' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: ImageLib
Product: Firefox → Core

Tentatively triaging as S3, with escalation to triage for confirmation of priority. I'm unfamiliar with the clipboard format negotiation ecosystem. 😅

Blocks: gfx-triage
Severity: -- → S3
Flags: needinfo?(tnikkel)

(In reply to Erich Gubler [:ErichDonGubler] from comment #2)

I'm unfamiliar with the clipboard format negotiation ecosystem. 😅

I'm no expert. All I know, I learned from here:
https://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html
https://www.uninformativ.de/blog/postings/2017-04-02/0/POSTING-en.html

Is this causing you a problem? Or you were just poking around/curiousity?

Flags: needinfo?(vopros4)

(In reply to Timothy Nikkel (:tnikkel) from comment #4)

Is this causing you a problem? Or you were just poking around/curiousity?

JPEG, PNG and BMP cover everything I need.

Flags: needinfo?(vopros4)
No longer blocks: gfx-triage
Flags: needinfo?(tnikkel)
You need to log in before you can comment on or make changes to this bug.