Firefox isn't written directly on top of the OS APIs. It's written on top of NSPR (Netscape Portable Runtime) on the bottom, with layers of more compat piled on top.
It's more accurate to say that Firefox 3.6 is written on top of the Mozilla 1.9.1 platform, which includes technologies such as NSPR or XPCOM for some low level system interaction. I don't think anything at the UI rendering level uses those technologies.
And NSPR is written in C as a thin layer over the OS APIs. Just because it's C doesn't magically imbue whatever uses it with super-awesome-native qualities.