If the world actually worked this way, where you couldn't name anything due to possible copyright or trademark violations if someone else already used it, then our world would be filled with things called "xXxSuperslayerzxXx" or "A book that you physically must read to discover that the main character does not get eaten by a dinosaur but does die in a firey wreck after pairing off with the female lead," because every simple word and combinations of words would have been used up already.
In this case, no violation has occured. Trademark laws arethere to protect consumers and manufacturers from scam artists, who will likely produce shoddy goods and steal money from the manufacturers by tricking customers into using the shoddy items. So, if I try to make an insurance company called "Allstate Insurance", the real one is going to try to sue the pants off of me. Even if I seperate it into "All State Insurance", due to the similarity of names and possible confusion of customers. If I write a sci-fi book called "Allstate Insurance", then the trademarking is unlikely to be an issue since consumers can clearly differentiate between an automotive insurance company and a sci-fi book (we hope).
Copyright laws are a different issue, as they protect unique ideas and concepts. Long story short, I can write a book titled "Harry Potter". So long as the book doesn't deal with magic, a wizard school, and/or the title character being associated with either in some manner or implied to be the real one as thought up by J. K. Rowling, there's little that can be legally done against me. Granted, it'd be a dike move for the fans, almost impossible for me to find a publisher, and likely end up in several lawsuits by either Rowling herself, her publisher, or Warner Bros. as a punitive measure (making me spend time and money defending myself, even if I'm almost guaranteed to win the case), and is therefore more trouble than it's worth.
Now, the same would be true if I created a web browser called "Harry Potter". However, if I used the Harry Potter's likeness as a mascot for "Harry Potter" the web browser, then I'd be in actual legal hot water since I am now violating copyright laws.
To come back to the point of this thread, Mozilla is not really in violation of any sort of copyright or trademark law. Firefox the Books and Movie is not a service (and therefore does not technically fall under the purview of trademark laws), and Firefox the Web Browser is clearly not using anything from the books aside from the name "Firefox", nor did Mozilla appear to intentionally name it Firefox in order to gain any traffic from the book or movie's popularity (as it's not using anything but the name, and was called "Phoenix" while under development), so any copyright claims are incredibly tenuous.