Jump to content

Gecko (software)

From Alfawiki
Gecko
Company typeSoftware engine
IndustrySoftware development
PredecessorNetscape rendering engine (pre-1997)
Founded1997
FounderNetscape (DigitalStyle acquisition)
ProductsBrowser engine used in Firefox, Thunderbird, Netscape 6/7/Browser/Navigator 9
OwnerMozilla Foundation
Websitedeveloper.mozilla.org/en-US/docs/Mozilla/Gecko

Gecko (displayed as ɢecko) is a browser engine created by Mozilla and utilized in the Firefox browser, the Thunderbird email client, and previously incorporated in AOL's Netscape 6, Netscape 7, Netscape Browser, and Netscape Navigator 9. It supports open web standards and serves as the core rendering engine for web content and interface elements through XUL. Gecko offers an extensive programming API, facilitating its application in web browsers, content rendering, and client-server software.

Primarily developed using C++ and JavaScript, with contributions in Rust starting from 2016, Gecko is distributed as free and open-source software under the terms of the Mozilla Public License version 2. Mozilla officially maintains Gecko support across Android, Linux, macOS, and Windows platforms.

History

The origins of the layout engine now known as Gecko trace back to 1997 at Netscape following their acquisition of DigitalStyle. The then-current Netscape rendering engine, which had been in use since Netscape Navigator 1.0, was slow, lacked adherence to W3C standards, and did not support features such as incremental reflow. The new engine was developed concurrently with the legacy one, with plans to integrate it into Netscape Communicator once it reached stability.

After the inception of the Mozilla project in 1998, this new engine’s source code was released under an open-source license. Initially called Raptor, it was renamed to NGLayout due to trademark conflicts before Netscape rebranded it as Gecko. Although the Mozilla Organization initially continued using NGLayout because Gecko was a Netscape trademark, eventually the Gecko name became standard.

In October 1998, Netscape declared that its upcoming browser would be based on Gecko (then NGLayout), necessitating substantial code rewrites. While this decision aligned with web standards proponents’ interests, it was met with resistance internally because of aggressive six-month deadlines. This shift led to halting development on Netscape Communicator 5.0 and the planned improvements under the Mariner project. The first release featuring Gecko was Netscape 6 in November 2000.

As development advanced, additional software adopted Gecko. AOL, Netscape’s parent company, integrated it into products such as CompuServe 7.0 and AOL for Mac OS X, replacing previous reliance on embedded Internet Explorer components. However, Gecko was never fully embedded into AOL’s primary Windows client beyond some beta releases.

On July 15, 2003, AOL terminated its remaining Gecko development team; stewardship of the engine then transferred to the newly established Mozilla Foundation. Presently, development of Gecko is managed by employees of the Mozilla Corporation, corporate partners, and community volunteers.

During Netscape’s management period, poor technical choices and mismanagement caused significant software bloat within Gecko. As a result, in 2001 Apple opted to fork KHTML rather than use Gecko for its Safari browser’s WebKit engine. By 2008, Mozilla had resolved many bloat-related issues, leading to marked improvements in Gecko’s performance.

Quantum

In October 2016, Mozilla unveiled Quantum, an initiative aimed at creating a next-generation web engine for users of Firefox. This project incorporated enhancements to Gecko inspired by the experimental Servo engine. Firefox 57—released in November 2017 as "Firefox Quantum"—was the initial version featuring significant Quantum/Servo components activated, resulting in better performance for CSS processing and GPU-accelerated rendering. Subsequent Firefox updates have progressively integrated additional Servo elements into Gecko.

GeckoView

Mozilla unveiled GeckoView in September 2018 as a software library designed to enable the reuse of the Gecko engine on Android devices by separating it from the user interface. This modular approach allows Gecko to be embedded within other applications. The initial implementation of GeckoView appeared in Firefox Focus 7.0, released the same month, which benefited from enhanced page loading speeds. Additionally, Firefox Reality incorporates GeckoView technology. In June 2019, Mozilla introduced Firefox Preview, an Android browser project built upon GeckoView. The stable release of Firefox for Android version 79 ("Firefox Daylight") in August 2020 was the first major version predominantly powered by the GeckoView engine.

Standards support

Gecko supports a variety of web standards, including:

Legacy IE non-standard support

To accommodate websites originally crafted for Netscape and Internet Explorer, Gecko employs DOCTYPE switching. Documents with contemporary DOCTYPE declarations render in strict standards mode, while those lacking or using older DOCTYPEs trigger quirks mode, mimicking some non-standard behaviors from Netscape Communicator 4.x (although certain features like layers are not supported).

