sailfishos / sailfish-browser

Sailfish Browser

Home Page:https://github.com/sailfishos/sailfish-browser/wiki/Sailfish-Browser-wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Small inconsistency in calling from Browser

atlochowski opened this issue · comments

I understand that when you tap and hold on phone numer on some website you can call only when SIM card is activated. b6acba0

But why not to block calling when you tap link like tel:+48798809709 when SIM card is not activated?

Short story:
Link handling and delegating external uri schemes to target application is done in the side engine. Hence, implementing this would be much more complex and there are higher priority items.

Longer story:
Should the engine load a uri gets triggered from nsDocShell [1]. I vaguely remember/recall that this test is done too late. For time being let's assume that we could block it and handle it in nsDocShell. That would imply that we'd need to implement nsIWebBrowserChrome3 for the WebBrowserChrome and do special handling for tel scheme in the shouldLoadURI and check modem / sim statuses. This would be simplest and cleanest solution that comes to my mind. Surely, that are and can be other approaches as well.

[1]
https://github.com/sailfishos-mirror/gecko-dev/blob/esr78/docshell/base/nsDocShell.cpp#L8557

[2]
https://github.com/sailfishos-mirror/gecko-dev/blob/esr78/toolkit/components/browser/nsIWebBrowserChrome3.idl