chromium 53 chrome 各个版本发布功能列表(85-108)

chromium Features 85-108

From https://chromestatus.com/features

chromium85 Features:30

  1. Web Bluetooth getDevices() and forget()

Chrome’s implementation of Web Bluetooth does not have a way for websites to get a list of permitted devices. This feature adds the Bluetooth.getDevices() and BluetoothDevice.forget methods. getDevices() will return a list of BluetoothDevice objects that the current origin has been granted permission to use by the user. forget() will allow web developers to voluntarily revoke a permission to a BluetoothDevice that was granted by a user.

  1. @property

The @property rule is an alternative way to register a custom property without JavaScript.

  1. AVIF Image Decode

AVIF is a next generation image format standardized by the Alliance for Open Media. This feature supports adding decode support for AVIF content natively into the browser via existing AV1 decoders.

  1. App shortcuts

Lets a web application register shortcuts for common tasks. These would typically be added to the app launcher icon (for a progressive web app) enabling the user to quickly run key tasks.

  1. CORS: Strict ABNF based Checks on Access-Control-Allow-Headers and Access-Control-Allow-Methods headers

Chrome CORS checked Access-Control-Allow-Headers and Access-Control-Allow-Methods headers in a relaxed manner and didn’t follow the ABNF that spec defined.

After Chrome 85, CORS checks follow the standardized ABNF.

  1. CSS Color Adjust: Remove ‘only’ and support used ‘dark’ for preferred ‘light’ for color-scheme

The color-scheme property from CSS Color Adjustment level 1 spec changed in two ways.

  1. The ‘only’ keyword is no longer special and is treated as a as any other unknown color-scheme. The ‘only’ keyword was previously only allowed in combination with ‘light’, but had otherwise no effect in Chrome.

  2. ‘color-scheme: dark’ will have a used value of ‘dark’ even when preferred color-scheme is ‘light’. ‘color-scheme: light dark’ still has a used values based on the preferred scheme.

  3. CSS content-visibility property

Adds a CSS property called content-visibility, which allows automatic or script management of content visibility. When hidden, the element’s contents (subtree or replaced element contents) are not drawn or hit-tested and have CSS containment applied, allowing for rendering optimizations. The ‘auto’ keyword allows for the user-agent to manage content visibility based on proximity to the viewport, whereas ‘hidden’ keyword allows full script control of content visibility.

  1. CSS counter-set

CSS counter-set is an additional property introduced in css-lists-3 to control counters by setting an existing counter to a specified value. This builds upon other implemented counter control properties, specifically counter-reset (which creates a new counter with a specified value) and counter-increment (which increments an existing counter by a specified amount).

  1. Cookies default to SameSite=Lax

Treat cookies as SameSite=Lax by default if no SameSite attribute is specified. Developers are still able to opt-in to the status quo of unrestricted use by explicitly asserting SameSite=None.

This feature is available as of Chrome 76 by enabling the same-site-by-default-cookies flag.

This feature will be rolled out gradually to Stable users starting July 14, 2020. See https://www.chromium.org/updates/same-site for full timeline and more details.

  1. Event Timing API

Monitoring event latency requires an event listener. This precludes measuring event latency early in page load, and adds unnecessary performance overhead. The Event Timing API will enable web developers to measure event latency both before and after the page load.

  1. Expose Picture-in-Picture Window in leavepictureinpicture event

Allow web developers to access pictureInPictureWindow in leavepictureinpicture event.

  1. Feature Policy for Clipboard API

Adds a feature policy (aka permission policy) flags for the Clipboard API. The flag names will be ‘clipboard-read’ and ‘clipboard-write’, to be consistent with the Clipboard API permissions, as feature policy is now merged with permissions and renamed to permissions policy.

  1. Get Installed Related Apps API

The Get Installed Related Apps API (navigator.getInstalledRelatedApps) provides sites access to if their corresponding related applications are installed. Sites are only allowed to use this API if the native application has an established association with the web origin.