Gecko also provides partial support for specific non-standard Internet Explorer features such as the marquee element and the document.all property; however, pages that explicitly check for document.all are notified that it is unsupported.

Usage

Gecko's primary application is within web browsers, beginning with Netscape 6 and the Mozilla Suite, which was later renamed SeaMonkey. It serves as the foundation for Mozilla-based browsers including Firefox, Firefox for mobile, and the Internet Explorer compatibility layer within Wine. Mozilla also integrates Gecko into their email client, Thunderbird.

Additional browsers utilizing Gecko include LibreWolf, Zen Browser, GNU IceCat, Midori, Waterfox, K-Meleon, Lunascape, Portable Firefox, Conkeror, Classilla, Floorp, and TenFourFox.

Beyond browsers, Gecko powers the interface for the OLPC XO-1 computer's Sugar environment and implements the now-discontinued XUL (XML User Interface Language) standard. It also operates as the rendering engine for the mobile operating system KaiOS, which is derived from the former Firefox OS.

Past users

Former users of Gecko include browsers such as Pale Moon, which has since transitioned to using the Goanna engine; Epiphany (now known as GNOME Web) and GNOME DevHelp, both of which have adopted WebKitGTK.

Several discontinued applications that employed Gecko are: Swiftfox, Flock, Galeon, Camino, Minimo, Beonex Communicator, Kazehakase, Songbird, Sunbird, MicroB, Nightingale, Instantbird, and the Linux version of Picasa.

Proprietary dependency

Gecko depends on proprietary compilers across Windows and various other operating systems.

Versioning

Following Gecko 2.0, its versioning jumped to 5.0 to correspond with Firefox 5, and has since maintained alignment with the primary version numbers of Firefox and Thunderbird, underscoring its role as an integral component.

Quantum

Quantum represents Mozilla's effort to create the next-generation web engine for Firefox by incorporating substantial improvements from the experimental Servo project. It also enhances the browser’s user interface and interaction experience.

The debut of a Servo-based element appeared in Firefox 57, released in November 2017, which Mozilla branded as "Firefox Quantum."

Background

In 2012, Mozilla initiated the experimental Servo project, a browser engine constructed from the ground up to improve concurrency and parallelism and mitigate memory safety issues. Servo is written in the Rust programming language, also developed by Mozilla, which compiles code offering better memory safety and concurrency compared to traditional C++.

By April 2016, Servo still required several years of advancement before becoming a fully functional engine, leading Mozilla to start the Quantum project aimed at integrating stable Servo components into Firefox. However, in August 2020, Mozilla laid off all Servo developers as part of a strategic shift toward commercial product priorities.

Components

The Quantum initiative encompasses multiple core sub-projects:

  • CSS: Incorporation of Servo’s parallel style sheet system into Gecko, achieving performance that scales proportionally with CPU cores. This feature was introduced in Firefox 57.
  • Render: WebRender, Servo’s GPU-accelerated rendering system, replaced Gecko’s immediate mode drawing approach starting with Firefox 67. It employs a retained mode design consistent with CSS/DOM structures, enabling rendering rates exceeding 60 frames per second on tested devices.
  • Compositor: The compositor component was isolated into a separate process to prevent graphics driver failures from affecting browser tabs, allowing seamless restarts without data loss. This enhancement debuted in Firefox 53.
  • DOM: Quantum DOM utilizes cooperatively scheduled threads within the DOM to enhance responsiveness while maintaining memory efficiency. This architecture launched in Firefox 57.
  • Flow: A cross-project effort focused on delivering tangible user performance gains on prominent web applications such as Google Workspace and Facebook. Completed and integrated in Firefox 57.
  • Photon: A user interface redesign aimed at improving interface speed and fluidity, released alongside Quantum Flow in Firefox 57.
  • Network: Upgrades to Necko, Gecko’s network layer, involved shifting network operations off the main thread, contextually prioritizing streams, and competing cache with network requests. These changes were introduced in Firefox 59.

Azure

The Mozilla Azure initiative provides a stateless low-level graphics abstraction API utilized by Firefox. Its objectives include better Direct2D compatibility, streamlined state interoperability, and enhanced control over performance and bug resolution. Azure offers 2D hardware acceleration built atop 3D graphics backends and replaced Cairo within Firefox beginning in 2012. Written in C++, it is also employed by Servo. The name pays tribute to Netscape founder James H. Clark and his contributions at Silicon Graphics, where color-themed workstations were common.

External links