Yep. technically, Apple doesn't force Firefox to use WebKit. They could still use their Gecko WebRenderer and use Apple's JavaScriptCore to run page scripts. Same goes to Chrome: Blink + JSC instead of Blink + V8.
In practice in seems like both Chrome and Firefox have their renderers and JavaScript runtimes so tightly integrated that it's very hard to replace the later.