Wasn't Mozilla the open source version of Netscape Communicator, rather than a rewrite?
Netscape had purchased another company called Digital Style. Their layout tech became Gecko but was called Raptor and NGLayout before being renamed to Gecko. Mariner / Netscape 5 was canceled and Mozilla migrated to Gecko, which was used in Netscape 6.
SpiderMonkey survived the transition from Mariner to Gecko and is used in Servo, too.
Mozilla browser was Netscape 6 with XUL 'hotness' and massive UI lag.
Firefox was stripped down and fast (though XUL is apparently still around).
Eventually a skunkwork project was started to drop all non-browser components and focus on user UI, and that became Firefox.
Mozilla was a refactored version of Netscape (to remove closed-source dependencies)