Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contributions to an open source project: Igalia...

Contributions to an open source project: Igalia and the Chromium project

Introduction to the Chromium project and a summary of Igalia's contributions to it in the past 18 months to different areas such as Onion Soup, Accessibility, Ozone, CSS, MPArch, LaCrOS, MathMl...

Presented at the ICSE 21 conference (virtual), on May 26th 2021.

Mario Sánchez Prada

May 26, 2021
Tweet

More Decks by Mario Sánchez Prada

Other Decks in Technology

Transcript

  1. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada <[email protected]> ICSE 2021 - Spanish Industry Case Studies Wednesday, 26th of May 2021
  2. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia About me • CS Engineer, partner of Igalia and member of its Chromium team • Involvement as part of different Open Source communities: ◦ Chromium: Servicification, Onion Soup ◦ WebKit: WebKitGTK, Linux Accessibility ◦ GNOME: Contributor, GNOME foundation member • Other work done in the past: ◦ Development of Linux-based OS’s (i.e. Endless OS, Litl OS) ◦ Samsung SmartTV platform (WebKit & Chromium) ◦ Nokia’s Maemo: APT & Hildon Application Manager
  3. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia About Igalia • Highly specialized Open Source consultancy • Worker-owned, employee-run, flat structure • Headquartered in A Coruña, Galicia (Spain) • 100+ people working from all over the world distributed among 25 countries and 11 timezones • Browsers and Web engines related teams: Chromium, WebKit, Web Platform, Compilers, Graphics, Multimedia, Accessibility
  4. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia What is Chromium?
  5. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia What is Chromium? • Standalone Free & Open Source Web browser • Mostly licensed under the terms of the BSD License ◦ Some specific bits under MIT, LGPL, GPL and others • Available for different platforms, desktop & mobile: ◦ Windows, Mac OS, Linux, iOS, Android (since 4.4 KitKat!) • Multi-process and modular architecture: ◦ Browser process + other processes (e.g. renderers, GPU, network…) ◦ Content module for embedding: //content/browser & //content/renderer • Used as the base of several browsers out there: ◦ Chrome, Samsung Browser, Microsoft Edge, Opera, UC Browser, Brave...
  6. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Chromium vs Chrome • Chromium and Chrome are both free as in “free beer” • Only Chromium’s is fully Open Source (you can build & modify it) • Chrome based on Chromium, with closed parts on top: ◦ Automatic updater, API keys for Google Services (e.g. Speech API), support for popular non-free multimedia codecs (i.e. H.264, AAC), Widevine support (e.g. Netflix)... • Chrome can neither be built, nor be freely re-distributed either • Different branding too (e.g. different name, different icon...) Chromium Chrome
  7. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Chromium, Blink & V8 • Chromium is the whole browser, but doesn’t do all on its own Source code: https://chromium.googlesource.com/chromium/src.git • Blink is the web engine Chromium uses to render web content ◦ Blink arranges HTML/CSS content to show up on screen, responds to user interactions, plays media content, implements JavaScript APIs… Source code: third_party/blink/ directory in Chromium’s repository • V8 is the JavaScript engine that Chromium relies on: ◦ Responsible for executing JavaScript code in the browser ◦ Can also be run independently (e.g. Node.JS) Source code: https://chromium.googlesource.com/v8/v8.git
  8. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia What is Chromium OS? • A full Operating System built on top of Chromium • It boots the machine and implements a modern desktop environment: ◦ Session management, hardware detection, full- screen/windowed applications, maximize/minimize windows, install/uninstall/update applications, battery management, suspension & resume… • Like Chromium vs Chrome, only Chromium OS is fully free (build it, modify it) • Mostly popular via “Chrome OS machines” (a.k.a. Chromebooks)
  9. What is Chromium OS? Image Attribution: ChromiumOS-desk.png by TheDevDude95, licensed

    under the terms of the Creative Commons Attribution-Share Alike 4.0 International license
  10. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia What have we contributed to the Chromium project recently?
  11. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Code Health: Onion Soup project • Started this collaboration in February 2019 • Modules migration from //content/renderer to Blink: ◦ //c/r/media: Finished webrtc, audio, peerconnection ◦ //c/r/java: Java/JS bridge mojoification ◦ //c/r/a11y: Removed content::AXContent* classes • Started moving //media/blink to Blink (WIP) This process helped remove 235+ definitions (i.e. classes, enums, methods...) from Blink’s public API (see tracking spreadsheet)
  12. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Code Health: Legacy IPC migrations • Progressed with the migration of legacy IPC to Mojo: ◦ Migrated 342/495 messages since we started (08/2019) ◦ Main focus on //content so far: ▪ Migrated 293/296 messages ◦ Migrations outside of //content: ▪ Finished printing and Android WebView related IPCs ▪ Mostly focused on //extensions right now ▪ Migrated 49/199 messages Check out Gyuyoung Kim’s lightning talk at BlinkOn 14
  13. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia CSS • ::marker pseudo-element ◦ Implemented and shipped • CSS flow-relative shorthand and offset properties ◦ Implemented and shipped • CSS Custom Properties: ◦ Improved performance resolving inheritance (bug) • New TextBreakIterator's default behavior ◦ Changed default behavior to break after space (bug) • CSS Text and line-breaking ◦ Improved trailing space handling and bidirectional text ◦ Added support for trailing ideographic space
  14. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia CSS • CSS Grid: ◦ Fixed bugs, interop and performance issues • CSS Scrollbars ◦ Made scrollbar-gutter available behind the "experimental" flag ◦ Started implementing scrollbar-width (testing) • :focus-visible pseudo-class ◦ Implemented changes to include it in the default UA stylesheet • :has pseudo-class ◦ Implemented and now checking its feasibility (i.e. Intent to Prototype) • :dir pseudo-class ◦ Implemented behind a runtime flag, pending to ship (experimental)
  15. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Accessibility • Enabled Linux accessibility mode on the fly (no restart required) • Added support for more event types in Linux: alert, text attribute change, table sort... • Improved accessibility debug tools: ◦ Ported and enhanced accessibility debug tools to Mac to support complex specifications (e.g. DumpAcessibilityTree) ◦ Added support for more complex specifications and scripting ◦ Extended cross-platform support and enabled a11y tools to dump trees & events in other web engines i.e. WebKit, Firefox (blog post) ◦ Added new selectors and done some code refactoring
  16. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Accessibility • Chromium UI ◦ Reported and fixed bugs across all desktop platforms (blog post) ◦ Enhanced chrome://history page ◦ Enhanced menu item support on Mac • Caret browsing navigation: ◦ Improved support for the shadow DOM and flat-tree navigation • Accessible name calculation ◦ Imported tens of new tests • General maintenance ◦ Bug fixing, performance improvements, tests...
  17. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Chromium on Wayland • Working to natively support Chromium on Wayland since 2016 ◦ Ozone/Wayland platform is fully upstream since 2018 • Work on the X11 backend started in the middle of 2019 ◦ Refactored components that were desktop/X11-only to share their implementation with the Ozone/X11 platform • Ozone built by default and part of official Chrome releases ◦ Experimental & disabled by default, can be enabled in runtime: --enable-features=UseOzonePlatform --ozone-platform=x11|wayland • Finch trial for Ozone/X11 launched on April 29th 2021 ◦ Parity with non-Ozone/X11 now!
  18. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Chromium on Wayland • Developed extension for Wayland DnD protocol (still WIP) ◦ Needed to overcome limitations blocking development of tab dragging feature in Chromium running on Wayland ◦ Implemented in Exo (Wayland compositor for ChromeOS) ◦ Proposal for standardization upstream in wayland-protocols • Next steps: ◦ Have a successful finch trial for Ozone/Wayland ◦ Make Ozone default on Linux (at some point in H2/2021) Check out Alexander Dunaev’s talk at the Web Engines Hackfest 2021
  19. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia MathML • Upstreamed a lot from our 2019 downstream branch: i.e. basic setup & layout, operator dictionary, new CSS properties • Started to upstream support for stretchy operators See tracking bug and the list of merged CLs
  20. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia V8 JavaScript Engine • Implemented and shipped: ◦ JS private methods proposal • Improved: ◦ Startup snapshot API for integration in Node.js core • Work in progress: ◦ Optimization of the JS public/private class fields (design doc) • Patches to the V8 repository (last 18 months): ◦ 15 patches merged ◦ 2 patches currently under review (CL 820292, CL 2795831)
  21. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia LaCrOS (Linux and ChromeOS) LaCrOS: de-coupling Chrome browser from the Operating System • Ongoing effort, started working on it on early 2021 • Work done so far: ◦ Improved integration with the Window Manager ◦ Added multiple display support ◦ Fractal scaling (HiDPI) ◦ Code refactoring to split chromeos/ into ash/ and lacros/ ◦ General bugfixing and improvements Check out Abhijeet’s Kandalkar lightning talk at BlinkOn 14
  22. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia • Recently started to work on the “Multiple Page Architecture” (MPArch) effort • Solve supporting multiple pages in a given tab for different use cases: ◦ Back/Forward cache ◦ Pre-rendering ◦ Fenced frames ◦ Portals ◦ Guest views • Still work in progress, see the metabug for more details Check out Lucas Gadani’s talk at BlinkOn 14 Multiple Page Architecture
  23. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Interoperability • Fixed Chromium's behavior to align with the specs and other browsers’ implementation: ◦ ASCII case-insensitiveness for keywords (feature) ◦ Scroll coordinates in non-default writing mode (feature) • Migrated Chromium’s web tests to Web Platform Tests: ◦ Migrated 240 tests mainly related to Flexbox (89), Filters (44), Masking (13) and Grid Layout (94) ◦ Investigated 96 tests and deemed ineligible for porting. ◦ Identified missing features and bugs in other Web engines ◦ Several bugs reported to Firefox and WebKit
  24. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Other contributions • Protocol handlers: ◦ Safelist distributed web schemes for registerProtocolHandler() ◦ Escaping of U+0020 SPACE and U+7F DELETE in URLs ◦ Remove the title argument from registerProtocolHandler() ◦ Custom protocol handlers bypass Service Worker fetch event ◦ Allow cross-origin registration in extensions • Extensions: ◦ chrome.tabs.removeCSS (Removed CSS added by chrome.tabs.insertCSS ) ◦ chrome.dom.openOrClosedShadowRoot (Allowed access of the closed shadow root)
  25. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Other contributions • New contributors: ◦ 9 new Igalians working on Chromium upstream: Alexander Surkov, Minju Kim, Zakhar Voit, Ziran Sun, Felipe Erias, Byungwoo Lee, Yeunjoo Choi, Roger Zanoni, Delan Azabani ◦ 3 OWNERs: Henrique Ferreiro, Nick Diego Yamane, Oriol Obrafu ◦ 1 new API OWNER: Manuel Rego Casasnovas ...plus several other changes & fixes
  26. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Some stats & numbers
  27. Some stats & numbers • 3555 CLs merged to the

    Chromium repository in the past 18 months • 33 igalians landed patches in different areas of Chromium (+2 in V8): Onion Soup, CSS, Accessibility, Ozone, LaCrOS, MathML, Interoperability... Source: git shortlog -sne --after='2019-11-01T00:00Z' \ --before='2021-05-01T00:00Z' --author=igalia.com
  28. Some stats & numbers Source: BlinkOn 14’s opening keynote (May

    11th, 2021) Top non-Google contributor to Chromium in number of commits (Google’s contributions: ~92%)
  29. Some stats & numbers Source: BlinkOn 14’s opening keynote (May

    11th, 2021) Non-google / chromium contributors per-year 5th non-Google contributor to Chromium by team size
  30. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Credit Igalians contributing to the work presented here: Abhijeet Kandalkar, Alexander Dunaev, Alexander Surkov, Antia Puentes, Antonio Gomes, Byungwoo Lee, Caitlin Potter, Cathie Chen, Delan Azabani, Felipe Erias, Frédéric Wang, Gyuyoung Kim, Henrique Ferreiro, Jacobo Aragunde Pérez, Javier Fernández García-Boente, Joanmarie Diggs, Jose Dapena Paz, Joyee Cheung, Julie Jeongeun Kim, Maksim Sisov, Manuel Rego Casasnovas, Mario Sanchez Prada, Martin Robinson, Minju Kim, Miyoung Shin, Nick Diego Yamane, Oriol Brufau, Rob Buis, Roger Zanoni, Rossana Monteriso, Sergio Villar Senin, Shivam Balikondwar, Víctor Manuel Jáquez Leal, Yeunjoo Choi, Zakhar Voit, Ziran Sun
  31. Contributions to an open source project: Igalia and the Chromium

    project Mario Sánchez Prada - Igalia Thank you! • Mail: [email protected] • Blog: https://blogs.igalia.com/mario • Other: @mariospr at Twitter & GitHub