Closed Bug 1910849 Opened 6 months ago Closed 24 days ago

nsIWindowWatcher::OpenWindowWithRemoteTab doesn't work on GeckoView

Categories

(GeckoView :: General, defect, P2)

All
Android
defect

Tracking

(firefox136 fixed)

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

(Whiteboard: [gv-perspective-work])

Attachments

(1 file)

Some mochitests seems to set browser.link.open_newwindow=2 (nsIBrowserDOMWindow.OPEN_NEWWINDOW) such as test_notification_serviceworker_openWindow.html.

When setting it, window.open etc might call nsIWindowWatcher::OpenWindowWithRemoteTab to create new Chrome window. But since it doesn't use GeckoView's delegation (GeckoView:OnNewSession etc), window creation will be failed.

Current GeckoView architecture is that new tab is same as new window and we don't consider that anyone modifies browser.link.open_newwindow.

So, I think we have to handle which the following.

  • nsWindowWatcher::GetWindowOpenLocation shouldn't return nsIBrowserDOMWindow.OPEN_NEWWINDOW on GeckoView even if browser.link.open_newwindow=2.
    Or
  • Implement GeckoView version of nsIWindowWatcher::OpenWindowWithRemoteTab (or nsWindowWatcher::CreateChromeWindow).
Blocks: 1620052
Summary: nsIWindowWatcher::OpenWindowWithRemoteTab doesn't wor on GeckoView → nsIWindowWatcher::OpenWindowWithRemoteTab doesn't work on GeckoView

The severity field is not set for this bug.
:owlish, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bugzeeeeee)
Severity: -- → S3
Flags: needinfo?(bugzeeeeee)
Priority: -- → P2
Whiteboard: [gv-perspective-work]

Hey Makoto, is this something you are planning to work on?

Flags: needinfo?(m_kato)

Short term is No, but we have to consider something way such as ignoring browser.link.open_newwindow preference.

Flags: needinfo?(m_kato)
See Also: → 1920505

I have landed bug 1825910, so I should fix this to turn on mochitest.

Assignee: nobody → m_kato

Chrome window has one browser element only in GeckoView. So even if
browser (Fenix etc) shows tabs, it is window.

When creating chrome window, we have to call Java code via
nsIBrowserDOMWindow.createContentWindow or
nsIBrowserDOMWindow.createContentWindowInFrame. So if we open
geckoview.xhtml directly, geckoview.xhtml throws an exception due to
missing initializing parameters.

Although test_notification_serviceworker_openWindow.html modifies
browser.link.open_newwindow preference, some values won't work since
OpenWindowWithRemoteTab is used to create browser and window.

OpenWindowWithRemoteTab opens geckoview.xhtml directly, so it doesn't
work on GeckoView.

I would like to avoid this call and OpenWindowWithRemoteTab should
return an error in GeckoView immediately.

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/bab37caaf04f Don't use nsIWindowWatcher::OpenWindowWithRemoteTab on GeckoView. r=dom-core,farre

Backed out for causing reftest crashes @ nsWindowWatcher::OpenWindowWithRemoteTab

REFTEST PROCESS-CRASH | MOZ_RELEASE_ASSERT(false) (GeckoView should use nsIBrowserDOMWindow instead) [@ nsWindowWatcher::OpenWindowWithRemoteTab] | layout/svg/crashtests/696326-1.svg
Flags: needinfo?(m_kato)

I make sense this crash since I have added this by farre suggestion. But, hmm I cannot reproduce this...

Ah, this occurs without fission, I see.

Flags: needinfo?(m_kato)
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/cf808a1cffef Don't use nsIWindowWatcher::OpenWindowWithRemoteTab on GeckoView. r=dom-core,farre
Status: NEW → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
Regressions: 1941334
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: