Closed Bug 1241892 Opened 8 years ago Closed 8 years ago

"Page Info" context menu items don't work in sidebar (was intentionally broken in bug 1238180)

Categories

(Firefox :: Page Info Window, defect)

45 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 50
Tracking Status
firefox45 --- wontfix
firefox46 --- wontfix
firefox47 --- wontfix
firefox48 --- wontfix
firefox49 --- verified
firefox50 --- verified

People

(Reporter: mconley, Assigned: mconley)

References

Details

(Keywords: regression)

Attachments

(2 files)

STR:

1) Create a bookmark
2) In the bookmarks manager, select the bookmark, and click the down arrow under "Tags" to expand your options.
3) Check "Load this bookmark in the sidebar"
4) Open the bookmark
5) The bookmarked page should now load in the sidebar browser.
6) Right-click in the sidebar browser, and choose "View Page Info" or "Inspect Element" (or "View Image Info" if hovering an image, or any of the items under "This Frame" if hovering over an iframe). Also try "View Page Source".

These items don't work.
Blocks: 1238180
Keywords: regression
The title is too general, because almost all menu items were regressed one by one,
and also this is duplicate of bug 1241147
See Also: → 501557, 1159259
Summary: Sidebar context menu items don't work → "Page Info" context menu item don't work in sidebar (was intentionally broken in bug 1238180)
Summary: "Page Info" context menu item don't work in sidebar (was intentionally broken in bug 1238180) → "Page Info" context menu items don't work in sidebar (was intentionally broken in bug 1238180)
Component: General → Page Info Window
mconley: Since bug 1238180 regressed this, do you know what's involved here to fix this?

I know some people don't like the sidebar, but since it's still supported, we should probably not have busted menuitems.
Flags: needinfo?(mconley)
Most of the breakage is because a lot of the context menu stuff (and operations) was converted to work with e10s assuming that gBrowser was available in the window scope, which is not true in the web panel.

I think it shouldn't be too bad to patch some of this - incoming...
Assignee: nobody → mconley
Flags: needinfo?(mconley)
The modifications that were made in bug 1238180 assumed that
gBrowser.selectedBrowser from the opening window context would
be defined. This is true in normal browser tabs, but not so much
in the sidebar browser. This patch makes it so that callers can
supply a browser to override the assumption.

Review commit: https://reviewboard.mozilla.org/r/62154/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/62154/
Attachment #8767752 - Flags: review?(florian)
Attachment #8767753 - Flags: review?(jryans)
The sidebar browser is always non-remote, so when we open a new tab
to open view source for it, we should ensure that that tab is also
non-remote.

Review commit: https://reviewboard.mozilla.org/r/62156/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/62156/
Comment on attachment 8767752 [details]
Bug 1241892 - Make Page Info work for sidebar browser.

https://reviewboard.mozilla.org/r/62154/#review59116

Looks reasonable.

