Jump to content

Gecko (software): Difference between revisions

From Niidae Wiki
imported>Scdinan
m Quantum: Switch from present tense to past tense since the release already occurred.
 
(No difference)

Latest revision as of 09:27, 16 May 2025

Template:Short description Template:Infobox software Template:Firefox TOC Gecko (stylized as ɢecko) is a browser engine developed by Mozilla. It is used in the Firefox browser, the Thunderbird email client, and in a discontinued state on AOL's Netscape 4, Netscape 6, Netscape 7, Netscape Browser and Netscape Navigator 9; this is alongside 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.<ref>Template:Cite web</ref>

Gecko is written in C++ and JavaScript,<ref name="Android build">Template:Cite web</ref><ref name="Servo_paper">Template:Cite journal</ref> and, since 2016, additionally in Rust.<ref>Template:Cite web</ref><ref>Template:Cite web</ref> It is free and open-source software subject to the terms of the Mozilla Public License version 2.<ref>Template:Cite web</ref> Mozilla officially supports its use on Android,<ref name="Android build"/> Linux, macOS, and Windows.<ref>Template:Cite web</ref>

History

[edit]

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),<ref>Template:Cite web</ref> eventually the Gecko branding won out.Template: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.<ref name="Collins_interview"/> 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).Template: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.Template: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.Template:Citation needed

In the Netscape era, a combination of poor technical and management decisions resulted in Gecko software bloat.<ref name="Collins_interview">Template:Cite web</ref><ref name="FestaCnet"/><ref name="dbaron-complexity">Template:Cite web</ref> Thus in 2001 Apple chose to fork KHTML, not Gecko, to create the WebKit engine for its Safari browser.<ref name="FestaCnet">Template:Cite web</ref><ref name="dbaron-complexity"/> However, by 2008 Mozilla had addressed some of the bloat problems, resulting in significant performance improvements for Gecko.<ref>Template:Cite web</ref>

Quantum

[edit]

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.<ref name="QuantWiki">Template:Cite web</ref><ref name="QuantAnnounce">Template:Cite news</ref> Firefox 57, also known as "Firefox Quantum", first shipped in November 2017 and was 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.<ref name="QuantWiki" />

GeckoView

[edit]

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,<ref>Template:Cite web</ref> is the initial version introduced GeckoView, with increased performance in median page loading.<ref name="focus-with-geckoview">Template:Cite web</ref><ref>Template:Cite web</ref> Firefox Reality was also built with GeckoView.<ref name="focus-with-geckoview" /> In June 2019, Mozilla announced Firefox Preview as an ongoing project that focuses on building an Android web browser with GeckoView.<ref>Template:Cite web</ref> 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.<ref>Template:Cite web</ref>

Standards support

[edit]

Template:Update section Some of the standards Gecko supports include:

Legacy IE non-standard support

[edit]

Template:Main 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).<ref>Template:Cite web</ref>

Usage

[edit]

Template:Main 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.<ref name="IE Wine Gecko">Template:Cite web</ref> Mozilla also uses it in their Thunderbird email-client.

Other web browsers using Gecko include LibreWolf, Zen Browser, GNU IceCat,<ref>Template:Cite web</ref> Midori,<ref>Template:Cite web</ref> Waterfox, K-Meleon, Lunascape, Portable Firefox, Conkeror, Classilla, and TenFourFox.

Gecko is also used by Sugar for the OLPC XO-1 computer,<ref name="sugarui">Template:Cite news</ref> and is used as a complete implementation of the XUL (XML User Interface Language). Gecko currently defines the XUL specification.Template:Update inline Gecko is also used by the KaiOS mobile operating system, which is based on the discontinued Firefox OS.<ref>Template:Cite web</ref>

Past users

[edit]

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.<ref name="picasa">Template:Cite web</ref>

Proprietary dependency

[edit]

On Windows and other platforms, Gecko depends on proprietary compilers.<ref>Template:Cite web</ref>

Versioning

[edit]

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,<ref>Template:Cite web</ref> to reflect the fact that it is no longer a separate component.<ref>Template:Cite web</ref>

Quantum

[edit]

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.<ref name="QuantWiki"/><ref name="QuantAnnounce"/>

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".<ref name="57notes">Template:Cite web</ref><ref name="introFFQuantum">Template:Cite web</ref>Template:Needs update

Background

[edit]

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.<ref name="Servo_paper"/>

As of April 2016, Servo needed at least several years of development to become a full-featured browser engine,<ref>Template:Cite web</ref> 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.<ref>Template:Cite web</ref>

Components

[edit]

The Quantum project is composed of several sub-projects.<ref name="QuantWiki"/>

  • CSS: Servo's parallel style sheet system integrated into Gecko. Benchmarks suggest that performance scales linearly with number of CPU cores.<ref>Template:Cite web</ref> This was released in Firefox 57.<ref name="introFFQuantum"/>
  • Render: Servo's rendering architecture, called WebRender, integrated into Gecko in 2019, 2 years after the first Firefox Quantum release, Firefox 67. 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.<ref>Template:Cite web</ref> Mozilla began enabling the new renderer for select hardware/OS combinations in Firefox 67.<ref>Template:Cite web</ref>
  • 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.<ref>Template:Cite web</ref>
  • DOM: Loosely inspired by Servo's Constellation architecture<ref>Template:Cite webTemplate:Cbignore</ref> and Opera's Presto engine,<ref>Template:Cite web</ref> 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.<ref>Template:Cite web</ref>
  • 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.<ref>Template:Cite web</ref> This work completed and shipped for Firefox 57.<ref>Template:Cite web</ref>
  • Photon: A UI refresh of the entire application, with a strong focus on improving UI performance. Treated as a sister project to Quantum Flow.<ref>Template:Cite web</ref> This was released in Firefox 57.<ref name="57notes"/>
  • 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.<ref>Template:Cite web</ref> This feature was released in Firefox 59.<ref>Template:Cite web</ref>

Azure

[edit]

The Mozilla Azure project is a stateless low-level graphics abstraction API used in Firefox.<ref>Template:Cite web</ref>
The project has several objectives including:

  • more accurate Direct2D compatibility
  • optimized state interoperability
  • 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.<ref>Template:Cite web</ref><ref>Template:Cite web</ref> It is written in C++ and used by Servo.<ref>Template:Cite web</ref> 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.<ref>Template:Cite web</ref>

References

[edit]

Template:Reflist

[edit]

Template:Mozilla projects Template:Netscape Template:Web browser engines Template:Web browsers