New WebKit Features in Safari 15.5

After the feature-packed release of Safari 15.4 two months ago, WebKit’s work for this version of Safari focused predominately on polishing existing features and fixing bugs.

Safari 15.5 does contain three new technologies for web developers — support for the inert property in HTML; support for the worker-src Content Security Policy directive; and the new minimumViewportInset and maximumViewportInset APIs for implementing new CSS Viewport Units in WKWebView-based apps.

Safari 15.5 is available for macOS Monterey 12.4, macOS Big Sur, macOS Catalina, iPadOS 15.5, and iOS 15.5. You can update to Safari 15.5 on macOS Big Sur and macOS Catalina by going to System Preferences → Software Update → More info, and choosing to update Safari.

Developer Features

Let’s look first at the HTML inert attribute. When set on an element, the attribute makes that element non-interactive by preventing mouse and keyboard focus, clicks, edits or text selection. It also hides the element from assistive technologies. For more information about inert, including a demo showing how inert can make the partially-offscreen content in a carousel visible, but inactive, read Non-interactive Elements with the inert Attribute.

Next, let’s look at support for worker-src from Content Security Policy Level 3. The worker-src directive provides web developers a way to restrict which URLs are allowed to be sources for worker scripts (Worker, SharedWorker, or ServiceWorker). This can be used to prevent already loaded scripts from loading more scripts in the form of workers, a situation that has potential to be susceptible to malicious attack through using excessive CPU for computation. We also updated Content Security Policy console logging in Web Inspector.

And last, we’ve added the minimumViewportInset and maximumViewportInset APIs to WKWebView so app developers can add support for all of the new CSS Viewport Units to their browser or other application on iOS, iPadOS and macOS. The minimumViewportInset corresponds to the large measurement, and maximumViewportInset corresponds to the small measurement. The new CSS Viewport Units, which shipped in Safari 15.4, include small (svw, svh, svi, svb, svmin, svmax), large (lvw, lvh, lvi, lvb, lvmin, lvmax), dynamic (dvw, dvh, dvi, dvb, dvmin, dvmax), and logical (vi, vb) units.

Fixes and Polish

Now, let’s get to the list of bug fixes and feature polish.

HTML

  • Fixed SVG tags behind modal dialogs to not be clickable
  • Fixed the Dialog element only animating once
  • Fixed rendering a USDZ loaded as the main resource
  • Fixed uploading “.pages” files to file inputs accepting “.pages” and “.jpeg” files

Web API

  • Prevented BroadcastChannel from communicating across distinct opaque origins
  • Fixed respecting website policies during COOP-based process swap
  • Fixed PointerEvent.movementX always 0
  • Fixed resolving a fetch promise when a page enters page cache
  • Fixed pointer events to perform a hit test only if there is not a pointer capture target override
  • Fixed computing the site for cookies when the document is created by window.open
  • Fixed Element.focus({preventScroll: true}) to correctly prevent scrolling on iOS

CSS

  • Fixed scrolling background-attachement: fixed
  • Fixed background-clip: text to work with display: flex
  • Fixed rendering for many position: sticky elements
  • Fixed position: sticky elements moving incorrectly while scrolling
  • Fixed text contents in <span> with opacity not updating when a sibling element has will-change: transform
  • Fixed :focus-visible matching on the wrong element when focused via script
  • Fixed text-shadow getting clipped
  • Fixed behavior of a position: sticky element within contain: paint
  • Fixed aspect-ratio with percentage widths
  • Fixed returning the default computed style for elements without the transition or animation shorthands

Authentication

  • Aligned WebAuthn implementation to match specifications to use the default pubKeyCredParams list if the list in makeCredential is empty

Content Security Policy

  • Fixed blocking image content in object elements
  • Fixed sending violation reports to the document for a detached element
  • Improved nonce hiding from the DOM
  • Updated Content Security Policy handling of JavaScript URLs

Media

  • Fixed key rotation for single key audio in modern EME paired with a native HLS player
  • Fixed disabled Control Center spatial control when playing a video in Safari
  • Fixed loading a model in QuickLook when passing extra parameters
  • Fixed muted video that sometimes becomes paused when taken to fullscreen
  • Fixed video playback on iPhone 7
  • Fixed video playback for HEVC content encodings that generate many b-frames with a wide sliding window
  • Fixed HLS stream currentTime sometimes jumping backwards
  • Fixed clicking on the progress bar often pausing a YouTube video
  • Fixed blob videos slowing to pause
  • Fixed audio echo after the camera us paused or unpaused
  • Fixed playback of HTML5 embedded audio with unbounded range requests
  • Fixed the video poster disappearing prematurely on play, leaving a transparent video element

WebRTC

  • Fixed incorrect label returned by getUserMedia regardless of language selected
  • Reduced perceived audio latency

Rendering

  • Fixed text wrapping for windows that exceed a certain width
  • Fixed a Korean webfont rendering issue
  • Fixed an issue where a transform change sometimes resulted in bad rendering
  • Fixed a flash of missing text content with transform-related animations
  • Changed to use colgroup for table sizing when it comes after thead, tbody, tfoot, or tr elements
  • Fixed two bopomofo tone marks to move to the correct place in vertical text with a particular bopomofo font

Apple Pay

  • Fixed the Apple Pay Sheet to return billingContact on iOS

WebGL

  • Fixed WebGL rendering when using preserveDrawingBuffer on iOS
  • Fixed a number of issues related to multisampling that were breaking a lot of WebGL content
  • Fixed handling TypedArray with AllowShared to be accepted
  • Fixed WEBGL_multi_draw validation

Web Inspector

  • Fixed large message handling from remote devices
  • Fixed repeated opening and closing

Compatibility

  • Fixed launching Microsoft Teams from Safari

SFSafariViewController

  • Fixed a noticeable delay in playback when rotating a full screen YouTube video

Safari Extensions

  • Fixed a crash clicking on Safari App Extension toolbar items
  • Fixed an issue where SFContentBlockerManager.getStateOfContentBlocker() could return an incorrect value on iOS
  • Added support for optional_host_permissions for Safari Web Extensions

Feedback

We love hearing from you. Send a tweet to @webkit, @jensimmons or @jonathandavis to share your thoughts on this release. If you run into any issues, we welcome your feedback on the Safari UI or your WebKit bug report about web technology. Filing issues really does make a difference.

Download the latest Safari Technology Preview to stay at the forefront of the web platform and to use the latest Web Inspector features. You can also use the WebKit Feature Status page to watch for new information about the web features that interest you the most.

And More

For more information on what’s in WebKit for Safari 15.5, read the Safari 15.5 release notes.

These features were first released in Safari Technology Preview: 140, 141, 142, 143, 144, and 145.