Consider adding code for checking mozilla signing key for context-fill svg
Categories
(Core :: SVG, enhancement, P3)
Tracking
()
People
(Reporter: jkt, Assigned: rpl)
References
Details
Attachments
(1 file)
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
| Reporter | ||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Updated•8 years ago
|
Comment 6•8 years ago
|
||
Comment 8•8 years ago
|
||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
Comment 13•8 years ago
|
||
Comment 14•8 years ago
|
||
| Reporter | ||
Comment 15•8 years ago
|
||
Comment 16•8 years ago
|
||
Comment 17•8 years ago
|
||
Comment 18•8 years ago
|
||
| Reporter | ||
Comment 19•8 years ago
|
||
Comment 20•8 years ago
|
||
Comment 22•7 years ago
|
||
Comment 23•7 years ago
|
||
| Assignee | ||
Comment 24•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 25•5 years ago
|
||
I've added as a see also Bug 1710781 and mozilla/multi-account-containers#2046, in both cases it seems we are tempted to add more checks based on the addon ids to allow use of the SVG context-fill on their extension icon.
The patch I just attached (D114957) adds a check for privileged extensions instead, hoping we can avoid to keep adding more addon is based special cases, but it doesn't remove yet the existing checks for @mozilla.com / @mozilla.org addon id suffixes, because it may be more reasonable to remove them as a follow up after double-checking that the line extension that were leveraging those checks have been signed to be able to use the IsPrivileged().
Updated•5 years ago
|
Updated•5 years ago
|
Comment 26•5 years ago
|
||
Comment 27•5 years ago
|
||
Backed out changeset c9197b3a4ba0 (Bug 1394579) for causing failures in test_ext_svg_context_fill.js CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=339720988&repo=autoland&lineNumber=4124
Backout: https://hg.mozilla.org/integration/autoland/rev/01f5d81f0afe7c1958a225d981bac39f52ae93fe
| Assignee | ||
Comment 28•5 years ago
|
||
It looks that the failure linked in comment 27 is android only.
I can definitely reproduce the same failure locally (confirmed by doing an android x86 full build and running the xpcshell test into the x86 emulator), from a quick look it seems that on an Android build nsSVGStyle::ExposesContextProperties is always returning false and aSVGContext::GetContextPaint returning null are and we never get to call to SVGContextPaint::IsAllowedForImageFromURI that the xpcshell test is meant to cover.
Personally I think that it would be ok to skip the xpcshell test on Android builds for now, but I'd like to put an inline comment nearby the skipif to briefly explain why we are skipping it on Android, and possibly mention a follow up issue filed upfront to investigate it further.
I'm happy to file the new followup issue and update the patch to skip the xpcshell test on Android, but I'd like to hear :dholbert perspective first, so that we can also include some more context about the reasons behind the different behavior on Android and what the followup is meant to do about it.
:dholbert wdyt? do you have some more details about the reasons for the different behavior I'm observing on Android?
As an additional side notes:
-
I did notice that if I flip the pref
svg.context-properties.content.enabledto true,nsSVGStyle::ExposesContextPropertiesdoes then return true andaSVGContext::GetContextPaintdoes return a SVGEmbeddingContextPaint pointer (the test does still fail as expected, because the pref does allow the context fill on any image url and so the test cases withexpectAllowed: falsedo fail as expected), and but I can't yet see what is preventing the context properties to be exposed whensvg.context-properties.content.enabledis set to false. -
One difference in the Android build that may be related to the different behavior observed is that on Android the Extension pages runs in the main process instead of running in a child webextensions process as they do by default in desktop builds.
Comment 29•5 years ago
•
|
||
That's odd, but not entirely surprising. I don't think this is intended to not work on Android; but I also don't think we use this on Android at all, since the use-case is for Gecko-rendered frontend content, and IIRC we don't really have any of that on Android.
So, yeah - seems fine to land this with the test annotated as skipped on Android, but I do think it'd be worth having a followup bug filed to track that (referenced alongside the skip annotation).
| Assignee | ||
Comment 30•5 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #29)
That's odd, but not entirely surprising. I don't think this is intended to not work on Android; but I also don't think we use this on Android at all, since the use-case is for Gecko-rendered frontend content, and IIRC we don't really have any of that on Android.
So, yeah - seems fine to land this with the test annotated as skipped on Android, but I do think it'd be worth having a followup bug filed to track that (referenced alongside the skip annotation).
I totally agree, I just filed Bug 1711502 to track the follow up (let me know if the issue as described is clear enough to be actionable, so that it can actually be more easily picked up when we will need it or have time to investigate it).
I'll update the patch to skip the new test file on Android, reference Bug 1711502 on the skip-if config line and push the patch to autoland again.
Comment 31•5 years ago
|
||
Thanks! The followup looks like it's got enough information/links (given the limited amount that we know now, at least).
| Assignee | ||
Comment 32•5 years ago
|
||
I pushed the patch to autoland but unfortunately it was conflicting with a patch that was not on central yet but was already on autoland and it did never get pushed to autoland (the conflicting patch was the one landed from Bug 1674383, which was unfortunately also adding a test into the same xpcshell.ini file and exactly in the context of the diff part of this patch).
From a quick look to the oranges tracked on Bug 1674383's autoland patch, it looks that it should be able to reach mozilla-central pretty soon, I'll wait a bit to see if I can just rebase the patch attached to this issue on top of mozilla-central and then push it to autoland again (otherwise, as a last resort, I may rebase this patch on top of autoland instead).
Comment 33•5 years ago
|
||
Comment 34•5 years ago
|
||
Backed out for failures on test_ext_svg_context_fill.js
backout: https://hg.mozilla.org/integration/autoland/rev/a9ff48afca5016daeccbbb84fed08352477dd3f9
failure log: https://treeherder.mozilla.org/logviewer?job_id=340025114&repo=autoland&lineNumber=2662
[task 2021-05-18T13:20:13.415Z] 13:20:13 INFO - TEST-START | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_svg_context_fill.js
[task 2021-05-18T13:20:19.660Z] 13:20:19 WARNING - TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_svg_context_fill.js | xpcshell return code: 0
[task 2021-05-18T13:20:19.661Z] 13:20:19 INFO - TEST-INFO took 6243ms
[task 2021-05-18T13:20:19.661Z] 13:20:19 INFO - >>>>>>>
[task 2021-05-18T13:20:19.662Z] 13:20:19 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2021-05-18T13:20:19.663Z] 13:20:19 INFO - (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2021-05-18T13:20:19.664Z] 13:20:19 INFO - (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2021-05-18T13:20:19.665Z] 13:20:19 INFO - running event loop
[task 2021-05-18T13:20:19.665Z] 13:20:19 INFO - xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_svg_context_fill.js | Starting check_remote
[task 2021-05-18T13:20:19.666Z] 13:20:19 INFO - (xpcshell/head.js) | test check_remote pending (2)
| Assignee | ||
Comment 35•5 years ago
|
||
I looked a bit into this and I think that in the end the failure is just being triggered by the fact that Bug 1708384 landed on mozilla-central in the meantime (in particular this patch).
That patch wasn't landed yet on central when I branched out the hg bookmark that I was working on while preparing the patch attached to this issue, and so I think that the test case was passing as expected without Bug 1708384, but it is not expected to be able to run successfully on top of the changes from Bug 1708384 (because the new test case is loading the svg image into an extension page which is technically a content page, and that seems to be the new expected behavior if I'm reading Bug 1708384 patches correctly).
I think that the right choice is to rework the test to don't use a content page for testing the expected behaviors, I'm going to look into that.
After I have got the new version of the test, I may also try to run the new version of the test on Android, if it turns out the issue on Android was actually the same we may close Bug 1711502 and let the run the test on Android build too.
Comment 36•5 years ago
|
||
That sounds like a likely explanation. Thanks for the follow-up investigation!
Comment 37•4 years ago
|
||
Comment 38•4 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
Description
•