Closed Bug 1553769 Opened 1 year ago Closed 1 year ago

Add some automated tests for bug 416771, and cleanup a bit the focus code.


(Firefox :: Tabbed Browser, task, P3)




Firefox 69
Tracking Status
firefox69 --- fixed


(Reporter: emilio, Assigned: emilio)




(3 files)

No description provided.
Type: defect → task
Priority: -- → P3

Only gtk returns failure ever, and nobody checks the result anyway.

Use an enum class so that it's clear from the caller what it means.

Right now there's some duplicated code with the focus manager and the
DOMWindowFocus event.

Android didn't handle the new framefocusrequested event, so the test-cases in
bug 416771 still didn't work there.

I think using the focus manager codepath everywhere is preferable. I confirmed
manually that the stuff that sent DOMWindowFocus events still works as expected
with this patch (i.e., switching to the right tab when you click on a
notification, etc.).

This fixes it so that it works in Fennec, and it sends the focus events right in
GeckoView Example (i.e., we get here1 properly).

The snippet that Snorp provided on IRC to implement the "bring activity to
front" stuff (startActivity(getIntent())) didn't actually work for me, but I
confirmed that the right message is sent when the focus is requested, and that
we get there.

Depends on D32353

Keywords: leave-open
Pushed by
Add a test for switching a tab via window.focus() on a related tab. r=dao
Pushed by
Make nsIWidget::SetFocus infallible, and make it take an enum class. r=NeilDeakin

I'm pretty sure I had fixed that locally...

Flags: needinfo?(emilio)
Pushed by
Make nsIWidget::SetFocus infallible, and make it take an enum class. r=NeilDeakin
Pushed by
Have a single way of requesting window focus and switching to a tab. r=NeilDeakin,snorp

I suppose we're done here?

Closed: 1 year ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
You need to log in before you can comment on or make changes to this bug.