One issue I observed is that when opening Page Info on the page loaded in the sidebar (eg. on https://www.mozilla.org/en-US/ ), a few seconds later I get this JS error:
A coding exception was thrown and uncaught in a Task.

Full message: ReferenceError: setTimeout is not defined
Full stack: PageInfoListener.processFrames/<@chrome://browser/content/content.js:1133:40
PageInfoListener.processFrames@chrome://browser/content/content.js:1133:17
TaskImpl_run@resource://gre/modules/Task.jsm:319:40
TaskImpl@resource://gre/modules/Task.jsm:280:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:254:14
Task_spawn@resource://gre/modules/Task.jsm:168:12
PageInfoListener.getMediaInfo@chrome://browser/content/content.js:1099:5
PageInfoListener.receiveMessage@chrome://browser/content/content.js:1000:5

I don't know why setTimeout isn't defined for the sidebar's content script.

Something else I observed is that the top part of the context menu (back, forward, stop/reload, bookmark) isn't working on the sidebar.
Attachment #8767752 - Flags: review?(florian) → review+
Comment on attachment 8767753 [details]
Bug 1241892 - Make View Source work in the sidebar browser.

https://reviewboard.mozilla.org/r/62156/#review59238

Looks resonable to me, thanks!
(In reply to Florian Quèze [:florian] [:flo] from comment #7)
> Comment on attachment 8767752 [details]
> Bug 1241892 - Make Page Info work for sidebar browser.
> 
> https://reviewboard.mozilla.org/r/62154/#review59116
> 
> Looks reasonable.
> 
> One issue I observed is that when opening Page Info on the page loaded in
> the sidebar (eg. on https://www.mozilla.org/en-US/ ), a few seconds later I
> get this JS error:
> A coding exception was thrown and uncaught in a Task.
> 
> Full message: ReferenceError: setTimeout is not defined
> Full stack:
> PageInfoListener.processFrames/<@chrome://browser/content/content.js:1133:40
> PageInfoListener.processFrames@chrome://browser/content/content.js:1133:17
> TaskImpl_run@resource://gre/modules/Task.jsm:319:40
> TaskImpl@resource://gre/modules/Task.jsm:280:3
> createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:254:14
> Task_spawn@resource://gre/modules/Task.jsm:168:12
> PageInfoListener.getMediaInfo@chrome://browser/content/content.js:1099:5
> PageInfoListener.receiveMessage@chrome://browser/content/content.js:1000:5
> 
> I don't know why setTimeout isn't defined for the sidebar's content script.
> 
> Something else I observed is that the top part of the context menu (back,
> forward, stop/reload, bookmark) isn't working on the sidebar.

Thanks - I'll file follow-ups for those.
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d0d26b8d20ab
Make Page Info work for sidebar browser. r=florian
https://hg.mozilla.org/integration/autoland/rev/f1d3824a31ae
Make View Source work in the sidebar browser. r=jryans
See Also: → 1285012
See Also: → 1285014
https://hg.mozilla.org/mozilla-central/rev/d0d26b8d20ab
https://hg.mozilla.org/mozilla-central/rev/f1d3824a31ae
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Should we consider backporting this?
Flags: needinfo?(mconley)
Version: unspecified → 45 Branch
We could. Shipping broken menuitems sure doesn't look great. I'll see what relman wants to do.
Flags: needinfo?(mconley)
Comment on attachment 8767752 [details]
Bug 1241892 - Make Page Info work for sidebar browser.

Approval Request Comment
[Feature/regressing bug #]:

Bug 1238180.

[User impact if declined]:

Users who use the sidebar browser (a pretty hidden feature, but it's used by at least some of our user population) will find that some context menu options don't work at all for the sidebar browser. Specifically, Page Info and View Source.

This will affect users regardless of whether or not they have e10s enabled or not.

[Describe test coverage new/current, TreeHerder]:

There's unfortunately not a huge amount of test coverage for the sidebar browser context menu. I do know that we have Page Info and View Source tests, and that those continue to pass, so we haven't regressed the normal uses of those features.

[Risks and why]: 

I think this is pretty low risk.

[String/UUID change made/needed]:

None.
Attachment #8767752 - Flags: approval-mozilla-beta?
Attachment #8767752 - Flags: approval-mozilla-aurora?
Comment on attachment 8767753 [details]
Bug 1241892 - Make View Source work in the sidebar browser.

Same as above.
Attachment #8767753 - Flags: approval-mozilla-beta?
Attachment #8767753 - Flags: approval-mozilla-aurora?
Hi Mike,
If we let this ride the train on 49/50 only and won't fix in 48 beta, will this a big impact for user given this issue has been there from 45?
(In reply to Gerry Chang [:gchang] from comment #16)
> Hi Mike,
> If we let this ride the train on 49/50 only and won't fix in 48 beta, will
> this a big impact for user given this issue has been there from 45?

No, I don't think so. If you want to hold this back from 48, I think that's fine - busted menu items suck, but the feature is pretty heavily buried, and (as you say), we've been shipping it this way since 45, for better or worse.
Comment on attachment 8767752 [details]
Bug 1241892 - Make Page Info work for sidebar browser.

Let's let it ride the train on 49/50 and get extra bake time.
Attachment #8767752 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Comment on attachment 8767753 [details]
Bug 1241892 - Make View Source work in the sidebar browser.

Per comment #18, let's let it ride the train on 49/50.
Attachment #8767753 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #8767752 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
I assume comment 19 meant to mark aurora instead of beta approval?
Flags: needinfo?(gchang)
Comment on attachment 8767753 [details]
Bug 1241892 - Make View Source work in the sidebar browser.

Mike, you are right, thanks for catching this.
Flags: needinfo?(gchang)
Attachment #8767753 - Flags: approval-mozilla-beta-
Attachment #8767753 - Flags: approval-mozilla-beta+
Attachment #8767753 - Flags: approval-mozilla-aurora?
Attachment #8767753 - Flags: approval-mozilla-aurora+
I have reproduced this bug with Firefox Nightly 46.0a1 (Build ID:20160122030244) on 
Windows 10, 64-bit.

Verified as fixed with Firefox Developer edition 49.0a2 (Build ID: 20160723004004)
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: