Open Bug 1585753 Opened 5 years ago Updated 2 years ago

View Source page missing context menu items

Categories

(Toolkit :: View Source, defect, P3)

defect

Tracking

()

Tracking Status
firefox-esr68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- fix-optional

People

(Reporter: wjmacfarland, Unassigned)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

Create a new Firefox instance

Copy+paste a link beginning w/ 'view-source:' into the URL bar.

Actual results:

Right-click context menu items for the View source page (such as syntax highlighting) do not appear for clicking.

Expected results:

Right-click context menu items for the View source page (such as syntax highlighting) should appear for clicking.

I have managed to reproduce this issue on latest Firefox Release (69.0.2), Beta (70.0b12) and Nightly (71.0a1 (2019-10-06)) versions on Windows 10 x64 and Mac OS 10.15 Beta.

Status: UNCONFIRMED → NEW
Component: Untriaged → View Source
Ever confirmed: true
Product: Firefox → Toolkit
Version: 69 Branch → Trunk

Thanks for the report! I can also reproduce this on my machine (Win10)

Honza

Priority: -- → P3

Jonathan, perhaps you could look at the patch?
Or is there someone else who could review it?

Thanks!
Honza

Flags: needinfo?(jkt)

Took a slight deviation from the initial post.

  • With the links bellow open in a different tab each:
    link 1 begining with " (view-source: ";
    [link 2] being the data for the first link;
    ** link 2 can be found here, to long for a comment;
    ** right click-ing inside the 2nd tab would reveal the menu options.

Based on this the regression pushlog would be:

  • Last good build: 2018-10-28
  • First bad build: 2018-10-29
  • Pushlog URL

Additional Notes:

  1. With the above mentioned steps the menu options are displayed in the 2nd tab even for link 1 instead of the tab with link 2;
  2. 72.0a1 (2019-12-01) is also affected by this, updating the flag for it;
  3. Still uncertain on the menu, for the option to display the link/data as per link 2; but it appers to be another issue as well.
    Would need a confirmation for it.

Sorry for the delay here, I thought at first this might be triggering principal related however it seems like we only load view source tabs whilst having system principal we could also use a view-source content one:

gBrowser.loadURI("view-source:http://example.com", {triggeringPrincipal: Services.scriptSecurityManager.createContentPrincipal(Services.io.newURI("view-source:http://example.com"), {})})

I can't see any common avenue for reproducing this that makes sense, it looks perhaps like the frame script isn't always instantiated and the last people to touch this kinda code was jryans and mconley.

:jryans are you able to provide any more pointers here, it appears to be a race condition in instantiating the content script for the view-source protocol.

Flags: needinfo?(jkt) → needinfo?(jryans)

Actually new window vs new tab seems to be a consistent reproduction difference for me. Which leads me to think ViewSourceBrowser script might not have loaded yet.

I see that gViewSourceUtils is lazily loaded and perhaps that is the difference/issue?

Regression in 65, wontfix for 71 and esr, fix-optional for 72.

Hmm, I believe it's specific to pasting / entering view-source URLs manually vs. triggering a new view source tab via browser UI.

I don't believe that's a regression, but just a confusing bug that has been around since we added the view source in tab mode (bug 1191033). Is that the root cause here as well?

Flags: needinfo?(jryans)

(Either way, the context menu items should really be reimplemented, as they currently rely on menuitem tags that are destined for eventual removal).

If you plan to re-implement, should this still be a P3? I'm about to drop it from regression triage, so we won't be looking at this bug weekly/monthly anymore.

Flags: needinfo?(jryans)

I am not working in this area actively at the moment, so I defer to Honza.

Flags: needinfo?(jryans) → needinfo?(odvarko)

It doesn't feel that any refactoring of the menu would happen any time soon. So, I think P3 is fine.

Flags: needinfo?(odvarko)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: