四月在Servo:全新Android UI、焦点、表单、安全修复等

Lobsters Hottest 产品

摘要

Servo浏览器引擎发布了0.2.0版本,包含534次提交,新增了全新Android UI、web平台特性如<select multiple>、<template>、color-mix()、tab-size、安全修复以及新的DOM API。

<p><a href="https://lobste.rs/s/otyrox/april_servo_new_android_ui_focus_forms">评论</a></p>
查看原文
查看缓存全文

缓存时间: 2026/06/08 03:15

# Servo 四月更新:全新 Android 界面、焦点、表单、安全修复等! - Servo 旨在为开发者提供轻量、高性能的替代方案,以便在应用程序中嵌入网页技术。 - 来源:https://servo.org/blog/2026/05/31/april-in-servo/ **Servo 0.2.0** (https://github.com/servo/servo/releases/tag/v0.2.0) 包含了我们在四月提交的所有变更,再次刷新纪录,共有 **534 次提交**(三月:530)。安全修复请见 **§ 安全** (https://servo.org/blog/2026/05/31/april-in-servo/#security)。 servoshell 0.2.0 展示多项新特性:更好的中日韩文字换行、'tab-size'、改进的文件选择器和 `<select multiple>`、'::details-content::before' 和 '::details-content::after'、以及支持任意数量颜色的 'color-mix()' (https://servo.org/img/blog/2026-05-diffie.png) 我们发布了几项新的 Web 平台特性: - **<select multiple\>** (@lukewarlow (https://github.com/lukewarlow), @mrobinson (https://github.com/mrobinson), #43189 (https://github.com/servo/servo/pull/43189)) - **<template shadowrootslotassignment\>** (@simonwuelker (https://github.com/simonwuelker), #44246 (https://github.com/servo/servo/pull/44246)) - **<video\>** 在 OpenHarmony 上的播放 (@rayguo17 (https://github.com/rayguo17), #43208 (https://github.com/servo/servo/pull/43208)) - **'minimum-scale'** 和 **'maximum-scale'** 值在 **<meta name=viewport\>** 中 (@shubhamg13 (https://github.com/shubhamg13), #40098 (https://github.com/servo/servo/pull/40098), #43715 (https://github.com/servo/servo/pull/43715)) - **'color-mix()'** 支持 **任意数量的 <color\> 值** (@Loirooriol (https://github.com/Loirooriol), #43890 (https://github.com/servo/servo/pull/43890)) - **'&::before'** 和 **'&::after'** 在 **'::details-content'** 中 (@Loirooriol (https://github.com/Loirooriol), #43878 (https://github.com/servo/servo/pull/43878)) - **'revert-rule'** (@Loirooriol (https://github.com/Loirooriol), #43878 (https://github.com/servo/servo/pull/43878)) - **'tab-size'** (@mrobinson (https://github.com/mrobinson), @SimonSapin (https://github.com/SimonSapin), #44480 (https://github.com/servo/servo/pull/44480)) - **'text-align: match-parent'** (@TG199 (https://github.com/TG199), #44073 (https://github.com/servo/servo/pull/44073)) - **new Worker()** 支持 **blob URL** (@jdm (https://github.com/jdm), #44004 (https://github.com/servo/servo/pull/44004)) - **getContext(`"webgl"`)** 在 **OffscreenCanvas** 上 (@niyabits (https://github.com/niyabits), #44159 (https://github.com/servo/servo/pull/44159)) - **PerformanceMark** 和 **PerformanceMeasure** 上的 **detail** 属性 (@shubhamg13 (https://github.com/shubhamg13), #44289 (https://github.com/servo/servo/pull/44289), #44272 (https://github.com/servo/servo/pull/44272)) 另外还有一堆新的 DOM API: - **'selectionchange'** 事件在 `<input>` 和 `<textarea>` 上 (@TimvdLippe (https://github.com/TimvdLippe), #44461 (https://github.com/servo/servo/pull/44461)) - **StorageManager**,实验模式 (@Taym95 (https://github.com/Taym95), #43976 (https://github.com/servo/servo/pull/43976)) - **Document** 和 **ShadowRoot** 上的 **activeElement** (@mrobinson (https://github.com/mrobinson), #43861 (https://github.com/servo/servo/pull/43861)) - **crypto.subtle.supports()** (@kkoyung (https://github.com/kkoyung), #43703 (https://github.com/servo/servo/pull/43703)) – Servo 是首个支持此功能的主流浏览器引擎! - **HTMLTableElement** 上的 **cellPadding**、**cellSpacing** 和 **align** 属性 (@mrobinson (https://github.com/mrobinson), #43903 (https://github.com/servo/servo/pull/43903)) – 之前仅在 HTML 中支持 - **'focus'** 和 **'blur'** 事件上的 **relatedTarget** (@mrobinson (https://github.com/mrobinson), #43926 (https://github.com/servo/servo/pull/43926)) - **ImageBitmapRenderingContext** 上的 **transferFromImageBitmap()** (@Messi002 (https://github.com/Messi002), #43984 (https://github.com/servo/servo/pull/43984)) Servo 对 **中文**、**日文** 和 **韩文** 文本的支持得到了改进:布局引擎实现了正确换行 (@SharanRP (https://github.com/SharanRP), #43744 (https://github.com/servo/servo/pull/43744)),并且在 Windows、Linux 和 FreeBSD 上,servoshell 的浏览器 UI 中启用了中日韩字体 (@yezhizhen (https://github.com/yezhizhen), @CynthiaOketch (https://github.com/CynthiaOketch), @nortti0 (https://github.com/nortti0), #44055 (https://github.com/servo/servo/pull/44055), #44138 (https://github.com/servo/servo/pull/44138), #44514 (https://github.com/servo/servo/pull/44514))。 导航到 **JSON 文件** 作为顶层文档时,现在会使用 **交互式美化打印器** 渲染 JSON (@webbeef (https://github.com/webbeef), @TimvdLippe (https://github.com/TimvdLippe), #43702 (https://github.com/servo/servo/pull/43702))。 四月对 Servo 来说是一个重要里程碑:一些自动化测试因为硬编码了 Cookie 过期日期(2016 年 4 月加十年)而失败。惊喜吧!我们还在坚持。为 Servo 接下来的 100 年干杯 (@jdm (https://github.com/jdm), #44341 (https://github.com/servo/servo/pull/44341))。 本次更新内容很多,以下是概要: - **安全** (https://servo.org/blog/2026/05/31/april-in-servo/#security) - **进行中的工作** (https://servo.org/blog/2026/05/31/april-in-servo/#work-in-progress) - **servoshell** (https://servo.org/blog/2026/05/31/april-in-servo/#servoshell) - **面向开发者** (https://servo.org/blog/2026/05/31/april-in-servo/#for-developers) - **嵌入 API** (https://servo.org/blog/2026/05/31/april-in-servo/#embedding-api) - **更多 Web 平台内容** (https://servo.org/blog/2026/05/31/april-in-servo/#more-on-the-web-platform) - **性能与稳定性** (https://servo.org/blog/2026/05/31/april-in-servo/#performance-and-stability) ## 安全 (https://servo.org/blog/2026/05/31/april-in-servo/#security) **CryptoKey** 现在会在使用后清零包含密钥材料的缓冲区 (@kkoyung (https://github.com/kkoyung), #44597 (https://github.com/servo/servo/pull/44597))。 除少数例外外,你只能在另一个文档位于 **同源** 时访问其 DOM API。但如果该文档位于同一 **站点** 但端口不同,Servo 之前错误地允许了这些访问。我们已经修复了部分(并非全部)错误访问,特别是那些在此文档中绑定 Window 或 Location 方法、但 `this` 来自另一个文档的情况 (@yvt (https://github.com/yvt), @jdm (https://github.com/jdm), #28583 (https://github.com/servo/servo/pull/28583))。 已修复一个 bug:**localStorage** 和 **sessionStorage** 在 **沙箱化 <iframe\>** 中可用,并且与所有其他沙箱化 <iframe> 共享,而不是抛出 SecurityError (@Taym95 (https://github.com/Taym95), #44002 (https://github.com/servo/servo/pull/44002))。 已修复一个 bug:**localStorage** 和 **sessionStorage** 在所有 **<iframe srcdoc\> 文档** 之间共享,而不是根据包含文档的源进行隔离 (@niyabits (https://github.com/niyabits), #43988 (https://github.com/servo/servo/pull/43988), #44038 (https://github.com/servo/servo/pull/44038))。 已修复一个 bug:**IndexedDB** 在 **沙箱化 <iframe\>** 和 **data: URL web workers** 中可用 (@Taym95 (https://github.com/Taym95), #44088 (https://github.com/servo/servo/pull/44088))。 已修复一个 bug:某些 **IP 地址源** 中的页面可以驱逐其他 IP 地址源的 cookie (@officialasishkumar (https://github.com/officialasishkumar), #44152 (https://github.com/servo/servo/pull/44152))。之前只能驱逐 cookie,不能读取或写入。 已修复 **WebGL2RenderingContext** 的 **texImage3D()** 中的一个 **越界内存读取** 问题 (@simartin (https://github.com/simartin), #44270 (https://github.com/servo/servo/pull/44270)),并修复了 servoshell 信号处理程序中的一些未定义行为 (@Narfinger (https://github.com/Narfinger), #43891 (https://github.com/servo/servo/pull/43891))。 ## 进行中的工作 (https://servo.org/blog/2026/05/31/april-in-servo/#work-in-progress) **IndexedDB** 现在已在 servoshell 的实验模式下启用 (@arihant2math (https://github.com/arihant2math), #44245 (https://github.com/servo/servo/pull/44245))。一如既往,嵌入者可以通过 `Preferences` (https://doc.servo.org/servo/struct.Preferences.html)::`dom_indexeddb_enabled` (https://doc.servo.org/servo/struct.Preferences.html#structfield.dom_indexeddb_enabled) 来启用它 (@arihant2math (https://github.com/arihant2math), #44245 (https://github.com/servo/servo/pull/44245), #44283 (https://github.com/servo/servo/pull/44283))。 IndexedDB 现在使用 Servo 新的 **“客户端存储”** 系统,该系统基于存储标准 (https://storage.spec.whatwg.org/),将使我们能够为所有持久存储数据的 Web 平台特性提供统一的磁盘格式和配额管理 (@gterzian (https://github.com/gterzian), #44374 (https://github.com/servo/servo/pull/44374), #43900 (https://github.com/servo/servo/pull/43900))。 我们还提高了键范围查询的效率 (@arihant2math (https://github.com/arihant2math), #39009 (https://github.com/servo/servo/pull/39009)),并完成了对 IDBDatabase、IDBObjectStore、IDBCursor、IDBKeyRange、IDBRequest 以及事务、键、值和异常处理的多项改进 (@Taym95 (https://github.com/Taym95), #44128 (https://github.com/servo/servo/pull/44128), #43901 (https://github.com/servo/servo/pull/43901), #44009 (https://github.com/servo/servo/pull/44009), #43914 (https://github.com/servo/servo/pull/43914), #44161 (https://github.com/servo/servo/pull/44161), #44183 (https://github.com/servo/servo/pull/44183), #44059 (https://github.com/servo/servo/pull/44059), #44215 (https://github.com/servo/servo/pull/44215), #42998 (https://github.com/servo/servo/pull/42998), #43805 (https://github.com/servo/servo/pull/43805))。 我们在 **IntersectionObserver API** 上取得了更多进展,可通过 `--pref dom_intersection_observer_enabled` 启用 (@stevennovaryo (https://github.com/stevennovaryo), @jdm (https://github.com/jdm), #42204 (https://github.com/servo/servo/pull/42204))。 我们继续实现 **document.execCommand()** 以支持 **富文本编辑** (@TimvdLippe (https://github.com/TimvdLippe), #44529 (https://github.com/servo/servo/pull/44529)),可通过 `--pref dom_exec_command_enabled` 启用。此版本增加了对 **'bold'**、**'fontName'**、**'fontSize'**、**'italic'**、**'strikethrough'** 和 **'underline'** 命令的支持 (@TimvdLippe (https://github.com/TimvdLippe), @jdm (https://github.com/jdm), @mrobinson (https://github.com/mrobinson), #44511 (https://github.com/servo/servo/pull/44511), #43287 (https://github.com/servo/servo/pull/43287), #44432 (https://github.com/servo/servo/pull/44432), #44410 (https://github.com/servo/servo/pull/44410), #44194 (https://github.com/servo/servo/pull/44194), #44030 (https://github.com/servo/servo/pull/44030), #44039 (https://github.com/servo/servo/pull/44039), #44041 (https://github.com/servo/servo/pull/44041), #44075 (https://github.com/servo/servo/pull/44075), #44234 (https://github.com/servo/servo/pull/44234), #44250 (https://github.com/servo/servo/pull/44250), #44331 (https://github.com/servo/servo/pull/44331), #44390 (https://github.com/servo/servo/pull/44390), #44137 (https://github.com/servo/servo/pull/44137), #44293 (https://github.com/servo/servo/pull/44293), #44312 (https://github.com/servo/servo/pull/44312), #44347 (https://github.com/servo/servo/pull/44347))。 上述所有特性均在 servoshell 的实验模式下启用。 Servo 现在可以为网页内容构建一个非常基础的 **无障碍树**,可通过 `--pref accessibility_enabled` 启用 (@alice (https://github.com/alice), @delan (https://github.com/delan), @lukewarlow (https://github.com/lukewarlow), #42338 (https://github.com/servo/servo/pull/42338), #43558 (https://github.com/servo/servo/pull/43558), #44437 (https://github.com/servo/servo/pull/44437), #44438 (https://github.com/servo/servo/pull/44438))。这包括文本运行,以及其他 9 个非交互式无障碍角色 (@alice (https://github.com/alice), @delan (https://github.com/delan), #44255 (https://github.com/servo/servo/pull/44255))。我们还修复了在启用无障碍功能时重新加载页面导致的崩溃 (@alice (https://github.com/alice), #44473 (https://github.com/servo/servo/pull/44473)),并使无障碍树更新更高效 (@alice (https://github.com/alice), #44208 (https://github.com/servo/servo/pull/44208))。 我们开始实现 **Sanitizer API**,可通过 `--pref dom_sanitizer_enabled` 启用 (@kkoyung (https://github.com/kkoyung), #44198 (https://github.com/servo/servo/pull/44198), #44290 (https://github.com/servo/servo/pull/44290), #44335 (https://github.com/servo/servo/pull/44335), #44421 (https://github.com/servo/servo/pull/44421), #44452 (https://github.com/servo/servo/pull/44452), #44481 (https://github.com/servo/servo/pull/44481), #44585 (https://github.com/servo/servo/pull/44585), #44594 (https://github.com/servo/servo/pull/44594))。 我们还开始实现 **SharedWorker**,可通过 `--pref dom_sharedworker_enabled` 启用 (@Taym95 (https://github.com/Taym95), #44375 (https://github.com/servo/servo/pull/44375), #44440 (https://github.com/servo/servo/pull/44440))。 我们也在开发 **WakeLock API**,可通过 `--pref dom_wakelock_enabled` 启用 (@TG199 (https://github.com/TG199), @rovertrack (https://github.com/rovertrack), #43617 (https://github.com/servo/servo/pull/43617), #44343 (https://github.com/servo/servo/pull/44343))。 ## servoshell (https://servo.org/blog/2026/05/31/april-in-servo/#servoshell) Android 版 servoshell 现在拥有 **全新的浏览器 UI**,包括一个新的 **历史视图** (@espy (https://github.com/espy), #43795 (https://github.com/servo/servo/pull/43795)),**apk 体积缩小了 30%** (@jschwe (https://github.com/jschwe), #44278 (https://github.com/servo/servo/pull/44278), #44182 (https://github.com/servo/servo/pull/44182)),我们还修复了关闭设置或从其他应用切换回来时出现的黑屏 bug (@yezhizhen (https://github.com/yezhizhen), #44327 (https://github.com/servo/servo/pull/44327))。 现在也可以在 OpenHarmony 上关闭标签页了 (@Narfinger (https://github.com/Narfinger), #42713 (https://github.com/servo/servo/pull/42713))。 servoshell 0.2.0 展示 Android 上全新设计的浏览器 UI。从左到右:浏览网页、设置视图、历史视图 (https://servo.org/img/blog/2026-05-android.png) 对于桌面平台的 servoshell,我们修复了一些焦点和 IME 相关的 bug (@mrobinson (https://github.com/mrobinson), #43872 (https://github.com/servo/servo/pull/43872), #43932 (https://github.com/servo/servo/pull/43932));在 Windows 上,我们现在会安装一个普通的快捷方式,而不是带有奇怪行为的“广告式”快捷方式 (@yezhizhen (https://github.com/yezhizhen), #44223 (https://github.com/servo/servo/pull/44223))。 ## 面向开发者 (https://servo.org/blog/2026/05/31/april-in-servo/#for-developers) 使用 Firefox **DevTools** 中的 **Inspector** 标签页时,**Rules** 面板现在会包含 **'@layer' 规则** 中的声明 (@arabson99 (https://github.com/arabson99), #43912 (https://github.com/servo/servo/pull/43912))。 在 **Console** 标签页中 **记录表达式** 时,以及在 **Debugger** 标签页中 **悬停符号** 时,你现在可以获得有关函数、数组、对象和其他值内容的更多信息 (@atbrakhi (https://github.com/atbrakhi), @eerii (https://github.com/eerii), #44172 (https://github.com/servo/servo/pull/44172), #44173 (https://github.com/servo/servo/pull/44173), #44022 (https://github.com/servo/servo/pull/44022), #44233 (https://github.com/servo/servo/pull/44233), #44196 (https://github.com/servo/servo/pull/44196), #44181 (https://github.com/servo/servo/pull/44181))。

相似文章

探索新的 `servo` crate

Simon Willison's Blog

Servo 浏览器引擎现在作为一个可嵌入的 Rust crate (v0.1.0) 可用,使开发者能够将网页渲染能力集成到 Rust 应用中。一个新的 CLI 工具 `servo-shot` 展示了其使用基于软件渲染管线将网页渲染为 PNG 的能力。

Angular v22

Hacker News Top

Angular v22 发布,将 Signal Forms、Angular Aria 和 Asynchronous Reactivity APIs 提升至生产就绪状态,并带来了各种稳定性和易用性改进。

Forgejo v15.0 已发布

Lobsters Hottest

Forgejo v15.0 于 2026 年 4 月 16 日发布,迎来了第 100 次版本更新。本次发布带来了用户界面优化、安全性增强、仓库级访问令牌支持,以及更强大的 Forgejo Actions 功能(包括可复用工作流扩展和 OpenID Connect 支持)。

Ladybird browser update (May 2026)

Lobsters Hottest

The May 2026 update for Ladybird browser brings major improvements in real-world site compatibility (e.g., passes Cloudflare Turnstile, enables MSE), responsiveness (async scrolling, JS bytecode caching, WASM JIT with Cranelift, incremental sweeping), and infrastructure (Rust HTML parser, ad-blocking via adblock-rust, CSS container queries).