Safari Technology Preview 240: Key WebKit Enhancements and Bug Fixes

From Moocchen, the free encyclopedia of technology

The latest iteration of Apple's experimental browser, Safari Technology Preview 240, is now available for download on macOS Tahoe and macOS Sequoia. Existing users can update via System Settings under General → Software Update. This release incorporates a range of WebKit improvements from revisions 308418 to 309286, focusing on refining CSS, editing, forms, HTML, and media handling. Below, we break down the most notable changes and what they mean for developers and users alike.

CSS Enhancements

New Features

A standout addition in this release is support for the revert-rule CSS keyword. This new keyword allows developers to roll back the cascade of a specific style rule, effectively making it as if the rule were never applied. This provides finer control over style inheritance and can simplify complex stylesheets by avoiding the need for elaborate specificity workarounds. (308733@main)

Safari Technology Preview 240: Key WebKit Enhancements and Bug Fixes
Source: webkit.org

Resolved Issues

Several CSS bugs have been addressed:

  • Custom scrollbar clipping on macOS: A fix ensures that custom CSS scrollbars are no longer cut off, and the scrollbar corner rectangle is now correctly sized. This resolves a visual glitch that affected aesthetic scrollbar designs. (309119@main)
  • Hanging punctuation for quotes: The hanging-punctuation property now correctly supports apostrophes (U+0027) and quotation marks (U+0022) as hangable characters, aligning with typographic expectations. (308597@main)
  • Ideographic space handling: The ideographic space character (U+3000) can now properly “hang” when used as the first value in hanging-punctuation. This improves text layout in CJK environments. (308605@main)

Editing Improvements

The editing experience has received several critical fixes:

  • Font Picker usability: Previously, the Font Picker style selection became unresponsive after changing fonts during multi-line text edits. This bug has been resolved, ensuring a smooth workflow for content creators. (308562@main)
  • Emoji preservation across sites: Emoji images are now correctly preserved when copying and pasting content between different websites. This fix maintains visual consistency in cross-site content transfer. (309176@main)
  • Selection jumps with absolute positioning: Text selection no longer jumps unexpectedly when selecting absolutely-positioned elements inside a container with user-select: none. This enhances text selection reliability in complex layouts. (308451@main)

Forms and HTML

Forms

A single but impactful fix addresses keyboard tabbing: when a focused button becomes disabled, the tabbing position is no longer lost, preventing focus from resetting to the beginning of the page. This improves accessibility and form navigation. (308991@main)

HTML Parsing

  • Viewport meta parsing: The viewport <meta> tag now correctly treats form feed as ASCII whitespace, as required by the HTML specification. This aligns Safari with standard parsing behavior. (309044@main)
  • Pixel-length margin attributes: Parsing of pixel-length margin attributes on <body>, <iframe>, and <frame> elements has been corrected, ensuring accurate rendering of these legacy attributes. (308526@main)

Media Enhancements

The media subsystem received the most attention in this release, with numerous fixes targeting playback, decoding, and accessibility:

  • WebM audio with >2 channels: Decoding WebM audio files with more than two channels now works correctly, expanding support for multi-channel audio content. (308749@main)
  • VP8 in WebM support detection: MediaCapabilities.decodingInfo() no longer incorrectly reports VP8 in WebM as unsupported, helping developers accurately assess playback capabilities. (308789@main)
  • Opus in MP4 decoding: MP4 files containing Opus audio tracks can now be decoded with decodeAudioData, enhancing audio format compatibility. (309140@main)
  • Live Text in fullscreen video: Live Text selection is now available on paused fullscreen videos, allowing users to interact with text displayed in video frames. (308498@main)
  • FairPlay and VP9 via MediaSource: FairPlay-protected VP9 content now plays successfully when delivered via MediaSource, broadening DRM support. (308622@main)
  • Autoplay timing with text tracks: Autoplay no longer proceeds before default text tracks have finished loading, preventing playback issues with captions and subtitles. (308796@main)
  • currentTime getter fix: The currentTime getter now returns defaultPlaybackStartPosition when no media player exists, improving consistency in media element behavior. (308654@main)
  • timeupdate event reset: HTMLMediaElement now correctly fires a timeupdate event when resetting the playback position during media load, as required by the specification. This ensures developers receive proper playback state updates. (308695@main)
  • Preload attribute: An issue where the media player preload attribute was not being respected in certain scenarios has been fixed (details in the original changelog).

Summary

Safari Technology Preview 240 brings a mix of meaningful CSS enhancements and targeted bug fixes across editing, forms, HTML, and media. For web developers, the revert-rule keyword offers new styling flexibility, while the media fixes improve compatibility with modern audio and video formats. The update is available now for macOS Tahoe and Sequoia, and we recommend downloading it to test your sites and applications against the latest WebKit changes.