The API was launched in Chrome 80. You can find details here: https://web.dev/get-installed-related-apps/

  1. Interoperable Element’s scrollLeft and scrollTop in non-default writing modes

Change Chrome’s behavior such that when a scrollable element has content overflowing to the left (or to the top) then its horizontal (or vertical) scroll position will be zero at its initial position and negative when scrolled leftward (or upward).

This change only affects DOM API Element.scrollLeft(), Element.scrollTop(), Element.scroll(), Element.scrollTo() when the scrollable element has a non-default writing mode that may invert overflow directions (e.g right to left or vertical modes).

  1. JavaScript logical assignment operators

Adds the logical assignment operators ||=, &&=, and ??= to JavaScript.

  1. Media Feeds

Adds an API to allow a user agent to discover a media feed provided by a website. When fetched by the user agent the site will return a feed of personalized media recommendations for the user.

  1. Named pages with page-orientation

Support the ‘page’ CSS property [1], along with named pages support (@page foobar {} selector). Also support the ‘page-orientation’ descriptor [2] for @page, with values ‘upright’ (initial value), ‘rotate-left’, or ‘rotate-right’.

[1] https://www.w3.org/TR/css-page-3/#using-named-pages
[2] https://drafts.csswg.org/css-page-3/#page-orientation-prop

  1. Promise.any and AggregateError

Promise.any() accepts an iterable of promises and returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError holding the rejection reasons if all of the given promises are rejected.

AggregateError is a support class that aggregates one or more errors into a single object.

  1. Referrer Policy: Default to strict-origin-when-cross-origin

Web developers may specify a referrer policy on their documents, which impacts the Referer header sent on outgoing requests and navigations. When no policy is specified, Chrome will now use strict-origin-when-cross-origin as the default policy, instead of no-referrer-when-downgrade. On cross-origin requests made from documents without a specified referrer policy, this reduces the Referer header to the initiating origin and retains its usefulness while mitigating the risk of leaking data.

  1. Reject insecure SameSite=None cookies

Deprecate and remove the use of cookies with the SameSite=None attribute but without the Secure attribute. Any cookie that requests SameSite=None but is not marked Secure will be rejected.

This feature is available as of Chrome 76 by enabling the cookies-without-same-site-must-be-secure flag.

This feature will be rolled out gradually to Stable users starting July 14, 2020. See https://www.chromium.org/updates/same-site for full timeline and more details.

  1. String.prototype.replaceAll

JavaScript now has first-class support for global substring replacement through the new String.prototype.replaceAll() method.

  1. Subresource prefetching+loading via Signed HTTP Exchange

Adds support signed exchange subresource prefetching and loading by extending the HTTP link header.

  1. Update fallback content’s behavior for ImageInputType and HTMLImageElement

Previously, there have been inconsistencies on the implementation of fallback content and its treatment as a replaced element for ImageInputType and HTMLImageElement. This led to interoperable issues between implementors.
Examples:


Please see, https://github.com/yuzhe-han/images-fallback-content-1094763, for visual comparison.

  1. Update the behavior of the “disabled” attribute for HTMLLinkElement

Previously, Chromium had intermittent behavior with respect to the “disabled” attribute:

  • would not show up in document.styleSheets.
  • foo.disabled=false; foo.disabled=true; would cause it to appear (and remain) in document.styleSheets.
  • cannot be enabled, except by disabling and re-enabling it.
  • When disabled, link.ownerNode was not null

The above issues are being resolved.

  1. Web Bluetooth Write With/Without Response

Implements two APIs for writing to GATT characteristics that will allow an app to ignore a response from the device or to expect a response from the device.

The currently implemented writeValue() method will remain for backwards compatibility, but is discouraged.

  1. WebAssembly BigInt Integration

Allow WebAssembly to import and export WebAssembly function parameters of type i64 using BigInt.

  1. WebAuthn getPublicKeyAlgorithm and getAuthenticatorData()

