What’s new in Chromium 53 and Opera 40

Opera 40 (based on Chromium 53) for Mac, Windows, Linux is out! To find out what’s new for users, see our Desktop blog. Here’s what it means for web developers.

Improved <input pattern="…">

The u flag (which stands for Unicode) is now applied to any regular expressions compiled through the pattern attribute for <input> and <textarea> elements. This enables more Unicode-friendly features, and generally more sensible behavior.

<input pattern="[🍪🎂🍩]">
<!--
	The input only validates when it is either 🍪, 🎂, or 🍩.
	(Previously, those strings would fail validation.)
-->

A demo is available.

<iframe sandbox="allow-presentation">

The Presentation API defines the nw allow-presentation sandboxing flag for <iframe sandbox="…"> which gives web developers control over whether an iframe can start a presentation session. By default, the Presentation API is disabled in sandboxed <iframe>s.

Shadow DOM v1

All browser vendors finally agreed on the Shadow DOM spec, called v1. The new Shadow DOM APIs include:

  • Element.attachShadow
  • Event.prototype.composed
  • Event.prototype.composedPath()
  • HTMLSlotElement
  • Slotable.prototype.assignedSlot

For more information, check out Hayato Ito’s overview of the differences between Shadow DOM v0 and v1.

MediaStreamTrack Constraints API

The following MediaStreamTrack methods are now supported:

  • getCapabilities
  • getConstraints
  • getSettings
  • applyConstraints

These APIs allow getting, setting, and querying constraints on a MediaStreamTrack.

Additionally, MediaTrackConstraints instances now have video and audio properties.

Promise-based getUserMedia

The navigator.mediaDevices.getUserMedia() API, which returns a promise, is now supported. Also, the unprefixed version of navigator.getUserMedia() (which uses callbacks) is now available. For more info, see Sam Dutton’s write-up.

Unprefixed CSS filter

The CSS filter property is now supported in its unprefixed form. For now, -webkit-filter is still supported as an alias for filter. A demo featuring SpongeBob SquarePants is available.

CSS -webkit-user-select: all

Chromium already supported -webkit-user-select, the prefixed version of user-select, but it didn’t recognize every value the spec defines. As of this update, the -webkit-user-select: all is supported. This property/value pair makes it so that if a selection would contain only part of an element, then the selection must contain the entire element including all its descendants.

For example, if you apply this on all <p> elements, and you then try to select a single word in a paragraph, the entire paragraph is selected automatically.

The CSS Tricks Almanac entry for user-select features a nice demo.

Force flattening when ancestor has opacity

3D-positioned descendants are now flattened by an ancestor that has opacity. Previously that didn’t happen if that ancestor also specified transform-style: preserve-3d. A visual demo explains this better than words ever could.

Rasterization & will-change: transform

Generally, all content is re-rastered when its transform scale changes, unless will-change: transform is applied to it. In other words, will-change: transform effectively means “please apply the transformation quickly, without taking the additional time for rasterization”. This only applies to scaling that happens via JavaScript manipulation, and does not apply to CSS animations. For more information, see the technical summary for this change. A demo is available.

Deprecated and removed features

Synthetic events (i.e. those who are created by JavaScript, and are thus untrusted) are now prevented from executing their default action. click is the only exception for backwards compatibility with legacy content. This change matches the spec and other browsers.

The HTML spec was changed so that <label> elements aren’t form-associated elements anymore. As a result, support for the form attribute on <label> elements was removed, and labelElement.form is now an alias for labelElement.control.form (instead of mapping to the form attribute value).

HTTP/0.9, the predecessor to HTTP/1.x, is now deprecated, and will be removed in a future release. Its replacement, HTTP/1.0, was standardized 20 years ago.

Support for DHE-based TLS ciphers has been removed, after being deprecated in Chromium 51 & Opera 38. Servers should upgrade to ECDHE ciphers instead.

A long time ago, the File API spec was changed to remove the FileError interface. It has been deprecated since 2013. As we’re preparing to remove this interface entirely in a future release, any usage of FileError now triggers a warning in the DevTools console.

The TextEncoder API no longer accepts an argument that specifies the encoding. Instead, it always uses UTF-8. If an argument is passed, it is ignored. This means that new TextEncoder('utf-16') and new TextEncoder('utf-16be') no longer work.

What’s next?

If you’re interested in experimenting with features that are in the pipeline for future versions of Opera, we recommend following our Opera Developer stream.