Firefox Quantum 57 for developers

This article provides information about the changes in Firefox 57 (a.k.a. Firefox Quantum) that will affect developers. Firefox 57 was released on November 14, 2017.

Firefox 57 === Firefox Quantum

O Firefox 57 recebeu o nome de lançamento Quantum, após o projeto de engenharia Firefox Quantum que tem como objetivo reconstruir o Firefox a partir do zero, trazendo consigo grande desempenho, estabilidade e melhorias visuais. This is the first version of Firefox to ship some of these improvements, so we wanted to mark the occasion.

Nota: Para ler mais sobre os recursos do Quantum nesta versão, veja: Firefox Quantum Developer Edition: the fastest Firefox ever with Photon UI and better tooling por Dan Callahan.

Firefox's new parallel CSS engine — também conhecido como Quantum CSS ou Stylo ─ está habilitado por padrão no Firefox 57 para desktop, com versões móveis do Firefox para seguir mais tarde. Os desenvolvedores não devem notar nada significativamente diferente, além de toda uma série de melhorias de desempenho. Existem, no entanto, algumas pequenas diferenças funcionais no Stylo, implementado para corrigir o comportamento não padronizado do Gecko que deve ser eliminado. Nos reportaremos tais diferenças nas páginas de referência e nas notas de lançamento conforme apropriado (veja Quantum CSS notes).

Changes for Web developers

Ferramentas de desenvolvimento

Sem mudanças.

HTML

CSS

Quantum CSS notes

Following bugs have been fixed in Quantum:

  • Radial gradient values like radial-gradient(circle gold,red) will work in the old Gecko style system, even though they shouldn't because of the missing comma between circle and gold (bug 1383323).
  • When you animate an offscreen element onscreen but specify a delay, Gecko does not repaint on some platforms, e.g. Windows (bug 1383239).
  • In Gecko, <details> elements can't be made open by default using the open attribute if they have an animation active on them (bug 1382124).
  • In Gecko, transitions will not work when transitioning from a text-shadow with a color specified to a text-shadow without a color specified (bug 726550).
  • In Gecko, cancelling a filling animation (e.g. with animation-fill-mode: forwards set) can trigger a transition set on the same element, although only once (see bug 1192592 and these test cases for more information). In general declarative animations should not trigger transitions.
  • Animations using em units are not affected by changes to the font-size on the animated element's parent in Gecko, whereas they should be (bug 1254424).
  • Gecko also deals with font-size inheritance differently from Quantum CSS, meaning that for some language settings inherited font sizes end up being smaller than expected (see bug 1391341).
  • Gecko reuses the same mechanism used when parsing a url-token when parsing the domain() or url-prefix() URL matching functions for a @-moz-document (en-US) rule. Quantum CSS does not use the same mechanism and it does not consider tokens invalid when they contain brackets or quotes (bug 1362333).
  • In Gecko, when you set a system font as the value of a canvas 2D context's font (en-US) (e.g. menu), getting the font value fails to return the expected font (it returns nothing). This has been fixed in Quantum. (bug 1374885).
  • In Gecko, when you create a detached subtree (e.g. a <div> created using createElement() that is not yet inserted into the DOM), the subtree's root element is set as a block-level element. In Quantum CSS this is set as inline, as per spec (bug 1374994).
  • In Gecko, calc expressions are rejected — causing the value to be invalid — when used as the radius component of a radial-gradient (en-US) function (bug 1376019).
  • In Gecko, calc(1*2*3) is not parsed successfully; Quantum CSS fixes this (bug 1379467).
  • In Quantum CSS, calc() is supported everywhere that the spec explains it should be (bug 1350857). In Gecko it is not.
  • Gecko has a bug whereby the ::before and ::after pseudo-elements are still generated even if the content property value is set to normal or none. As per spec, they shouldn't be (bug 1387931).
  • Another Gecko bug means that the background-position property can't be transitioned between two values containing different numbers of <position> (en-US) values, for example background-position: 10px 10px; and background-position: 20px 20px, 30px 30px; (see bug 1390446).

SVG

Sem mudanças.

JavaScript

Novas APIs

DOM

DOM events

Sem mudanças.

Media and WebRTC

Security

  • URLs resources:// não mais vazar informações (bug 863246).
  • Data URIs agora são tratados como origens opacas únicas, em vez de herdar a origem do objeto de configuração responsável pela navegação (bug 1324406).

Plugins

Sem mudanças.

Outros

  • Firefox headless mode agora incluídos uma flag -screenshot que permite você pegar screenshots de website diretamente da linha de comando (bug 1378010).

Removals from the web platform

HTML

  • <link rel=”preload”> (see Preloading content with rel="preload" (en-US)) foi desabilitado no Firefox 57 por causa de vários problemas de compatibilidade da web (por exemplo bug 1405761). Espera-se que uma versão melhorada que funcione para recursos não armazenáveis em cache chegue ao Firefox 58.

APIs

SVG

Sem mudanças.

Alterações para add-on e desenvolvedores Mozilla

Nota: Começando no Firefox 57, todo suporte para XPCOM-based add-ons foi removido. Todas as extensões devem ser convertidas no novo browser extensions (também conhecido como WebExtensions) ou eles não vão funcionar.

WebExtensions

As seguintes APIs foram adicionadas ou estendidas:

Versões anteriores