Adds two accessors from the Web Authentication Level 2 spec that save sites from parsing Concise Binary Object Representation (CBOR) and CBOR Object Signing and Encryption (COSE) in order to use security keys.

  1. disallow preventDefault() on TouchMoves during overscroll

Touch events sent to a page can be either blocking or non-blocking. A blocking touch event means that the page calls preventDefault() to prevent the browser from turning the touch into a scroll. TouchMove events start out blocking until the first event in a sequence isn’t preventDefaulted and causes scrolling. Chromium currently reverts the touchevent stream back to blocking so that pages can override browser default overscrolling behavior. This feature causes overscrolling to be non-blocking.

  1. -webkit-box quirks from -webkit-line-clamp

The following display properties will no longer work when -webkit-box and -webkit-box-clamp are combined: -webkit-box-flex, -webkit-box-ordinal-group, -webkit-box-align, -webkit-box-pack, -webkit-box-direction.

  1. Heavy Ad Intervention

Chrome will unload ad iframes that use an egregious amount of CPU or network bandwidth.

An ad will be subject to unload if it has not received a user gesture and:

  • Used the main thread for more than 60 seconds total
  • Used the main thread for more than 15 seconds in any 30 second window (50% utilization over 30 seconds)
  • Used more than 4 megabytes of network bandwidth to load resources

chromium86 Features:23

  1. A well-known URL for changing passwords

Websites can set a well-known URL for changing password /.well-known/change-password to be redirected to its change password page to help users change their password quickly. Chrome leverages this URL to help users change their passwords when it detects a weak password in the user’s password storage.

  1. Altitude/Azimuth for PointerEvents v3

Adds Altitude/Azimuth angles to PointerEvents. Adds TiltX/TiltY to Altitude/Azimuth transformation and Altitude/Azimuth to TiltX/TiltY transformation depending which pair is available from the device.

  1. Autoupgrade Image Mixed Content

This feature will autoupgrade optionally-blockable mixed content (HTTP content in HTTPS sites) by rewriting the URL to HTTPS, without a fallback to HTTP if the content is not available over HTTPS. Image mixed content autoupgrades by default are targeted for M86.

Audio/Video mixed content autoupgrades are separately tracked in https://www.chromestatus.com/feature/5557268741357568

  1. Back-forward cache on Android

Creates a cache for pages which allows for instant navigations to previously-visited pages after cross-site navigations.

  1. CSS ::marker pseudo-element

The ::marker pseudo-element represents the automatically generated marker box of a list item.

Like ::before and ::after, ::marker is a tree-abiding pseudo-element, so it always fit within the box tree.

But unlike ::before and ::after, currently it only accepts a small subset of safe properties, because the marker box layout is mostly undefined.

Note this intent only covers ::marker, not ::before::marker nor ::after::marker (see crbug.com/1097992).

  1. CSS Selectors 4 Pseudo-Class :focus-visible

The :focus-visible pseudo-class makes it easier for developers to create focus styles that appropriately match the user’s input modality. It is designed to help prevent a common anti-pattern where developers remove focus outlines for mouse users, and inadvertently make their sites inaccessible to keyboard users.

  1. Change MediaSettingsRange & PhotoCapabilities interfaces to dictionaries

Aggregates and logs media settings ranges and photo capabilities in JSON.

Changing MediaSettingsRange and PhotoCapabilities interfaces to dictionaries will improve developer ergonomics by allowing web developers to easily log and aggregate exposureCompensation, exposureTime, colorTemperature, iso, brightness, contrast, saturation, sharpness, focusDistance, pan, tilt, zoom, and photo capabilities (redEyeReduction, imageHeight, imageWidth, fillLightMode).

  1. Document-Policy header

Document Policy restricts the surface area of the web platform on a per-document basis, similar to iframe sandboxing, but more flexibly. It can do things like:

  • Restrict the use of poorly-performing images
  • Disable slow synchronous JS APIs
  • Configure iframe, image, or script loading styles
  • Restrict overall document sizes or network usage
  • Restrict patterns which cause page re-layout

This is just the HTTP header used to set a policy on a document, separate from any features.

  1. Document-Policy: force-load-at-top

ForceLoadAtTop provides an opt-out for Scroll To Text (and other load-on-scroll behaviors as they are also affected by the issues raised in https://github.com/WICG/scroll-to-text-fragment/issues/76) for privacy sensitive sites, as discussed in https://github.com/WICG/scroll-to-text-fragment/issues/80. The ForceLoadAtTop feature allows sites to indicate that they should always be loaded at the top of the page, blocking any scroll-on-load behaviors including text fragments, element fragments, and

  1. FetchEvent.handled

A FetchEvent dispatched to a service worker is in a loading pipeline, which is performance sensitive. The new FetchEvent.handled property returns a promise that resolves when a response is returned from a service worker to its client. This enables a service worker to delay tasks that can only run after responses are complete.

  1. File System Access

This API enables developers to build powerful apps that interact with other (non-Web) apps on the user’s device via the device’s file system. After a user grants a web app access, this API allows the app to read or save changes directly to files and folders selected by the user. Beyond reading and writing files, this API provides the ability to open a directory and enumerate its contents, as well as store file and directory handles in IndexedDB to later regain access to the same content.

  1. HTMLMediaElement.preservesPitch

Adds a property to determine whether the pitch of an audio or video element should be preserved when adjusting the playback rate.

  1. Imperative Shadow DOM Distribution API

Web developers can specify node-to-slot assignments imperatively in Shadow DOM slotting.

Please see the spec discussion [1] and the explainer [2].

  • [1] https://github.com/whatwg/html/issues/3534
  • [2] https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Imperative-Shadow-DOM-Distribution-API.md
  1. Intensive throttling of Javascript timer wake ups

In a Window whose top Window has been hidden for 5 minutes and which is not opted out from intensive wake up throttling, a timer task with non-zero timeout can run:

  • on a 1-second aligned wake up if:
    • the timer task’s nesting level is < 5, or,
      -the Window is same-origin with the top Window and at least 1 minute has elapsed since the last timer task with nesting level >= 5 has run in any Window in the tree that is same-origin with the top Window
  • on a 1-minute aligned wake up, otherwise.
  1. ParentNode.replaceChildren() Method

Replaces all children of the ParentNode with the passed-in nodes.

  1. Percent-encode U+007F DELETE when parsing URLs

When parsing URLs, encode the character U+007F DELETE as “%7F”.

This improves readability, reduces spoofing risk, makes Chrome’s behavior more consistent, interoperable with other browsers and compliant with the specification.

  1. Safelist distributed web schemes for registerProtocolHandler()

Extend the list of URL schemes that can be overridden via registerProtocolHandler() to include “cabal”, “dat”, “did”, “dweb”, “ethereum”, “hyper”, “ipfs”, “ipns”, and “ssb”.

  1. Third-party origin trials

Origin trials can now be enabled by embedded scripts, based on tokens matching their third-party origin. Previously, it was possible for scripts to enable origin trials, but only when the token matches the origin of the containing document.

  1. WebRTC Insertable Streams

This API enables the insertion of user-defined processing steps in the encoding and decoding of a WebRTC MediaStreamTrack.

  1. display:inline-grid/grid/inline-flex/flex for

The FIELDSET element will support ‘inline-grid’, ‘grid’, ‘inline-flex’ and ‘flex’ keywords for CSS ‘display’ property.

  1. document.fragmentDirective

This change moves window.location.fragmentDirective to document.fragmentDirective which seems like a more appropriate and safer place. It is a small change to the text-fragments feature in https://chromestatus.com/feature/4733392803332096.

Text-fragments introduced an empty object at window.location.fragmentDirective as a means to feature detect the newly added text-fragment capability. window.location turns out to be a bad place for this functionality, see https://crbug.com/1057795.

  1. text/html support for async clipboard api

The async clipboard api currently does not support the text/html format. This feature adds support for copying and pasting html from the clipboard. The HTML is sanitized when it is read and written to the clipboard.

  1. EME persistent-usage-record session

Support a new MediaKeySessionType “persistent-usage-record session”, for which the license and key(s) are not persisted and for which a record of key usage is persisted when the keys available within the session are destroyed.

chromium87 Features:18

  1. @font-face descriptors to override font metrics

Introduces new @font-face descriptors ascent-override, descent-override and line-gap-override to override metrics of the font. This allows web authors to (i) achieve interoperable text layout across browsers and platforms, and (ii) reduce layout shifting caused by web fonts.

  1. Atomics.waitAsync

Adds Atomics.waitAsync, the async version of Atomics.wait. Atomics.waitAsync allows programmers to wait on a SharedArrayBuffer location in the same fashion as Atomics.wait but returns a Promise instead.

  1. Block HTTP ports 5060 and 5061

Connections to HTTP, HTTPS or FTP servers on ports 5060 or 5061 will fail.

This is a mitigation for the slipstream attack: https://samy.pl/slipstream/. It helps developers by keeping the web platform safe for users.

  1. Block HTTP ports 69, 137, 161, 1719, 1720, 1723, and 6566

Connections to HTTP, HTTPS or FTP servers on ports 69, 137, 161, 1719, 1720, 1723 or 6566 will fail.

This is a mitigation for the NAT Slipstream 2.0 attack: https://www.armis.com/resources/iot-security-blog/nat-slipstreaming-v2-0-new-attack-variant-can-expose-all-internal-network-devices-to-the-internet/. It helps developers by keeping the web platform safe for users.

  1. CSS flow-relative shorthand and offset properties

Ship the already implemented properties introduced by CSS Logical Properties.
Specifically:

  • border-block, border-block-color, border-block-style, border-block-width
  • border-inline, border-inline-color, border-inline-style, border-inline-width
  • inset-block-start, inset-block-end, inset-inline-start, inset-inline-end
  • inset, inset-block, inset-inline
  • margin-block, margin-inline
  • padding-block, padding-inline
  1. CSS quotes property - support ‘auto’ value

Support ‘auto’ for the ‘quotes’ property.

CSS2 specified the initial value for ‘quotes’ as UA dependent, but WebKit and Blink returns an invalid value (empty string) which will not round-trip. Setting it to the empty string will remove the declaration instead of setting it to the initial value. css-content-3 instead uses an ‘auto’ keyword for the default UA behavior.

  1. Cookie Store API

The Cookie Store API exposes HTTP cookies to service workers and offers an asynchronous alternative to document.cookie.

  1. Intl.Segmenter

Intl.Segmenter implements methods for finding the location of boundaries in text, including grapheme,word and sentence boundary analysis.

  1. Is-Input-Pending

This API enables developers to complete their work as fast as possible if the user isn’t interacting, but respond to user input as fast as possible if input occurs.

  1. New TextMetrics object in canvas

We intended to add attributes FontBoundingBoxAscent and fontBoundingBoxDescent to textmetrics in canvas (following spec https://html.spec.whatwg.org/multipage/canvas.html#textmetrics). This feature will help web developers to arrange text better and it has strong user support (https://crbug.com/277215).

  1. Pan/Tilt support for Camera

This feature allows developers to pan and tilt the camera using media constraints in getUserMedia().

https://w3c.github.io/mediacapture-image/#dom-mediatracksupportedconstraints-pan

https://w3c.github.io/mediacapture-image/#dom-mediatrackcapabilities-tilt

  1. Range request header in a Service Worker

Range request header can be passed through a service worker if it’s not modified. This enables service workers can work with requests made by media elements such as video and audio.

  1. Streams API: transferable streams

The streams APIs provide ubiquitous, interoperable primitives for creating, composing, and consuming streams of data. A natural thing to do with a stream is to pass it to a web worker. This provides a fluent primitive for offloading work to another thread. Transferable streams add this capability by allowing ReadableStream, WritableStream, and TransformStream objects to be passed as arguments to postMessage().

  1. WakeLockSentinel.released Attribute

The WakeLockSentinel object has a new attribute called released that indicates whether a sentinel has already been released. Its value is initially false, and it changes to true once a “release” event is dispatched.

  1. cross-origin isolation

  2. Use origin instead of site as agent cluster key for cross-origin isolated agent clusters. document.domain mutation is no-op for agents in cross-origin isolated agent clusters.

  3. Introduce cross-origin isolated permission (https://w3c.github.io/webappsec-feature-policy/).

  4. Introduce self.crossOriginIsolated returning whether the surrounding agent cluster is cross-origin isolated and the environment has the cross-origin isolated permission.

  5. ontransition{run, start, cancel} event handler attributes

The ontransitionrun, ontransitionstart, and ontransitioncancel event handler attributes allow developers to add event listeners for ‘transitionrun’, ‘transitionstart’, and ‘transitioncancel’ events on elements, Document objects, and Window objects.

An example of how this might be used:

target.ontransitioncancel = () => { console.log(‘transition was cancelled!’); }

  1. text-decoration-thickness, text-underline-offset and from-font keyword for text-underline-position

Implement CSS text decoration properties text-decoration-thickness and text-underline-offset.

Add support for the new from-font keyword for text-underline-position.

When from-font keywords are used, support variable font MVAR underline scaling, (tags unds and undo in the MVAR table overriding underlinePosition and underlineThickness in the OpenType post table.

  1. -webkit-font-size-delta

Developers should use font-size to control font size.

Blink will no longer support the rarely used property
-webkit-font-size-delta.

chromium88 Features:17

  1. WebXR dynamic viewport scaling

Applications can optionally render to a subset of the WebXR viewport, using a scale factor that can be changed every animation frame.

This is intended to be more efficient than resizing the full framebuffer which requires reallocation, and the UA can supply a recommended scale factor based on internal heuristics.

  1. Align with Gecko and spec on grouping properties

The CSS transforms level 2 spec requires that any grouping property causes the used value
of transform-style to be flat. Chromium applies grouping for some of the specified grouping
properties, but not all. This change tracked here will add:

  • clip
  • clip-path
  • mask
  • backdrop-filter
  • isolation
  1. Anchor target=_blank implies rel=noopener by default

To mitigate “tab-napping” attacks, in which a new tab/window opened by a victim context may navigate that opener context, the HTML standard changed to specify that anchors that target _blank should behave as if |rel=“noopener”| is set. A page wishing to opt out of this behavior may set |rel=“opener”|.

  1. CSS Automatic Hyphenation for Windows/Linux/ChromeOS

Blink supports manual and none values of the CSS hyphens property since M55, but auto, which enables the automatic hyphenation, is supported only on Android and Mac.

This feature enables hyphens: auto on Windows, Linux, and ChromeOS by downloading dictionary files used in Android Open Source Project.

The previous feature entry for M55 is https://www.chromestatus.com/features/5642121184804864

  1. CSS Selectors 4 Pseudo-Classes :is(), :where()

The matches-any pseudo-class, :is(), is a functional pseudo-class taking a selector list as its argument. It represents an element that is represented by its argument.

  1. CSS Selectors 4: Complex :not()

Allows complex selectors inside the :not() pseudo class, such as :not(.a + .b .c).

  1. CSS aspect-ratio property

Normally, only certain replaced elements have an aspect ratio, particularly images. For them, if only one of width and height is specified, the other can be computed from it using the intrinsic aspect ratio.

This property allows explicitly specifying an aspect ratio for any other element to get similar behavior.

  1. Don’t clear adoptedStyleSheets on adoption to/from