A lot of Firefox's loss of traction seems to be related to 1) development tools not reaching people's expectations, 2) Gecko cannot keep up with WebKit's speed of development, 3) general perceived performance and ui issues in Firefox.
Mozilla doesn't have unlimited resources, and from an external observer, it seems that new projects, such as B2G/FFOS, and other products/services would benefit from a little bit more attention.
What seems to happen right now, is that a great deal of resources inside Mozilla are dedicated to create duplicate, parallel work to what's being done out there. I'm referring to 1) and 2), the platform on which Firefox and many other products depend on.
A Gecko brain transplant would be hard though.