Closed Bug 1501234 Opened 6 years ago Closed 5 years ago

gAccessibilityServiceIndicator should use openTrustedLinkIn

Categories

(Firefox :: General, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: dao, Assigned: hereissophie, Mentored)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1500136 +++

gBrowser.selectedTab = gBrowser.addTab(...) is an antipattern as it doesn't set the owner tab for going back to the previous tab when closing the added one. openTrustedLinkIn takes care of this automatically.

This needs to be fixed here: https://searchfox.org/mozilla-central/rev/fcfb479e6ff63aea017d063faa17877ff750b4e5/browser/base/content/browser.js#7558

See bug 1500136 for another example.
I am new here . I want to work on this bug . Looking for mentorship to get started. Thank you.
(In reply to shanudjn from comment #1)
> I am new here . I want to work on this bug . Looking for mentorship to get
> started. Thank you.

Hi. Have you read https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Source_Code or a similar guide?
I am starting with the building of firefox from the above mentioned link. Before moving forward with the bug fixing I will let you know . Need some guidance for that as I am new here.
(In reply to shanudjn from comment #3)
> I am starting with the building of firefox from the above mentioned link.
> Before moving forward with the bug fixing I will let you know . Need some
> guidance for that as I am new here.

shanudjn are you still working on this bug? If not I'd like to take a crack at it. Thank you!
(In reply to hereissophie from comment #4)
> (In reply to shanudjn from comment #3)
> > I am starting with the building of firefox from the above mentioned link.
> > Before moving forward with the bug fixing I will let you know . Need some
> > guidance for that as I am new here.
> 
> shanudjn are you still working on this bug? If not I'd like to take a crack
> at it. Thank you!

Yes you can carry on with it! Since I am new here I am working on another bug (a much easier one,i think) to get started. Feel free to work on it.
(In reply to shanudjn from comment #5)
> (In reply to hereissophie from comment #4)
> > (In reply to shanudjn from comment #3)
> > > I am starting with the building of firefox from the above mentioned link.
> > > Before moving forward with the bug fixing I will let you know . Need some
> > > guidance for that as I am new here.
> > 
> > shanudjn are you still working on this bug? If not I'd like to take a crack
> > at it. Thank you!
> 
> Yes you can carry on with it! Since I am new here I am working on another
> bug (a much easier one,i think) to get started. Feel free to work on it.

Great! Thank you so much! And good luck with your other bug!
hereissophie, are you still interested in working on this?
Flags: needinfo?(hereissophie)
(In reply to Dão Gottwald [::dao] from comment #7)
> hereissophie, are you still interested in working on this?

Hi Dão, yes I'm still interested, I'm aiming to submit a patch by the end of the next week
Flags: needinfo?(hereissophie)
Hey Dão,

How could I verify that my fix is working? Thanks!
Flags: needinfo?(dao+bmo)
Attached patch bug1501234.patchSplinter Review
Please let me know if the patch is correct
(In reply to hereissophie from comment #9)
> Hey Dão,
> 
> How could I verify that my fix is working? Thanks!

1. open about:config and set accessibility.indicator.enabled to true
2. open the browser console and run this:
     gAccessibilityServiceIndicator._update(true)
3. click the blue icon that should show up in the top right (on Windows & Linux) or left (on Mac) corner of the browser window
Flags: needinfo?(dao+bmo)
Hey Dão,

After running the test I got "ReferenceError: gAccessibilityServiceIndicator is not defined"

However I followed the exact same pattern as the example bug and changed "gBrowser.selectedTab = gBrowser.addTab(a11yServicesSupportURL)" to "openTrustedLinkIn(a11yServicesSupportURL, "tab");". I couldn't figure out what's wrong, do you have any ideas?
Flags: needinfo?(dao+bmo)
(In reply to hereissophie from comment #12)
> Hey Dão,
> 
> After running the test I got "ReferenceError: gAccessibilityServiceIndicator
> is not defined"
> 
> However I followed the exact same pattern as the example bug and changed
> "gBrowser.selectedTab = gBrowser.addTab(a11yServicesSupportURL)" to
> "openTrustedLinkIn(a11yServicesSupportURL, "tab");". I couldn't figure out
> what's wrong, do you have any ideas?

Are you sure you ran this in the browser console? See https://developer.mozilla.org/en-US/docs/Tools/Browser_Console
Flags: needinfo?(dao+bmo)
Comment on attachment 9029491 [details] [diff] [review]
bug1501234.patch

I tested this and it works. Thanks!
Attachment #9029491 - Flags: review+
Assignee: nobody → hereissophie
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d18e3cc2eaeb
Use openTrustedLinkIn in gAccessibilityServiceIndicator. r=dao
Thank you!
https://hg.mozilla.org/mozilla-central/rev/d18e3cc2eaeb
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Reproducible steps are provided in comment 11
QA Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: