Remove gURLBar null-check from XULBrowserWindow.setOverLink

RESOLVED FIXED in Firefox 62

Status

()

enhancement
P5
normal
RESOLVED FIXED
11 months ago
10 months ago

People

(Reporter: dao, Assigned: lucas05, Mentored)

Tracking

({good-first-bug})

Trunk
Firefox 62
Points:
---

Firefox Tracking Flags

(firefox62 fixed)

Details

(Whiteboard: [lang=js])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

11 months ago
+++ This bug was initially created as a clone of Bug #1464384 +++

This goes back to when the address bar could be removed from the toolbar. The address bar cannot be removed anymore, so gURLBar is always non-null in browsers windows and this null-check is now pointless:

https://searchfox.org/mozilla-central/rev/bf4def01bf8f6ff0d18f02f2d7e9efc73e12c63f/browser/base/content/browser.js#4628

Updated

11 months ago
Priority: -- → P5
(Assignee)

Comment 1

11 months ago
Can I work on this? :)
(Reporter)

Comment 2

11 months ago
(In reply to lucas05 from comment #1)
> Can I work on this? :)

Sure!
Assignee: nobody → lucas05

Comment 3

11 months ago
Are you still working on this?
If need any help, write here or ask in IRC.

(In reply to lucas05 from comment #1)
> Can I work on this? :)
Flags: needinfo?(lucas05)
(Assignee)

Comment 4

10 months ago
(In reply to Manish Kumar [:manishkk] from comment #3)
> Are you still working on this?
> If need any help, write here or ask in IRC.
> 
> (In reply to lucas05 from comment #1)
> > Can I work on this? :)

Yes. I know is an easy one :) I had little time, sorry. Either today or tomorrow I'll patch it!
Flags: needinfo?(lucas05)
(Reporter)

Comment 6

10 months ago
Comment on attachment 8985800 [details] [diff] [review]
Bug 1464414 - Remove gURLBar null-check from XULBrowserWindow.setOverLink

>-      if (gURLBar && gURLBar._mayTrimURLs /* corresponds to browser.urlbar.trimURLs */)
>-        url = trimURL(url);
>+      url = trimURL(url);

We still need gURLBar._mayTrimURLs /* corresponds to browser.urlbar.trimURLs */. Only the "gURLBar &&" part can go.
Attachment #8985800 - Flags: review-
(Assignee)

Comment 7

10 months ago
Here it is! I've fixed the patch :)
(Reporter)

Comment 8

10 months ago
Comment on attachment 8986687 [details] [diff] [review]
"gURLBar &&" only removed from If statement

Looks good, thanks!
Attachment #8986687 - Flags: review+
(Reporter)

Updated

10 months ago
Attachment #8985800 - Attachment is obsolete: true

Comment 9

10 months ago
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b18075d2be2
Remove gURLBar null-check from XULBrowserWindow.setOverLink. r=dao

Comment 10

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4b18075d2be2
Status: NEW → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
You need to log in before you can comment on or make changes to this bug.