One of the primary reasons for the enormous complexity of the Gecko code base is that it aims to provide much more than just an HTML renderer. Mozilla's early goals were extremely ambitious—the original Mozilla application suite included a browser, a complete mail and newsgroup program, a web design tool, and an IRC client. In addition to rendering HTML, Gecko also provides a versatile XML-based user interface rendering framework called XUL that was used extensively in those applications. XUL is still used today to create the Firefox user interface, and it facilitates that browser's support for extensions, which are regarded by many enthusiasts as one of the most valuable features offered by Firefox.
Another reason for much of the complexity in Gecko is the use of XPCOM, a powerful component system. Although XPCOM brings a lot of really compelling capabilities to Gecko and made the entire engine highly modular,