Gecko

From HandWiki - Reading time: 12 min

Short description: Free HTML layout engine
Gecko
File:81x89px
Developer(s)Mozilla Foundation, Mozilla Corporation, Adobe Systems, and other contributors
Written inC++, JavaScript, Rust
TypeBrowser engine
LicenseMPL 2.0[1][2]
Websitedeveloper.mozilla.org/en-US/docs/Glossary/Gecko

Gecko 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.[citation needed]

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.[11] 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).[citation needed]

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.[citation needed]

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.[citation needed]

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.[12][13] 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.[12]

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,[14] is the initial version introduced GeckoView, with increased performance in median page loading.[15][16] Firefox Reality was also built with GeckoView.[15] In June 2019, Mozilla announced Firefox Preview as an ongoing project that focuses on building an Android web browser with GeckoView.[17] 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.[18]

Standards support

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

Gecko also supports SVG.[20]

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).[21]

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.[22] Mozilla also uses it in their Thunderbird email-client.

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

Gecko is also used by Sugar for the OLPC XO-1 computer.[24] Gecko is used as a complete implementation of the XUL (XML User Interface Language). Gecko currently defines the XUL specification.

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.[25]

Proprietary dependency

On Windows and other platforms, Gecko depends on proprietary compilers.[26] Thus, FOSS distributions of Linux cannot include the Gecko package used in the Windows compatibility layer Wine.[27]

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,[28] to reflect the fact that it is no longer a separate component.[29]

Bloat

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

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.[12]

  • CSS: Servo's parallel style sheet system integrated into Gecko. Benchmarks suggest that performance scales linearly with number of CPU cores.[37] This was released in Firefox 57.[34]
  • Render: Servo's rendering architecture, called WebRender, integrated into Gecko. WebRender replaces the immediate mode drawing model with a retained mode model that is more easily accelerated by the GPU by taking advantage of CSS/DOM's similarity to a scene graph. Worst-case scenario rendering in testing exceeds 60 frames per second.[38] Mozilla began enabling the new renderer for select hardware/OS combinations in Firefox 67.[39]
  • Compositor: Gecko's existing compositor moved to its own process, isolating browser tabs from graphics driver related crashes. Since compositor crashes will not bring down the browser content process, the compositor process can be restarted transparently without losing user data. This was released in Firefox 53.[40]
  • DOM: Loosely inspired by Servo's Constellation architecture[41] and Opera's Presto engine,[42] Quantum DOM uses cooperatively scheduled threads within the DOM to increase responsiveness without increasing the number of processes and, thus, memory usage. The core of this shipped in Firefox 57.[43]
  • Flow: An umbrella for user visible performance improvements driven by a team that works across Gecko components. Focused on real user performance improvements on major webapps, primarily G Suite (now called Google Workspace) and Facebook.[44] This work completed and shipped for Firefox 57.[45]
  • Photon: A UI refresh of the entire application, with a strong focus on improving UI performance. Treated as a sister project to Quantum Flow.[46] This was released in Firefox 57.[33]
  • Network: Improve the performance of Necko, Gecko's networking layer, by moving more network activity off the main thread, context dependent prioritization of networking streams, and racing the cache layer with the network.[47] This feature was released in Firefox 59.[48]

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]

References

  1. "Mozilla Foundation End-User Licensing Agreements". https://www.mozilla.org/en-US/about/legal/eula/. 
  2. "Mozilla Licensing Policies". mozilla.org. https://www.mozilla.org/foundation/licensing.html. 
  3. "Embedding Mozilla". Mozilla.org. 2012-10-25. https://www.mozilla.org/projects/embedding/. 
  4. 4.0 4.1 "Simple Firefox for Android build". https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build. "Gecko is implemented using C++ and JavaScript." 
  5. 5.0 5.1 Bergstrom, Lars (May 2016). "Engineering the Servo Web Browser Engine using Rust". Proceedings of the International Conference on Software Engineering. https://raw.githubusercontent.com/larsbergstrom/papers/master/icse16-servo-preprint.pdf. 
  6. "Google Groups". https://groups.google.com/forum/m/#!msg/mozilla.dev.platform/Gzwh1IbxvHE/7RlO21I6DwAJ. 
  7. Yegulalp, Serdar (February 3, 2017). "Mozilla binds Firefox's fate to the Rust language". https://www.infoworld.com/article/3165424/mozilla-binds-firefoxs-fate-to-the-rust-language.html. 
  8. "MPL 2 Upgrade". https://wiki.mozilla.org/MPL_Upgrade. 
  9. "Gecko FAQ". https://developer.mozilla.org/en-US/docs/Gecko/FAQ. 
  10. "nglayout project: identity crisis". Mozilla.org. https://www.mozilla.org/newlayout/gecko.html. 
  11. 11.0 11.1 Jorge O. Castro (2004-06-15). "Ars Technica sits down with Scott Collins from Mozilla.org". https://arstechnica.com/information-technology/2004/06/collins-interview/2/. 
  12. 12.0 12.1 12.2 12.3 "Quantum". https://wiki.mozilla.org/Quantum. 
  13. 13.0 13.1 Cimpanu, Catalin. "Mozilla Announces Quantum, a New Browser Engine for Firefox". softpedia. http://news.softpedia.com/news/mozilla-announces-quantum-a-new-browser-engine-for-firefox-509767.shtml. 
  14. "Firefox Focus 7.0 enters beta, Switches to GeckoView (Gecko Engine)". 14 September 2018. https://techdows.com/2018/09/firefox-focus-7-0-to-use-geckoview-gecko-engine.html. 
  15. 15.0 15.1 "Firefox Focus with GeckoView". September 13, 2018. https://hacks.mozilla.org/2018/09/focus-with-geckoview/. 
  16. "What's new in Firefox Focus for Android (version 7) | Firefox Focus Help" (in en-US). https://support.mozilla.org/kb/whats-new-firefox-focus-android-version-7. 
  17. "GeckoView in 2019". June 27, 2019. https://hacks.mozilla.org/2019/06/geckoview-in-2019/. 
  18. Vesta Zare (August 25, 2020). "Fast, personalized and private by design on all platforms: introducing a new Firefox for Android experience" (in en-US). https://blog.mozilla.org/blog/2020/08/25/introducing-a-new-firefox-for-android-experience/. 
  19. "Cross Browser Compatibility of ECMAScript 2015 (ES6) in Firefox 102" (in en-US). https://www.lambdatest.com/web-technologies/es6-support-on-firefox-102. 
  20. "Cross Browser Compatibility of SVG (basic support) in Firefox 102" (in en-US). https://www.lambdatest.com/web-technologies/svg-support-on-firefox-102. 
  21. "Mozilla Adds Undetectable document.all Support, Part of New Novell Linux Distribution?". Developer.mozilla.org. 2004-07-23. http://www.mozillazine.org/talkback.html?article=5063. 
  22. "IE Uses Gecko Under Wine". Wine Wiki. http://wiki.winehq.org/Gecko. 
  23. sdubois (24 June 2010). "Gecko". https://www.fsf.org/working-together/gang/gecko. 
  24. Martens, China (2007-01-03). "One Laptop Per Child readies 'Sugar' interface". IDG News Service. http://www.infoworld.com/article/07/01/03/Hnsugarinterface_1.html. 
  25. "Picasa 3.0 for Linux". http://picasa.google.com/linux/download.html#picasa30. 
  26. "Building Firefox for Windows". https://firefox-source-docs.mozilla.org/setup/windows_build.html. 
  27. "Fedora - Wine-Wiki". http://wiki.jswindle.com/index.php/Fedora#Working_Wine. 
  28. "Gecko versions and application versions". MDN. https://developer.mozilla.org/en-US/docs/Mozilla/Gecko/Versions. 
  29. "Not much in new Thunderbird 5, but roadmap looks promising". 30 June 2011. https://arstechnica.com/information-technology/2011/06/not-much-in-new-thunderbird-5-but-roadmap-looks-promising/. 
  30. 30.0 30.1 Paul Festa (2003-01-14). "Apple snub stings Mozilla". CNET Networks. http://news.cnet.com/2100-1023-980492.html. 
  31. 31.0 31.1 David Baron (2003-01-09). "Thursday 2003-01-09". David Baron's weblog. self-published. http://dbaron.org/log/2003-01#l20030109. 
  32. Ryan Paul (2008-09-09). "Why Mozilla is committed to Gecko as WebKit popularity grows". https://arstechnica.com/information-technology/2008/09/mozilla-committed-to-gecko/. 
  33. 33.0 33.1 "Firefox 57.0, See All New Features, Updates and Fixes". https://www.mozilla.org/en-US/firefox/57.0/releasenotes/. 
  34. 34.0 34.1 "Introducing the New Firefox: Firefox Quantum – The Mozilla Blog". https://blog.mozilla.org/blog/2017/11/14/introducing-firefox-quantum/. 
  35. "Servo remaining work". https://github.com/servo/servo/wiki/Remaining-work/0e3b111807c2ed4c11f36d6bd47dda6dfa02d502. 
  36. "Mozilla lays off 250 employees while it refocuses on commercial products" (in en). https://www.zdnet.com/article/mozilla-lays-off-250-employees-while-it-refocuses-on-commercial-products/. 
  37. "The Changelog". 18 November 2016. https://changelog.com/podcast/228. 
  38. "Bay Area Rust Meetup February 2016". https://air.mozilla.org/bay-area-rust-meetup-february-2016/. 
  39. "Webrender Where". https://wiki.mozilla.org/Platform/GFX/WebRender_Where. 
  40. "Firefox faster and more stable with the first big bytes of Project Quantum, simpler with compact themes and permissions redesign". https://blog.mozilla.org/blog/2017/04/19/first-big-bytes-project-quantum/. 
  41. "Servo Architecture". https://www.youtube.com/watch?v=an5abNFba4Q. 
  42. "Mozilla's Quantum Project". 2016-10-27. https://billmccloskey.wordpress.com/2016/10/27/mozillas-quantum-project/. 
  43. "Entering the Quantum Era". 2017-11-13. https://hacks.mozilla.org/2017/11/entering-the-quantum-era-how-firefox-got-fast-again-and-where-its-going-to-get-faster/. 
  44. "Quantum Flow". https://wiki.mozilla.org/Quantum/Flow. 
  45. "Quantum Flow Engineering Newsletter #25". 2017-09-17. https://ehsanakhgari.org/blog/2017-09-21/quantum-flow-engineering-newsletter-25/. 
  46. dolske (2017-05-18). "Photon Engineering Newsletter #1". https://dolske.wordpress.com/2017/05/18/photon-engineering-newsletter-1/. 
  47. "TPE Necko/Projects - MozillaWiki". https://wiki.mozilla.org/TPE_Necko/Projects. 
  48. "Firefox 59 Release Notes". https://www.mozilla.org/en-US/firefox/59.0/releasenotes/. 
  49. "Platform/GFX/Moz2D - MozillaWiki". https://wiki.mozilla.org/Platform/GFX/Moz2D. 
  50. Parfeni, Lucian. "Firefox Now Uses the Azure Graphics API for Canvas on All Platforms". http://news.softpedia.com/news/Firefox-Now-Uses-the-Azure-Graphics-API-for-Canvas-on-All-Platforms-290671.shtml. 
  51. "Azure Replacing Cairo In Mozilla Firefox - Phoronix". https://www.phoronix.com/scan.php?page=news_item&px=OTcxNQ. 
  52. Willis, Nathan (17 June 2015). "Parallel page rendering with Mozilla Servo". LWN.net. https://lwn.net/Articles/647969/. 
  53. "Introducing the Azure project - JOEDREW!". https://blog.mozilla.org/joe/2011/04/26/introducing-the-azure-project/. 

External links





Licensed under CC BY-SA 3.0 | Source: https://handwiki.org/wiki/Software:Gecko
7 views | Status: cached on October 05 2024 04:30:27
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF