Closed Bug 1620921 Opened 4 years ago Closed 4 years ago

view image on canvas in new tab / window no longer works

Categories

(Firefox :: Menus, defect, P1)

75 Branch
Desktop
All
defect

Tracking

()

RESOLVED FIXED
Firefox 76
Tracking Status
firefox-esr68 --- unaffected
firefox73 --- unaffected
firefox74 --- wontfix
firefox75 --- wontfix
firefox76 --- fixed

People

(Reporter: lilydjwg, Assigned: Gijs)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

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

Steps to reproduce:

Actual results:

Firefox says the URL is invalid.

Expected results:

Firefox should display the image in the newly opened tab / window.

150:21.81 INFO: Last good revision: 398b5e6b2dab72d5be60bc81b0fda2d2c27bfb25
150:21.81 INFO: First bad revision: b9740bd7bf8f1a0656c09a88fe6d7ee00586ee60
150:21.81 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=398b5e6b2dab72d5be60bc81b0fda2d2c27bfb25&tochange=b9740bd7bf8f1a0656c09a88fe6d7ee00586ee60

Being able to view images in new tabs is useful to view images closely or simultaneously without the need to save images on disk. The "Copy Image" is not available on canvas so it's useful for copying images too.

I can reproduce on Nightly75.0a1 Windows10.

Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → DOM: File
Ever confirmed: true
Keywords: regression
OS: Unspecified → All
Product: Firefox → Core
Regressed by: 1472158
Hardware: Unspecified → Desktop

Hmm, it seems that this the desired behavior wanted by bug 1472158. I assume, the new tab on the middle-click generates a different process and then the blobURL is not broadcasted any more. The question could be: should the new tab really run in a new process in this case?

Flags: needinfo?(amarchesini)

We are working on an important refactoring of how blobURLs are loaded. Subhamoy is working on it. But in the meantime, we should fix this issue without reverting bug 1472158.

Nika do you know if there is a way to load the new tab on the same process, based on the STR in the description of this bug?

Flags: needinfo?(amarchesini) → needinfo?(nika)

There's the sameProcessAsFrameloader mechanism, but it's not Fission-compatible.

The front-end could potentially work around this by not using Blob's at all. I think we could probably just have the new tab link to the image URL (unless there's a reason we're not doing that in the first place). I that's the preferred method, this should probably go under Firefox :: Menus.

Tentatively assigned to Firefox::Menus then.

Component: DOM: File → Menus
Product: Core → Firefox

(In reply to Mike Conley (:mconley) (:⚙️) from comment #4)

The front-end could potentially work around this by not using Blob's at all. I think we could probably just have the new tab link to the image URL (unless there's a reason we're not doing that in the first place). I that's the preferred method, this should probably go under Firefox :: Menus.

The bug is about HTML canvas, where there is no URL. blob: is used to get a URL to refer to the (saved in memory) image that we create from the canvas. Perhaps we could use sameProcessAsFrameloader for now, and when the refactor from comment #3 arrives we could switch to whatever the new mechanism is, or look at how to update sameProcessAsFrameloader so it is fission-compatible (sameProcessAsBrowsingContext, perhaps?). It might not be an issue for fission anyway; the image will be in tab with origin X, the blob URL gets created with the same origin X, and so the new process selected should also be the (same) process for origin X.

Mike, does that sound OK?

Flags: needinfo?(nika) → needinfo?(mconley)

(In reply to :Gijs (he/him) from comment #6)

The bug is about HTML canvas,

D'oh, missed that part. Thanks.

Perhaps we could use sameProcessAsFrameloader for now, and when the refactor from comment #3 arrives we could switch to whatever the new mechanism is...
Mike, does that sound OK?

Yes it does!

Flags: needinfo?(mconley)

Ever since bug 346849 I feel a weird kind of affinity for these menuitems, so I guess I might as well own fixing it.

Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Priority: -- → P1

(oh, but wontfix for 74 because it's releasing tomorrow and we're all out of beta runway)

Hi Gijs, can we still expect a patch for 75 then?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Jens Stutte [:jstutte] from comment #10)

Hi Gijs, can we still expect a patch for 75 then?

Sorry, I've been working on some higher-prio stuff. I got stuck on the new window case, where forcing the use of the "right" process is non-trivial, but I just talked with baku and there's an easier solution here. Patch coming up.

Flags: needinfo?(gijskruitbosch+bugs)

Adding a test to ensure this doesn't break again...

Flags: in-testsuite+
Attachment #9134171 - Attachment description: Bug 1620921 - restart broadcasting blob URIs to ensure 'view image' works correcxtly, r?baku → Bug 1620921 - restart broadcasting system principal blob URIs to ensure 'view image' works correctly, r?baku
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/0f0839c074a2
restart broadcasting system principal blob URIs to ensure 'view image' works correctly, r=baku
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d40eab931f6
Backed out changeset 0f0839c074a2 for windows 2012 build bustage CLOSED TREE
Pushed by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d7b1a9284842
restart broadcasting system principal blob URIs to ensure 'view image' works correctly, r=baku CLOSED TREE

This relanded, thanks Stefan!

Flags: needinfo?(gijskruitbosch+bugs)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76

The patch landed in nightly and beta is affected.
:Gijs, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(gijskruitbosch+bugs)

Last beta tomorrow, rc next week, so a bit late in the cycle... this functionality seems kind of edgecase (only breaks for canvas images, not all images) and blob URI broadcasting might have other side-effects, so let's have it ride the trains.

Flags: needinfo?(gijskruitbosch+bugs)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: