Gecko (software) explained

Gecko
Developer:Mozilla Foundation, Mozilla Corporation, Adobe Systems, and other contributors
Programming Language:C++, JavaScript, Rust
Genre:Browser engine
License:MPL 2.0[1] [2]
Latest Release Version:125

Gecko (stylized as ɢecko) is a browser engine developed by Mozilla. It is used in the Firefox browser, the Thunderbird email client, and many other projects.

Gecko is designed to support open Internet standards, and is used by different applications to display web pages and, in some cases, an application's user interface itself (by rendering XUL). Gecko offers a rich programming API that makes it suitable for a wide variety of roles in Internet-enabled applications, such as web browsers, content presentation, and client/server.[3]

Gecko is written in C++ and JavaScript,[4] [5] and, since 2016, additionally in Rust.[6] [7] It is free and open-source software subject to the terms of the Mozilla Public License version 2.[8] Mozilla officially supports its use on Android,[4] Linux, macOS, and Windows.[9]

History

Development of the layout engine now known as Gecko began at Netscape in 1997, following the company's purchase of DigitalStyle. The existing Netscape rendering engine, originally written for Netscape Navigator 1.0 and upgraded through the years, was slow, did not comply well with W3C standards, had limited support for dynamic HTML and lacked features such as incremental reflow (when the layout engine rearranges elements on the screen as new data is downloaded and added to the page). The new layout engine was developed in parallel with the old, with the intention being to integrate it into Netscape Communicator when it was mature and stable. At least one more major revision of Netscape was expected to be released with the old layout engine before the switch.

After the launch of the Mozilla project in early 1998, the new layout engine code was released under an open-source license. Originally unveiled as Raptor, the name had to be changed to NGLayout (next generation layout) due to trademark problems. Netscape later rebranded NGLayout as Gecko. While Mozilla Organization (the forerunner of the Mozilla Foundation) initially continued to use the NGLayout name (Gecko was a Netscape trademark),[10] eventually the Gecko branding won out.

In October 1998, Netscape announced that its next browser would use Gecko (which was still called NGLayout at the time) rather than the old layout engine, requiring large parts of the application to be rewritten. While this decision was popular with web standards advocates, it was largely unpopular with Netscape developers, who were unhappy with the six months given for the rewrite. It also meant that most of the work done for Netscape Communicator 5.0 (including development on the Mariner improvements to the old layout engine) had to be abandoned. Netscape 6, the first Netscape release to incorporate Gecko, was released in November 2000 (the name Netscape 5 was never used).

As Gecko development continued, other applications and embedders began to make use of it. America Online, by this time Netscape's parent company, eventually adopted it for use in CompuServe 7.0 and AOL for Mac OS X (these products had previously embedded Internet Explorer). However, with the exception of a few betas, Gecko was never used in the main Microsoft Windows AOL client.

On July 15, 2003, AOL laid off the remaining Gecko developers and the Mozilla Foundation (formed on the same day) became the main steward of Gecko development. Today, Gecko is developed by employees of the Mozilla Corporation, employees of companies that contribute to the Mozilla project, and volunteers.

In the Netscape era, a combination of poor technical and management decisions resulted in Gecko software bloat.[11] [12] Thus in 2001 Apple chose to fork KHTML, not Gecko, to create the WebKit engine for its Safari browser.[13] [12] However, by 2008 Mozilla had addressed some of the bloat problems, resulting in significant performance improvements for Gecko.[14]

In October 2016, Mozilla announced Quantum, an ongoing project encompassing several software development efforts to "build the next-generation web engine for Firefox users". It included numerous improvements to Gecko, taken from the experimental Servo project.[15] [16] Firefox 57, also known as "Firefox Quantum", first shipping in November 2017, is the initial version with major components from the Quantum/Servo projects enabled. These include increased performance in the CSS and GPU rendering components. Additional components will be merged from Servo to Gecko incrementally in future versions.

In September 2018, Mozilla announced GeckoView, the foundation of Mozilla's next generation of mobile products based on a software library that makes Gecko reusable for Android, encompassing newer software development efforts to "decouple the engine itself from its user interface, and made it easy to embed in other applications". Firefox Focus 7.0, shipped in the same month,[17] is the initial version introduced GeckoView, with increased performance in median page loading.[18] [19] Firefox Reality was also built with GeckoView. In June 2019, Mozilla announced Firefox Preview as an ongoing project that focuses on building an Android web browser with GeckoView.[20] Firefox for Android 79, also known as "Firefox Daylight", first shipping in August 2020, is the first stable release of that with major components powered by GeckoView engine.[21]

Standards support

From the outset, Gecko was designed to support open Internet standards. Some of the standards Gecko supports include:

Gecko also supports SVG.[23]

Legacy IE non-standard support

In order to support web pages designed for legacy versions of Netscape and Internet Explorer, Gecko supports DOCTYPE switching. Documents with a modern DOCTYPE are rendered in standards compliance mode, which follows the W3C standards strictly. Documents that have no DOCTYPE or an older DOCTYPE are rendered in quirks mode, which emulates some of the non-standard oddities of Netscape Communicator 4.x; however, some of the 4.x features (such as layers) are not supported.

Gecko also has limited support for some non-standard Internet Explorer features, such as the marquee element and the document.all property (though pages explicitly testing for document.all will be told it is not supported).[24]

Usage

Gecko is primarily used in web browsers, the earliest being Netscape 6 and Mozilla Suite (later renamed SeaMonkey). It is also used in other Mozilla web browser derivatives such as Firefox and Firefox for mobile and the implementation of the Internet Explorer-clone that is part of Wine.[25] Mozilla also uses it in their Thunderbird email-client.

Other web browsers using Gecko include GNU IceCat,[26] Waterfox, K-Meleon, Lunascape, Portable Firefox, Conkeror, Classilla, TenFourFox.

Gecko is also used by Sugar for the OLPC XO-1 computer,[27] and is used as a complete implementation of the XUL (XML User Interface Language). Gecko currently defines the XUL specification. Gecko is also used by the KaiOS mobile operating system, which is based on the discontinued Firefox OS.[28]

Past users

Products that formerly used Gecko include Pale Moon (now using Goanna), Epiphany (now known as GNOME Web and using WebKitGTK), and GNOME DevHelp (now using WebKitGTK).

Discontinued products that used Gecko include Swiftfox, Flock, Galeon, Camino, Minimo, Beonex Communicator, Kazehakase, Songbird, Sunbird (calendar), MicroB, Nightingale, Instantbird, and Picasa for Linux.[29]

Proprietary dependency

On Windows and other platforms, Gecko depends on proprietary compilers.[30]

After Gecko 2.0, the version number was bumped to 5.0 to match Firefox 5, and from then on has been kept in sync with the major version number for both Firefox and Thunderbird,[31] to reflect the fact that it is no longer a separate component.[32]

Quantum

Quantum is a Mozilla project encompassing several software development efforts to "build the next-generation web engine for Firefox users". It includes numerous improvements to Gecko, largely incorporated from the experimental Servo project. Quantum also includes refinements to the user interface and interactions.[15] [16]

Firefox 57, released in November 2017, is the initial version with a Servo component enabled. Mozilla dubs this and several planned future releases "Firefox Quantum".[33] [34]

Background

In 2012, Mozilla began the experimental Servo project, which is an engine designed from scratch with the goals of improving concurrency and parallelism while also reducing memory safety vulnerabilities. Servo is written in the Rust programming language, also created by Mozilla, which is designed to generate compiled code with better memory safety, concurrency, and parallelism than compiled C++ code.[5]

As of April 2016, Servo needed at least several years of development to become a full-featured browser engine,[35] hence the decision to start the Quantum project to bring stable portions of Servo into Firefox. Mozilla laid off all Servo developers in August 2020.[36]

Components

The Quantum project is composed of several sub-projects.[15]

Azure

The Mozilla Azure project is a stateless low-level graphics abstraction API used in Firefox.[49] The project has several objectives including more accurate Direct2D compatibility, optimized state interoperability, and improved control over performance characteristics and bugs. Azure will provide 2D hardware acceleration on top of 3D graphics backends. Firefox began using Azure instead of Cairo in 2012.[50] [51] It is written in C++ and used by Servo.[52] The Azure name is an ode to the early Netscape founder James H. Clark and his earlier work at Silicon Graphics where workstations were often named after colors.[53]

External links

Notes and References

  1. Web site: Mozilla Foundation End-User Licensing Agreements. Mozilla.
  2. Web site: Mozilla Licensing Policies . mozilla.org . 2013-03-26.
  3. Web site: Embedding Mozilla . Mozilla.org . 2012-10-25 . 2012-10-31 .
  4. Web site: Simple Firefox for Android build . Gecko is implemented using C++ and JavaScript. . 2017-05-03 . 2019-09-29 . https://web.archive.org/web/20190929165146/https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build . dead .
  5. Bergstrom. etal. Lars. Engineering the Servo Web Browser Engine using Rust. Proceedings of the International Conference on Software Engineering. May 2016. https://web.archive.org/web/20160529014010/https://raw.githubusercontent.com/larsbergstrom/papers/master/icse16-servo-preprint.pdf . 2016-05-29 . live.
  6. Web site: Google Groups. groups.google.com.
  7. Web site: Mozilla binds Firefox's fate to the Rust language. Serdar. Yegulalp. February 3, 2017. InfoWorld.
  8. Web site: MPL 2 Upgrade . 2012-08-18 .
  9. Web site: Gecko FAQ. MDN Web Docs. 2017-05-03. 2019-10-08. https://web.archive.org/web/20191008071852/https://developer.mozilla.org/en-US/docs/Gecko/FAQ. dead.
  10. Web site: nglayout project: identity crisis . Mozilla.org . 2012-10-31 . dead . https://web.archive.org/web/20110629154746/http://www.mozilla.org/newlayout/gecko.html . 2011-06-29 .
  11. Web site: Ars Technica sits down with Scott Collins from Mozilla.org . Jorge O. Castro . Ars Technica . 2004-06-15 . 2017-02-16.
  12. Web site: Thursday 2003-01-09 . https://web.archive.org/web/20090728082253/http://dbaron.org/log/2003-01 . David Baron's weblog . David Baron . self-published . 2003-01-09 . 2009-07-28 . 2017-02-16 . dead .
  13. Web site: Apple snub stings Mozilla . https://web.archive.org/web/20121025015655/http://news.cnet.com/2100-1023-980492.html . Paul Festa . . 2003-01-14 . 2012-10-25 . 2017-02-16 . Paul Festa . dead .
  14. Web site: Why Mozilla is committed to Gecko as WebKit popularity grows . Ryan Paul . 2008-09-09 . 2017-02-16.
  15. Web site: Quantum. Mozilla Wiki. 2017-04-20.
  16. News: Mozilla Announces Quantum, a New Browser Engine for Firefox. Cimpanu. Catalin. softpedia. 2016-11-07.
  17. Web site: Firefox Focus 7.0 enters beta, Switches to GeckoView (Gecko Engine). 14 September 2018. 19 September 2019. 31 July 2020. https://web.archive.org/web/20200731225124/https://techdows.com/2018/09/firefox-focus-7-0-to-use-geckoview-gecko-engine.html. dead.
  18. Web site: Firefox Focus with GeckoView. September 13, 2018. Mozilla Hacks. September 4, 2019.
  19. Web site: What's new in Firefox Focus for Android (version 7) Firefox Focus Help. support.mozilla.org. en-US. September 4, 2019.
  20. Web site: GeckoView in 2019. June 27, 2019. Mozilla Hacks. September 4, 2019.
  21. Web site: August 25, 2020. Fast, personalized and private by design on all platforms: introducing a new Firefox for Android experience. Vesta Zare. September 22, 2020. Mozilla Blog. en-US.
  22. Web site: Cross Browser Compatibility of ECMAScript 2015 (ES6) in Firefox 102 . 2022-08-21 . www.lambdatest.com . en-US.
  23. Web site: Cross Browser Compatibility of SVG (basic support) in Firefox 102 . 2022-08-21 . www.lambdatest.com . en-US.
  24. Web site: Mozilla Adds Undetectable document.all Support, Part of New Novell Linux Distribution?. Developer.mozilla.org . 2004-07-23 . 2018-02-07.
  25. Web site: IE Uses Gecko Under Wine . Wine Wiki . 2009-09-14 .
  26. Web site: Gecko. sdubois. 24 June 2010. Free Software Foundation. 23 May 2019.
  27. News: One Laptop Per Child readies 'Sugar' interface . Martens . China . IDG News Service . 2007-01-03 . 2007-12-28 . dead . https://web.archive.org/web/20080118115757/http://www.infoworld.com/article/07/01/03/Hnsugarinterface_1.html . 2008-01-18 .
  28. Web site: KaiOS Technologies partners with Mozilla to improve Gecko . Hill . Paul . Neowin . 2020-03-12 . 2024-07-12.
  29. Web site: Picasa 3.0 for Linux . 2008-12-28 . dead . https://web.archive.org/web/20090107022711/http://picasa.google.com./linux/download.html . 2009-01-07 .
  30. Web site: Building Firefox for Windows. MDN Web Docs.
  31. Web site: Gecko versions and application versions . . 2013-11-18 . 2020-10-31 . https://web.archive.org/web/20201031145622/https://developer.mozilla.org/en-US/docs/Mozilla/Gecko/Versions . dead .
  32. Web site: Not much in new Thunderbird 5, but roadmap looks promising . . 30 June 2011 . 2018-02-07 .
  33. Web site: Firefox 57.0, See All New Features, Updates and Fixes. Mozilla. 2018-10-30.
  34. Web site: Introducing the New Firefox: Firefox Quantum – The Mozilla Blog. The Mozilla Blog. 2018-10-30.
  35. Web site: Servo remaining work. GitHub . 2017-02-17.
  36. Web site: Mozilla lays off 250 employees while it refocuses on commercial products . 2022-06-14 . ZDNet . en.
  37. Web site: The Changelog. The Changelog. 18 November 2016 . 2017-03-28.
  38. Web site: Bay Area Rust Meetup February 2016. Air Mozilla. 2017-03-28.
  39. Web site: Webrender Where. Mozilla Wiki. 2020-07-14.
  40. Web site: Firefox faster and more stable with the first big bytes of Project Quantum, simpler with compact themes and permissions redesign. Mozilla Blog. 2017-04-27.
  41. Web site: Servo Architecture. https://ghostarchive.org/varchive/youtube/20211211/an5abNFba4Q. 2021-12-11 . live. YouTube. 18 January 2017 . 2017-03-28.
  42. Web site: Mozilla's Quantum Project. Bill McCloskey's Blog. 2017-03-28. 2016-10-27.
  43. Web site: Entering the Quantum Era. 2017-11-13. Mozilla Hacks. 2020-07-14.
  44. Web site: Quantum Flow. Mozilla Wiki. 2017-03-28.
  45. Web site: Quantum Flow Engineering Newsletter #25. 2017-09-17. ehsanakhgari.org. 2020-07-14.
  46. Web site: Photon Engineering Newsletter #1. dolske. 2017-05-18. Dolske's blog. 2017-07-04.
  47. Web site: TPE Necko/Projects - MozillaWiki. wiki.mozilla.org. 2017-07-04.
  48. Web site: Firefox 59 Release Notes. www.mozilla.org. 2019-01-16.
  49. Web site: Platform/GFX/Moz2D - MozillaWiki.
  50. Web site: Firefox Now Uses the Azure Graphics API for Canvas on All Platforms. Parfeni. Lucian.
  51. Web site: Azure Replacing Cairo In Mozilla Firefox - Phoronix.
  52. Web site: Parallel page rendering with Mozilla Servo. Willis. Nathan. 17 June 2015. LWN.net. 27 June 2015.
  53. Web site: Introducing the Azure project - JOEDREW!. 2019-09-22. https://web.archive.org/web/20160908220007/https://blog.mozilla.org/joe/2011/04/26/introducing-the-azure-project/. 2016-09-08. dead.