Igalia and WebKit:
Status update and plans
WebKit Contributors Meeting 2023
Cupertino (CA), 24-25 October 2023
Mario Sánchez Prada
mario@igalia.com
1
About me
CS Engineer, partner of Igalia
Involvement in some Open Source communities
e.g. GNOME, WebKit (WebKitGTK, a11y), Chromium
Other work done in the past:
Linux-based OS’s (i.e. Endless OS, Litl OS)
Maemo (Hildon Application Manager)
Samsung SmartTV platform
Currently coordinating Igalia's WebKit team
2
3
About Igalia
Specialized Open Source consultancy, founded in 2001
Fully remote, headquartered in A Coruña, Galicia (Spain)
Worker-owned, employee-run, flat structure (140+ igalians)
Top contributors to the main Web Rendering Engines:
WebKit, Chromium, Gecko and Servo
Active contributor to other areas and OSS projects
V8, SpiderMonkey, JSC, LLVM, Node.js, GStreamer, Mesa, Linux Kernel...
Members of several working groups:
W3C, WHATWG, WPT, TC39, OpenJS, Test262, Khronos...
https://www.igalia.com
4
Igalia and WebKit
5
Igalia and WebKit
Maintainers of the two upstream Linux-based WebKit ports
WebKitGTK: aimed at desktop (i.e. go-to solution for GTK applications)
WPE: aimed at embedded (i.e. low resources footprint, extra flexibility...)
Implementation of Web standards and JavaScript features
Port-independent contributions to WebCore and JavaScriptCore
Other:
e.g. bugfixing, security, performance improvements, QA, 32-bit support...
6
Examples of WebKit on embedded
Smart TVs, set-top-boxes and video game consoles
Smart home appliances and home automation devices
HiFi audio/sound systems & music streaming
In-vehicle and in-flight infotainment systems
Navigational and GPS-based instrumentation
Medical devices (e.g. patient health monitors)
Digital signage
QA & testing
7
Who are our users?
Port users (e.g. native apps developers, integrators...)
Platform providers (e.g. Web-based frameworks)
Web developers (e.g. Web applications)
End users!
8
Strategic goals
Web platform compatibility, interoperability
Performance and efficiency in small embedded devices
Quality assurance and Security
Better development tools and documentation
More efficient collaboration:
e.g. ports alignment (fewer different architectures, less port-specific code), better communication
increased collaboration among different teams...
9
Recent work
10
WebKit contributions 2023
Still the #2 committer in 2023 so far with 10.9% of all commits
11
WebKit contributions 2023
Zooming in: ~50% of all the non-Apple commits coming from Igalia
12
Main highlights
Web platform contributions
Graphics & Multimedia
JavaScriptCore
New WPE API
WebKit on Android
Quality assurance
Security
Development tools
13
Web platform contributions
CSS properties: content-visibility
content-visibility: auto particularly useful on large pages
HTML Fetch Priority attributes
Optimize resource loading
Popover API
Easy creation of native pop-over elements
Secure Curves in the Web Cryptography API
Algorithms Ed25519 and X25519 in WebKitGTK
Algorithm X25519 in the Mac port
14
Graphics
WebKitGTK and WPE graphics rendering architecture
Finished ANGLE integration and added WebGL2 support
Buffer sharing architecture (i.e. DMAbuf in linux)
Removed dependency on the internal Wayland server
Synchronization using displayLink architecture
2D rendering engine replacement for cairo
Experimental GPUProcess support (WIP).
New SVG engine (LBSE: Layer-Based SVG Engine)
SVG layers support as a 1st-class citizen in the engine
Enables HW acceleration for SVG rendering
15
Multimedia
DMABuf-based sink for HW-accelerated video
WebCodecs audio encoder/decoder from IDL to platform layers
Improvements on WebCodecs video encoder/decoder
GStreamer-based WebRTC backends
Improved video loop behaviour
Improved power comsumption (e.g. auto-play, muted videos)
General maintenance (e.g. MSE, EME...)
16
JavaScriptCore
ARMv7 improvements (32-bit)
Improved code generation for stack load/save in Air on ARMv7
Reduces generated code size for WASM by ~30%
Worked on Concurrent JIT
Worked on WASM BBQJIT (99% done)
Worked on the B3 low level optimizer
Needed to enable OMG for WASM and FTL for JavaScript
WASM GC
Contribute initial implementation (WIP)
17
New WPE API
Several problems with current model
Started working in a new proposal that will be part of WebKit
We started submitting patches to upstream the changes (WIP)
18
WebKit on Android
Goal: WebKit-based alternative to Android WebView
No new port needed, just the WPE's public API
Multiple architectures: arm64, armv7, x86-64, x86
Native integration with Android
HW acceleration and WebGL support
19
Quality Assurance
Increased gardening effort on WebKitGTK and WPE
Increased amount of tests running on WebKitGTK and WPE:
WebKitGTK: from ~62.5K to 69.5K tests (+11.2%)
WPE: from ~56K to 62.5K tests (+11.6%)
Reduced amount of skipped tests on WebKitGTK and WPE:
WebKitGTK: from ~14K tests to.7K tests (-10.2%)
WPE: from ~21.2K to 20K tests (-6%)
20
Quality Assurance
21
Security
Major, minor and unstable releases:
Feature (major) releases every 6-months (march, september)
Minor releases (i.e. bugfixes) and development releases
Aligned releases for WebKitGTK and WPE:
&
WebKit Security Advisories (WSA):
&
https://webkitgtk.org/releases https://wpewebkit.org/release
https://webkitgtk.org/security.html https://wpewebkit.org/security
22
Tooling and documentation
Problem: complex develpment environment:
Dependency on different libraries (and not all versions supported)
JHBuild not great for reproduceability; flatpak not great for development
Solution: container-based SDK (OCI compatible)
Reproduceable and share-able environment, it includes all the usual tools
Cover all the development workflows (including hacking on dependencies)
23
Next Steps
24
Web Platform contributions
Add support for
New API to manage browser navigation actions and examine history
Add support for
Attribute of the NavigateEvent interface
True if the UA performed a visual transition before a navigation event
Navigation API
hasUAVisualTransition
25
Graphics
WebKitGTK and WPE graphics rendering architecture
Completely integrate displayLink architecture, simplify and refactor
Extend the use of the DMAbuf architecture (API change in WPE)
2D rendering engine replacement for cairo
Integrate GPUProcess support.
New SVG engine (LBSE):
Finish upstreaming the remaining patches
Ensure good test coverage and no performance regressions
Turn on LBSE by default and remove the legacy SVG engine
26
Multimedia
Implementation of the GStreamer WebRTC backend
Improve WebCodecs integration with WebGL and WebAudio
General maintenance (e.g. MSE, EME...)
27
JavaScriptCore
Finish work on ARMv7 improvements:
Concurrent JIT
WASM BBQJIT (99% done)
Enable OMG for WASM and FTL for JavaScript
Need to finish implementing B3 support first
Investigate and optimize heap/JIT memory usage in 32-bit
WASM GC:
Land patches to provide full support and ship the feature
28
New WPE API
Finish initial version of the new API & start upstreaming ASAP
Review all API docs and write guides and tutorials
Deprecate the old API (won't be removed in the short term)
⚠️No specific release date (i.e. best-effort)
29
WebKit on Android
Goal: first usable version of WPE Android
Immediate steps:
Update to the latest stable version of WPE
WebDriver support + Web Platform Test suite
Implement missing functionality
Conformance testing
Other: HTTP/2 support, WebInspector...
30
Quality Assurance
Improve QA processes for WebKitGTK and WPE
Use the new SDK in the bots simplifying the QA procedure
Keep using flatpak for releasing nightlies (i.e. Epiphany Tech Preview)
Prepare GTK bots to use GTK4 by default
31
Tooling and documentation
Release initial version of the new SDK:
Finish the remaining features & tests in the SDK
Upload proper documentation and tutorials
32
Questions?
33
Thanks!
34
35

Igalia and WebKit: Status update and plans

  • 1.
    Igalia and WebKit: Statusupdate and plans WebKit Contributors Meeting 2023 Cupertino (CA), 24-25 October 2023 Mario Sánchez Prada mario@igalia.com 1
  • 2.
    About me CS Engineer,partner of Igalia Involvement in some Open Source communities e.g. GNOME, WebKit (WebKitGTK, a11y), Chromium Other work done in the past: Linux-based OS’s (i.e. Endless OS, Litl OS) Maemo (Hildon Application Manager) Samsung SmartTV platform Currently coordinating Igalia's WebKit team 2
  • 3.
  • 4.
    About Igalia Specialized OpenSource consultancy, founded in 2001 Fully remote, headquartered in A Coruña, Galicia (Spain) Worker-owned, employee-run, flat structure (140+ igalians) Top contributors to the main Web Rendering Engines: WebKit, Chromium, Gecko and Servo Active contributor to other areas and OSS projects V8, SpiderMonkey, JSC, LLVM, Node.js, GStreamer, Mesa, Linux Kernel... Members of several working groups: W3C, WHATWG, WPT, TC39, OpenJS, Test262, Khronos... https://www.igalia.com 4
  • 5.
  • 6.
    Igalia and WebKit Maintainersof the two upstream Linux-based WebKit ports WebKitGTK: aimed at desktop (i.e. go-to solution for GTK applications) WPE: aimed at embedded (i.e. low resources footprint, extra flexibility...) Implementation of Web standards and JavaScript features Port-independent contributions to WebCore and JavaScriptCore Other: e.g. bugfixing, security, performance improvements, QA, 32-bit support... 6
  • 7.
    Examples of WebKiton embedded Smart TVs, set-top-boxes and video game consoles Smart home appliances and home automation devices HiFi audio/sound systems & music streaming In-vehicle and in-flight infotainment systems Navigational and GPS-based instrumentation Medical devices (e.g. patient health monitors) Digital signage QA & testing 7
  • 8.
    Who are ourusers? Port users (e.g. native apps developers, integrators...) Platform providers (e.g. Web-based frameworks) Web developers (e.g. Web applications) End users! 8
  • 9.
    Strategic goals Web platformcompatibility, interoperability Performance and efficiency in small embedded devices Quality assurance and Security Better development tools and documentation More efficient collaboration: e.g. ports alignment (fewer different architectures, less port-specific code), better communication increased collaboration among different teams... 9
  • 10.
  • 11.
    WebKit contributions 2023 Stillthe #2 committer in 2023 so far with 10.9% of all commits 11
  • 12.
    WebKit contributions 2023 Zoomingin: ~50% of all the non-Apple commits coming from Igalia 12
  • 13.
    Main highlights Web platformcontributions Graphics & Multimedia JavaScriptCore New WPE API WebKit on Android Quality assurance Security Development tools 13
  • 14.
    Web platform contributions CSSproperties: content-visibility content-visibility: auto particularly useful on large pages HTML Fetch Priority attributes Optimize resource loading Popover API Easy creation of native pop-over elements Secure Curves in the Web Cryptography API Algorithms Ed25519 and X25519 in WebKitGTK Algorithm X25519 in the Mac port 14
  • 15.
    Graphics WebKitGTK and WPEgraphics rendering architecture Finished ANGLE integration and added WebGL2 support Buffer sharing architecture (i.e. DMAbuf in linux) Removed dependency on the internal Wayland server Synchronization using displayLink architecture 2D rendering engine replacement for cairo Experimental GPUProcess support (WIP). New SVG engine (LBSE: Layer-Based SVG Engine) SVG layers support as a 1st-class citizen in the engine Enables HW acceleration for SVG rendering 15
  • 16.
    Multimedia DMABuf-based sink forHW-accelerated video WebCodecs audio encoder/decoder from IDL to platform layers Improvements on WebCodecs video encoder/decoder GStreamer-based WebRTC backends Improved video loop behaviour Improved power comsumption (e.g. auto-play, muted videos) General maintenance (e.g. MSE, EME...) 16
  • 17.
    JavaScriptCore ARMv7 improvements (32-bit) Improvedcode generation for stack load/save in Air on ARMv7 Reduces generated code size for WASM by ~30% Worked on Concurrent JIT Worked on WASM BBQJIT (99% done) Worked on the B3 low level optimizer Needed to enable OMG for WASM and FTL for JavaScript WASM GC Contribute initial implementation (WIP) 17
  • 18.
    New WPE API Severalproblems with current model Started working in a new proposal that will be part of WebKit We started submitting patches to upstream the changes (WIP) 18
  • 19.
    WebKit on Android Goal:WebKit-based alternative to Android WebView No new port needed, just the WPE's public API Multiple architectures: arm64, armv7, x86-64, x86 Native integration with Android HW acceleration and WebGL support 19
  • 20.
    Quality Assurance Increased gardeningeffort on WebKitGTK and WPE Increased amount of tests running on WebKitGTK and WPE: WebKitGTK: from ~62.5K to 69.5K tests (+11.2%) WPE: from ~56K to 62.5K tests (+11.6%) Reduced amount of skipped tests on WebKitGTK and WPE: WebKitGTK: from ~14K tests to.7K tests (-10.2%) WPE: from ~21.2K to 20K tests (-6%) 20
  • 21.
  • 22.
    Security Major, minor andunstable releases: Feature (major) releases every 6-months (march, september) Minor releases (i.e. bugfixes) and development releases Aligned releases for WebKitGTK and WPE: & WebKit Security Advisories (WSA): & https://webkitgtk.org/releases https://wpewebkit.org/release https://webkitgtk.org/security.html https://wpewebkit.org/security 22
  • 23.
    Tooling and documentation Problem:complex develpment environment: Dependency on different libraries (and not all versions supported) JHBuild not great for reproduceability; flatpak not great for development Solution: container-based SDK (OCI compatible) Reproduceable and share-able environment, it includes all the usual tools Cover all the development workflows (including hacking on dependencies) 23
  • 24.
  • 25.
    Web Platform contributions Addsupport for New API to manage browser navigation actions and examine history Add support for Attribute of the NavigateEvent interface True if the UA performed a visual transition before a navigation event Navigation API hasUAVisualTransition 25
  • 26.
    Graphics WebKitGTK and WPEgraphics rendering architecture Completely integrate displayLink architecture, simplify and refactor Extend the use of the DMAbuf architecture (API change in WPE) 2D rendering engine replacement for cairo Integrate GPUProcess support. New SVG engine (LBSE): Finish upstreaming the remaining patches Ensure good test coverage and no performance regressions Turn on LBSE by default and remove the legacy SVG engine 26
  • 27.
    Multimedia Implementation of theGStreamer WebRTC backend Improve WebCodecs integration with WebGL and WebAudio General maintenance (e.g. MSE, EME...) 27
  • 28.
    JavaScriptCore Finish work onARMv7 improvements: Concurrent JIT WASM BBQJIT (99% done) Enable OMG for WASM and FTL for JavaScript Need to finish implementing B3 support first Investigate and optimize heap/JIT memory usage in 32-bit WASM GC: Land patches to provide full support and ship the feature 28
  • 29.
    New WPE API Finishinitial version of the new API & start upstreaming ASAP Review all API docs and write guides and tutorials Deprecate the old API (won't be removed in the short term) ⚠️No specific release date (i.e. best-effort) 29
  • 30.
    WebKit on Android Goal:first usable version of WPE Android Immediate steps: Update to the latest stable version of WPE WebDriver support + Web Platform Test suite Implement missing functionality Conformance testing Other: HTTP/2 support, WebInspector... 30
  • 31.
    Quality Assurance Improve QAprocesses for WebKitGTK and WPE Use the new SDK in the bots simplifying the QA procedure Keep using flatpak for releasing nightlies (i.e. Epiphany Tech Preview) Prepare GTK bots to use GTK4 by default 31
  • 32.
    Tooling and documentation Releaseinitial version of the new SDK: Finish the remaining features & tests in the SDK Upload proper documentation and tutorials 32
  • 33.
  • 34.
  • 35.