I’m inclined to say we should remove it for the file:// as well, given comments like https://bugzilla.mozilla.org/show_bug.cgi?id=1442006#c7 and the fact that it will continue to get more broken over time (for example, as we remove XBL bindings). It’s not nearly as convenient, but test cases can still be created by registering the xul file as a chrome uri and loading it in a tab.
Brian
Also, many of these users might be on institutional ESR deployments with telemetry off. So even if we had probes, they might not send data to us.
We could reach out to the enterprise list, though.
Axel
This is referring to my proposed XPConnect/Components changes, right?
External. We have no internal consumers of remote XUL outside our test
suite, and obviously I would fix the tests as needed (there's not much
needed).
> - do we have an estimate of how much remote XUL is used in our own test
> suite?
https://searchfox.org/mozilla-central/search?q=.xul&case=false®exp=false&path=mochitest.ini
shows 8 mochitests using it.
https://searchfox.org/mozilla-central/search?q=.xul&path=reftest.list
shows 280-ish reftests using it, mostly testing actual XUL layout
functionality.
https://searchfox.org/mozilla-central/search?q=.xul&case=false®exp=false&path=crashtests.list
shows ~170 crashtests that are XUL files.
https://searchfox.org/mozilla-central/search?q=%3Cbindings&path=test
shows ~220 XBL files used in tests, though some of those overlap with
one of the earlier lists (e.g. XBL being pulled in by a .xul test).
Presumably we need to address these anyway for XBL removal.
There might be some other bits I'm missing (e.g. browser tests loading
XUL files in tabs or something), but the above seems like a bare minimum
estimate for the usage.
> Is this days/weeks/months of labour to replace?
Definitely not days. Probably doable in "weeks", though a lot of that
depends on what we replace with. Presumably chrome tests loaded with
system principal to replace the mochitests (including the ones using
XBL); that one is not hard to do, but will need auditing the tests to
make sure they still make sense in the aftermath. For the reftests and
crashtests, we need to figure out the right replacement.
> - do we have any idea of the popularity of
> `dom.allow_XUL_XBL_for_file`? Do we expect this usage is all internal?
> (I really hope so!)
I don't, and I really hope so too....
> Sorry to ask for work (before you do the real work),
Nah, all your questions are totally reasonable. ;)
On 3/27/18 11:50 AM, Eric Shepherd (Sheppy) wrote:The one potential exception: would it make sense to allow it to be enabled (with it disabled by default) on copies of Firefox set up with Policy Engine, to allow those users the option?
That would require maintaining the remote XUL infrastructure we have now, so doesn't seem like a win from the point of view of code or invariant simplification...
It's a question of what guarantees we offer for XUL working.
Keeping it for file:// requires keeping some of the infrastructure for
parsing XUL and maybe loading XBL if the pref is flipped.
It does not require us to provide access to Components.interfaces or
allow exposure of XPCOM things in those file:// URLs, as long as we're
OK with "not all XUL" working in the file:// context. Which we are.
Supporting remote XUL in general, on the other hand, involves not
breaking compat with already-deployed stuff which may be relying on the
XPCOM object exposure.
So we could have meaningful code removal and invariant strengthening
even while keeping the file:// case. Certainly until we sort out our
test suites there's no _extra_ win from removing the file:// case in
terms of code removal (though again invariants can maybe be somewhat
stronger if we do remove it).
> Also, do we load pages in the content process in both cases?
I believe we do, but I have not verified.
> I’m inclined to say we should remove it for the file:// as well
OK. Just to be clear, if we expect layout hackers to debug XUL issues,
the file:// case is really useful for that, because it allows using the
layout debugger. I we promise to not make them do that, we can probably
remove the file:// case.
> It’s not nearly as convenient, but test cases can still be created by registering the xul file as a chrome uri and loading it in a tab.
Can't do that in the layout debugger, yes?
So presumably targeting 60? The timing is a bit tight...
Note that as things stand the only way to enable remote XUL for a
hostname is by adding permission manager entries. This needs to either
be done by a non-webextension extension, or by running code in a
privileged context (e.g. browser console) or by directly munging the
sqlite database involved. This last is what we do in our automation.
> with a notice to users of ESR that that will be the last ESR
> release to support remote XUL.
We can do that anyway, for 60, without changing how it's enabled, right?
> On Mar 27, 2018, at 9:57 AM, Boris Zbarsky <bzba...@mit.edu> wrote:
>
> On 3/27/18 11:50 AM, Nicholas Alexander wrote:
>
>> - do we have any idea of the popularity of `dom.allow_XUL_XBL_for_file`? Do we expect this usage is all internal? (I really hope so!)
>
> I don't, and I really hope so too....
This isn't totally representative, but based on github code search:
“dom.allow_XUL_XBL_for_file” - 330 code results - https://github.com/search?utf8=%E2%9C%93&q=dom.allow_XUL_XBL_for_file&type=Code
And lot of those are duplicates that look like they come from files in mozilla-central:
"dom.allow_XUL_XBL_for_file filename:nsContentUtils.cpp” - 194 code results -https://github.com/search?utf8=%E2%9C%93&q=dom.allow_XUL_XBL_for_file+filename%3AnsContentUtils.cpp&type=Code
“dom.allow_XUL_XBL_for_file filename:reftest-preferences.js” - 89 code results - https://github.com/search?utf8=%E2%9C%93&q=dom.allow_XUL_XBL_for_file+filename%3Areftest-preferences.js&type=Code
“dom.allow_XUL_XBL_for_file filename:ContentPrefs.cpp” - 23 code results - https://github.com/search?utf8=%E2%9C%93&q=dom.allow_XUL_XBL_for_file+filename%3AContentPrefs.cpp&type=Code
If you ignore those that would leave only 24 remaining. I can’t figure out how to group by filename or filter on ‘not in these filenames’ in github search so it’s hard to see exactly what’s left.
On 3/27/18 1:02 PM, Eric Shepherd wrote:
Yes, that's true. My thinking is that a first step could be to change it so it had to be enabled using Policy Engine, and have an ESR release with that
So presumably targeting 60? The timing is a bit tight...
Note that as things stand the only way to enable remote XUL for a hostname is by adding permission manager entries. This needs to either be done by a non-webextension extension, or by running code in a privileged context (e.g. browser console) or by directly munging the sqlite database involved. This last is what we do in our automation.
with a notice to users of ESR that that will be the last ESR release to support remote XUL.
We can do that anyway, for 60, without changing how it's enabled, right?
OK given all that, I agree with your initial post that we should think about domains and local files/automation separately, since turning it off for domains would be more beneficial and also less work. I’d still like to track what needs to be done to disable it entirely - so far it sounds like migrating existing tests and supporting local development use cases like the layout debugger.
Brian
_______________________________________________
firefox-dev mailing list
firef...@mozilla.org
https://mail.mozilla.org/listinfo/firefox-dev
Do we have a good handle on what things remote XUL allowed that still can't
readily be accomplished using open APIs, HTML, and CSS? We should be sure
we know what remains to be done in order to make a complete transition away
from XUL possible for anyone still relying on it. I don't know what the
prioritization is for actually implementing those features, but knowing
what they are would be a necessary first step.