<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Chromium on mariospr.org</title><link>https://mariospr.org/category/chromium/</link><description>Recent content in Chromium on mariospr.org</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 22 Jul 2021 14:16:49 +0000</lastBuildDate><atom:link href="https://mariospr.org/category/chromium/index.xml" rel="self" type="application/rss+xml"/><item><title>Igalia and the Chromium project</title><link>https://mariospr.org/2021/07/22/igalia-and-the-chromium-project/</link><pubDate>Thu, 22 Jul 2021 14:16:49 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=3159</guid><description>&lt;p&gt;A couple of months ago I had the pleasure of speaking at the &lt;em&gt;&lt;a href="https://conf.researchr.org/home/icse-2021"&gt;43rd International Conference on Software Engineering&lt;/a&gt;&lt;/em&gt; (aka &lt;em&gt;ICSE 2021&lt;/em&gt;), in the context of its &lt;a href="https://conf.researchr.org/track/icse-2021/icse-2021-spanish-industry-case-studies"&gt;&amp;ldquo;Spanish Industry Case Studies&amp;rdquo; track&lt;/a&gt;. We were invited to give a high level overview of the &lt;a href="https://www.chromium.org"&gt;Chromium&lt;/a&gt; project and how &lt;a href="https://www.igalia.com"&gt;Igalia&lt;/a&gt; contributes to it upstream.&lt;/p&gt;
&lt;p&gt;This was an unusual chance to speak at a forum other than the usual conferences I attend to, so I welcomed this as a double opportunity to explain the project to people less familiar with &lt;a href="https://www.chromium.org"&gt;Chromium&lt;/a&gt; than those attending events such as &lt;a href="https://www.chromium.org/events/blinkon-14"&gt;BlinkOn&lt;/a&gt; or the &lt;a href="https://webengineshackfest.org/2021/"&gt;Web Engines Hackfest&lt;/a&gt;, as well as to spread some awareness on our work in there.&lt;/p&gt;</description><content:encoded><![CDATA[<p>A couple of months ago I had the pleasure of speaking at the <em><a href="https://conf.researchr.org/home/icse-2021">43rd International Conference on Software Engineering</a></em> (aka <em>ICSE 2021</em>), in the context of its <a href="https://conf.researchr.org/track/icse-2021/icse-2021-spanish-industry-case-studies">&ldquo;Spanish Industry Case Studies&rdquo; track</a>. We were invited to give a high level overview of the <a href="https://www.chromium.org">Chromium</a> project and how <a href="https://www.igalia.com">Igalia</a> contributes to it upstream.</p>
<p>This was an unusual chance to speak at a forum other than the usual conferences I attend to, so I welcomed this as a double opportunity to explain the project to people less familiar with <a href="https://www.chromium.org">Chromium</a> than those attending events such as <a href="https://www.chromium.org/events/blinkon-14">BlinkOn</a> or the <a href="https://webengineshackfest.org/2021/">Web Engines Hackfest</a>, as well as to spread some awareness on our work in there.</p>
<p>Contributing to <a href="https://www.chromium.org">Chromium</a> is something we&rsquo;ve been doing for quite a few years already, but I think it&rsquo;s fair to say that in the past 2-3 years we have intensified our contributions to the project even more and diversified the areas that we contribute to, something I&rsquo;ve tried to reflect in this talk in no more than 25 minutes (quite a challenge!). Actually, it&rsquo;s precisely because of this amount of contributions that we&rsquo;re currently<span style="font-size: 1rem;"> the 2nd biggest non-Google contributor to the project in number of commits, and among the Top 5 contributors by team size (see a </span><a style="font-size: 1rem;" href="https://docs.google.com/presentation/d/1WxwbecNNXp_5v0yUDR3EolXR5m86siHj4_QWgPnJ7lU/edit#slide=id.gd3ed2042b9_4_142">highlight on this from BlinkOn 14&rsquo;s keynote</a><span style="font-size: 1rem;">). For a small consultancy company such as <a href="https://www.igalia.com">ours</a>, it&rsquo;s certainly something to feel proud of.</span></p>
<p>With all this in mind, I organized the talk into 2 main parts: First a general introduction to the <a href="https://www.chromium.org">Chromium</a> project and then a summary of the main <em>upstream</em> work that we at <a href="https://www.igalia.com">Igalia</a> have contributed recently to it. I focused on the past year and a half, since that seemed like a good balance that allowed me to highlight the most important bits without adding too much  information. And from what I can tell based on the feedback received so far, it seems the end result has been helpful and useful for some people without prior knowledge to understand things such as the differences between Chromium and Chrome, what ChromiumOS is and how our work on several different fronts (e.g. <em>CSS</em>, <em>Accessibility</em>, <em>Ozone/X11/Wayland</em>, <em>MathML</em>, <em>Interoperability</em>&hellip;) fits into the picture.</p>
<p>Obviously, the more technically inclined you are, and the more you know about the project, the more you&rsquo;ll understand the different bits of information condensed into this talk, but my main point here is that you shouldn&rsquo;t need any of that to be able to follow it, or at least that was my intention (but please let me know in the comments if you have any feedback). Here you have it:</p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/Q5IU9QeGNa8?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>You can <a href="https://www.youtube.com/watch?v=Q5IU9QeGNa8">watch the talk online</a> (24:05 min) on <a href="https://www.youtube.com/channel/UCIpArN21nIT2lvZX-nkjP7A">our YouTube channel</a>, as well as grab the <a href="https://speakerdeck.com/mariospr/contributions-to-an-open-source-project-igalia-and-the-chromium-project">original slide deck as a PDF</a> in case you also want it for references, or to check the many links I included with pointers for further information and also for reference to the different sources used.</p>
<p>Last, I don&rsquo;t want to finish this post without thanking once again to the organizers for the invitation and for runing the event, and in particular to <a href="https://twitter.com/davilagrau">Andrés-Leonardo Martínez-Ortiz</a> and <a href="https://twitter.com/javierprovecho">Javier Provecho</a> for taking care of the specific details involved with the <a href="https://conf.researchr.org/track/icse-2021/icse-2021-spanish-industry-case-studies">&ldquo;Spanish Industry Case Studies&rdquo; track</a>.</p>
<p>Thank you all</p>
]]></content:encoded></item><item><title>﻿​Chromium now migrated to the new C++ Mojo types</title><link>https://mariospr.org/2020/07/08/chromium-now-migrated-to-the-new-c-mojo-types/</link><pubDate>Wed, 08 Jul 2020 08:55:03 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=3111</guid><description>&lt;p&gt;At the end of the last year I wrote &lt;a href="https://mariospr.org/2019/12/23/end-of-the-year-update-2019-edition/" target="_blank" rel="nofollow noreferrer noopener"&gt;a long blog post&lt;/a&gt; summarizing the main work I was involved with as part of &lt;a href="https://www.igalia.com/project/chromium" target="_blank" rel="nofollow noreferrer noopener"&gt;Igalia&amp;rsquo;s Chromium team&lt;/a&gt;. In it I mentioned that a big chunk of my time was spent working on the migration to the new C++ &lt;strong&gt;Mojo&lt;/strong&gt; types across the entire codebase of &lt;a href="https://www.chromium.org" target="_blank" rel="nofollow noreferrer noopener"&gt;Chromium&lt;/a&gt;, in the context of the &lt;a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE" target="_blank" rel="nofollow noreferrer noopener"&gt;Onion Soup 2.0 project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For those of you who don&amp;rsquo;t know what Mojo is about, there is extensive information about it in &lt;a href="https://chromium.googlesource.com/chromium/src.git/+/master/mojo/README.md" target="_blank" rel="nofollow noreferrer noopener"&gt;Chromium&amp;rsquo;s documentation&lt;/a&gt;, but for the sake of this post, let&amp;rsquo;s simplify things and say that Mojo is a modern replacement to &lt;a href="https://www.chromium.org/developers/design-documents/inter-process-communication" target="_blank" rel="nofollow noreferrer noopener"&gt;Chromium&amp;rsquo;s legacy IPC APIs&lt;/a&gt; which enables a better, simpler and more direct way of communication among all of Chromium&amp;rsquo;s different processes.&lt;/p&gt;</description><content:encoded><![CDATA[<p>At the end of the last year I wrote <a href="/2019/12/23/end-of-the-year-update-2019-edition/" target="_blank" rel="nofollow noreferrer noopener">a long blog post</a> summarizing the main work I was involved with as part of <a href="https://www.igalia.com/project/chromium" target="_blank" rel="nofollow noreferrer noopener">Igalia&rsquo;s Chromium team</a>. In it I mentioned that a big chunk of my time was spent working on the migration to the new C++ <strong>Mojo</strong> types across the entire codebase of <a href="https://www.chromium.org" target="_blank" rel="nofollow noreferrer noopener">Chromium</a>, in the context of the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE" target="_blank" rel="nofollow noreferrer noopener">Onion Soup 2.0 project</a>.</p>
<p>For those of you who don&rsquo;t know what Mojo is about, there is extensive information about it in <a href="https://chromium.googlesource.com/chromium/src.git/+/master/mojo/README.md" target="_blank" rel="nofollow noreferrer noopener">Chromium&rsquo;s documentation</a>, but for the sake of this post, let&rsquo;s simplify things and say that Mojo is a modern replacement to <a href="https://www.chromium.org/developers/design-documents/inter-process-communication" target="_blank" rel="nofollow noreferrer noopener">Chromium&rsquo;s legacy IPC APIs</a> which enables a better, simpler and more direct way of communication among all of Chromium&rsquo;s different processes.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/blogpost-mojoipc.png"><img src="/wp-content/uploads/2019/12/blogpost-mojoipc_small.png" /></a></p>
One interesting thing about this conversion is that, even though Mojo was already "the new thing" compared to <a href="https://www.chromium.org/developers/design-documents/inter-process-communication" target="_blank" rel="nofollow noreferrer noopener">Chromium's legacy IPC APIs</a>, the original Mojo API presented a few problems that could only be fixed with a newer API. This is the main reason that motivated this migration, since the new Mojo API fixed those issues by providing less confusing and less error-prone types, as well as additional checks that would force your code to be safer than before, and all this done in a binary compatible way. Please check out the <a href="https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E" target="_blank" rel="nofollow noreferrer noopener">Mojo Bindings Conversion Cheatsheet</a> for more details on what exactly those conversions would be about.
<p>Another interesting aspect of this conversion is that, unfortunately, it wouldn&rsquo;t be as easy as running a &ldquo;search &amp; replace&rdquo; operation since in most cases deeper changes would need to be done to make sure that the migration wouldn&rsquo;t break neither existing tests nor production code. This is the reason why we often had to write bigger refactorings than what one would have anticipated for some of those migrations, or why sometimes some patches took a bit longer to get landed as they would span way too much across multiple directories, making the merging process extra challenging.</p>
<p>Now combine all this with the fact that we were confronted with <strong>about 5000 instances of the old types in the Chromium codebase when we started</strong>, spanning across nearly every single subdirectory of the project, and you&rsquo;ll probably understand why this was a massive feat that would took quite some time to tackle.</p>
<p>Turns out, though, that after just 6 months since we started working on this and more than 1100 patches landed upstream, our team managed to have nearly all the existing uses of the old APIs migrated to the new ones, reaching to a point where, by the end of December 2019, we had completed 99.21% of the entire migration! That is, we basically had almost everything migrated back then and the only part we were missing was the migration of <code>//components/arc</code>, as I already <a href="/2019/12/23/end-of-the-year-update-2019-edition/" target="_blank" rel="nofollow noreferrer noopener">announced in this blog back in December</a> and in the <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-mojo/kSVBn0Y6vQA" target="_blank" rel="nofollow noreferrer noopener">chromium-mojo mailing list</a>.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/MojoMigrationsStats2019.png"><img src="/wp-content/uploads/2019/12/MojoMigrationsStats2019_small.png" /></a>
<small><em>Progress of migrations to the new Mojo syntax by December 2019</em></small></p>
This was good news indeed. But the fact that we didn't manage to reach 100% was still a bit of a pain point because, as <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-mojo/jcGzeTt1m2U/Eg6vIwFJBAAJ" target="_blank" rel="nofollow noreferrer noopener">Kentaro Hara mentioned in the chromium-mojo mailing list</a> yesterday, <em>"finishing 100% is very important because refactoring projects that started but didn't finish leave a lot of tech debt in the code base"</em>. And surely we didn't want to leave the project unfinished, so we kept collaborating with the Chromium community in order to finish the job.
<p>The main problem with <code>//components/arc</code> was that, as explained in the <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1035484" target="_blank" rel="nofollow noreferrer noopener">bug where we tracked that particular subtask</a>, we couldn&rsquo;t migrate it yet because the external <em>libchrome</em> repository was still relying on the old types! Thus, even though almost nothing else in Chromium was using them at that point, migrating those <code>.mojom</code> files under <code>//components/arc</code> to the new types would basically break <em>libchrome</em>, which wouldn&rsquo;t have a recent enough version of Mojo to understand them (and no, according to the people collaborating with us on this effort at that particular moment, getting Mojo updated to a new version in <em>libchrome</em> was not really a possibility).</p>
<p>So, in order to fix this situation, we collaborated closely with the people maintaining the <em>libchrome</em> repository (external to Chromium&rsquo;s repository and still relies in the old mojo types) <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1035484" target="_blank" rel="nofollow noreferrer noopener">to get the remaining migration, inside <code>//components/arc</code>, unblocked</a>. And after a few months doing some small changes here and there to provide the <em>libchrome</em> folks with the tools they&rsquo;d need to allow them to proceed with the migration, they could finally integrate the necessary changes that would ultimately allow us to complete the task.</p>
<p>Once this important piece of the puzzle was in place, all that was left was for my colleague <a href="https://blogs.igalia.com/akandalkar" target="_blank" rel="nofollow noreferrer noopener">Abhijeet</a> to land <a href="https://chromium-review.googlesource.com/c/chromium/src/+/1868870" target="_blank" rel="nofollow noreferrer noopener">the CL that would migrate most of <code>//components/arc</code> to the new types</a> (a CL which had been put on hold for about 6 months!), and then to land a few CLs more on top to make sure we did get rid of any trace of old types that might still be in codebase (special kudos to my colleague <a href="https://blogs.igalia.com/gyuyoung/" target="_blank" rel="nofollow noreferrer noopener">Gyuyoung</a>, who wrote most of those final CLs).</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2020/07/MojoMigrationsStatsJuly2020.png"><img src="/wp-content/uploads/2020/07/MojoMigrationsStatsJuly2020-800x354.png" /></a>
<small><em>Progress of migrations to the new Mojo syntax by July 2020</em></small></p>
After all this effort, which would sit on top of all the amazing work that my team had already done in the second half of 2019, we finally reached the point where we are today, when we can proudly and loudly announce that the <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-mojo/jcGzeTt1m2U/34zlwghIBAAJ" target="_blank" rel="nofollow noreferrer noopener"><strong>migration of the old C++ Mojo types to the new ones is finally complete</strong></a>! Please feel free to check out the details on the <a href="https://docs.google.com/spreadsheets/d/1khYVrfnN74RSDqqXgCFlG9fI89IKWA9J32Ln_2ZcTaU">spreadsheet tracking this effort</a>.
<p>So please join me in celebrating this important milestone for the <a href="https://www.chromium.org" target="_blank" rel="nofollow noreferrer noopener">Chromium</a> project and enjoy the new codebase free of the old Mojo types. It&rsquo;s been difficult but it definitely pays off to see it completed, something which wouldn&rsquo;t have been possible without all the people who contributed along the way with comments, patches, reviews and any other type of feedback. Thank you all! 👌 🍻</p>
<p><a href="https://www.igalia.com"><img src="https://i2.wp.com/mariospr.org/wp-content/uploads/2020/05/IgaliaLogoSmall.png" alt="Igalia" align="right" /></a>Last, while the main topic of this post is to celebrate the unblocking of these last migrations we had left since December 2019, I&rsquo;d like to finish acknowledging the work of all my colleagues from <a href="https://www.igalia.com" target="_blank" rel="nofollow noreferrer noopener">Igalia</a> who worked along with me on this task since we started, one year ago. That is, <a href="https://blogs.igalia.com/akandalkar" target="_blank" rel="nofollow noreferrer noopener">Abhijeet</a>, <a href="https://blogs.igalia.com/tonikitoo/" target="_blank" rel="nofollow noreferrer noopener">Antonio</a>, <a href="https://blogs.igalia.com/gyuyoung/" target="_blank" rel="nofollow noreferrer noopener">Gyuyoung</a>, <a href="https://blogs.igalia.com/hferreiro/" target="_blank" rel="nofollow noreferrer noopener">Henrique</a>, <a href="https://blogs.igalia.com/jkim/" target="_blank" rel="nofollow noreferrer noopener">Julie</a> and <a href="https://blogs.igalia.com/mshin/" target="_blank" rel="nofollow noreferrer noopener">Shin</a>.</p>
<p>Now if you&rsquo;ll excuse me, we need to get back to working on the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE" target="_blank" rel="nofollow noreferrer noopener">Onion Soup 2.0 project</a> because we&rsquo;re not done yet: at the moment we&rsquo;re mostly focused on converting remote calls using Chromium&rsquo;s legacy IPC to Mojo (see the <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-mojo/aY5_Nx9_dDQ" target="_blank" rel="nofollow noreferrer noopener">status report by Dave Tapuska</a>) and helping finish <em>Onion Soup&rsquo;ing</em> the remaining directores under //content/renderer (see the <a href="https://groups.google.com/a/chromium.org/forum/#!topic/chromium-mojo/Mc1VP1-2nWY" target="_blank" rel="nofollow noreferrer noopener">status report by Kentaro Hara</a>), so there&rsquo;s no time to waste. But those migrations will be material for another post, of course.</p>
]]></content:encoded></item><item><title>The Web Platform Tests project</title><link>https://mariospr.org/2020/05/14/the-web-platform-tests-project/</link><pubDate>Thu, 14 May 2020 09:07:19 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=2961</guid><description>&lt;h2&gt;Web Browsers and Test Driven Development&lt;/h2&gt;
Working on Web browsers development is not an easy feat but if there's something I'm personally very grateful for when it comes to collaborating with this kind of software projects, it is their testing infrastructure and the peace of mind that it provides me with when making changes on a daily basis.
&lt;p&gt;To help you understand the size of these projects, they involve millions of lines of code (&lt;a href="https://www.openhub.net/p/chrome" target="_blank" rel="nofollow noreferrer noopener"&gt;Chromium is ~25 million lines of code&lt;/a&gt;, followed closely by &lt;a href="https://www.openhub.net/p/firefox" target="_blank" rel="nofollow noreferrer noopener"&gt;Firefox&lt;/a&gt; and &lt;a href="https://www.openhub.net/p/webkit" target="_blank" rel="nofollow noreferrer noopener"&gt;WebKit&lt;/a&gt;) and around 200-300 new patches landing everyday. Try to imagine, for one second, how we could make changes if we didn&amp;rsquo;t have such testing infrastructure. It would basically be utter and complete chao​s and, more especially, it would mean extremely buggy Web browsers, broken implementations of the &lt;a href="https://webplatform.github.io" target="_blank" rel="nofollow noreferrer noopener"&gt;Web Platform&lt;/a&gt; and tens (hundreds?) of new bugs and crashes piling up every day&amp;hellip; not a good thing at all for Web browsers, which are these days some of the most widely used applications (and not just &amp;rsquo;the thing you use to browse the Web&amp;rsquo;).&lt;/p&gt;</description><content:encoded><![CDATA[<h2>Web Browsers and Test Driven Development</h2>
Working on Web browsers development is not an easy feat but if there's something I'm personally very grateful for when it comes to collaborating with this kind of software projects, it is their testing infrastructure and the peace of mind that it provides me with when making changes on a daily basis.
<p>To help you understand the size of these projects, they involve millions of lines of code (<a href="https://www.openhub.net/p/chrome" target="_blank" rel="nofollow noreferrer noopener">Chromium is ~25 million lines of code</a>, followed closely by <a href="https://www.openhub.net/p/firefox" target="_blank" rel="nofollow noreferrer noopener">Firefox</a> and <a href="https://www.openhub.net/p/webkit" target="_blank" rel="nofollow noreferrer noopener">WebKit</a>) and around 200-300 new patches landing everyday. Try to imagine, for one second, how we could make changes if we didn&rsquo;t have such testing infrastructure. It would basically be utter and complete chao​s and, more especially, it would mean extremely buggy Web browsers, broken implementations of the <a href="https://webplatform.github.io" target="_blank" rel="nofollow noreferrer noopener">Web Platform</a> and tens (hundreds?) of new bugs and crashes piling up every day&hellip; not a good thing at all for Web browsers, which are these days some of the most widely used applications (and not just &rsquo;the thing you use to browse the Web&rsquo;).</p>
<p style="text-align: center;"><a href="https://i1.wp.com/mariospr.org/wp-content/uploads/2020/05/ChromiumTrybots.png"><img src="https://i1.wp.com/mariospr.org/wp-content/uploads/2020/05/ChromiumTrybots.png" alt="The Chromium Trybots in action" /></a>
<small><em>The Chromium Trybots in action</em></small></p>
Now, there are all different types of tests that Web engines run automatically on a regular basis: Unit tests for checking that APIs work as expected, platform-specific tests to make sure that your software runs correctly in different environments, performance tests to help browsers keep being fast and without increasing too much their memory footprint... and then, of course, there are the tests to make sure that the Web engines at the core of these projects implement the Web Platform correctly according to the numerous standards and specifications available.
<p>And it&rsquo;s here where I would like to bring your attention with this post because, when it comes to these last kind of tests (what we call &ldquo;Web tests&rdquo; or &ldquo;layout tests&rdquo;), each Web engine used to rely entirely on their own set of Web tests to make sure that they implemented the many different specifications correctly.</p>
<p>Clearly, there was some room for improvement here. It would be wonderful if we could have an engine-independent set of tests to test that a given implementation of the Web Platform works as expected, wouldn&rsquo;t it? We could use that across different engines to make sure not only that they work as expected, but also that they also behave <strong>exactly</strong> in the same way, and therefore give Web developers confidence on that they can rely on the different specifications without having to implement engine-specific quirks.</p>
<h2><a id="user-content-enter-the-web-platform-tests-project" class="anchor" href="#enter-the-web-platform-tests-project" aria-hidden="true"></a>Enter the Web Platform Tests project</h2>
Good news is that just such an ideal thing exists. It's called the <a href="https://web-platform-tests.org/index.html" target="_blank" rel="nofollow noreferrer noopener">Web Platform Tests project</a>. As it is concisely described in <a href="https://web-platform-tests.org/index.html" target="_blank" rel="nofollow noreferrer noopener">it's official site</a>:
<p><em>&ldquo;The web-platform-tests project is a cross-browser test suite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software which is compatible with other implementations, and that later implementations will be compatible with their implementations.&quot;</em></p>
<p>I&rsquo;d recommend visiting <a href="https://web-platform-tests.org/index.html">its website</a> if you&rsquo;re interested in the topic, watching the <a href="https://www.youtube.com/watch?v=zuK1uyXPZS0"><em>&ldquo;Introduction to the web-platform-tests&rdquo;</em> video</a> or even glance at <a href="https://github.com/web-platform-tests/wpt" target="_blank" rel="nofollow noreferrer noopener">the git repository containing all the tests here</a>. Here, you can also find specific information such as <a href="https://web-platform-tests.org/running-tests/index.html" target="_blank" rel="nofollow noreferrer noopener">how to run WPTs</a> or <a href="https://web-platform-tests.org/writing-tests/index.html" target="_blank" rel="nofollow noreferrer noopener">how to write them</a>. Also, you can have a look as well at the <a href="https://wpt.fyi" target="_blank" rel="nofollow noreferrer noopener">wpt.fyi dashboard</a> to get a sense of what tests exists and how some of the main browsers are doing.</p>
<p style="text-align: center;"><iframe src="https://www.youtube.com/embed/zuK1uyXPZS0" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
In short: I think it would be safe to say that <strong>this project is critical to the health of the whole Web Platform</strong>, and ultimately to Web developers. What's very, very surprising is how long it took to get to where it is, since it came into being only about <a href="https://www.w3.org/blog/2013/02/testing-the-open-web-platform/" target="_blank" rel="nofollow noreferrer noopener">halfway into the history of the Web</a> (there were <a href="https://lists.w3.org/Archives/Public/public-css-testsuite/2004Mar/0001.html">earlier testing efforts at the W3C</a>, but none that focused on automated &amp; shared testing). But regardless of that, this is an interesting challenge: Filling in all of the missing unified tests, while new things are being added all the time!
<p>Luckily, this was a challenge that did indeed took off and all the major Web engines can now proudly say that they are <strong>regularly running about 36500 of these Web engine-independent tests</strong> (providing <strong>~1.7 million sub-tests</strong> in total), and all the engines are showing off a <strong>pass rate between 91% and 98%</strong>. See the numbers below, as extracted from <a href="https://wpt.fyi/">today&rsquo;s WPT data</a>:</p>
<table border="0" cellspacing="0">
<tbody>
<tr>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle" height="17"><b>Chrome 84</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Edge 84</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Firefox 78</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Safari 105 preview</b></td>
</tr>
<tr>
<td style="text-align: center; padding: 2px;" height="17"><b>Pass</b></td>
<td style="text-align: center; padding: 2px;"><b>Total</b></td>
<td style="text-align: center; padding: 2px;"><b>Pass</b></td>
<td style="text-align: center; padding: 2px;"><b>Total</b></td>
<td style="text-align: center; padding: 2px;"><b>Pass</b></td>
<td style="text-align: center; padding: 2px;"><b>Total</b></td>
<td style="text-align: center; padding: 2px;"><b>Pass</b></td>
<td style="text-align: center; padding: 2px;"><b>Total</b></td>
</tr>
<tr>
<td style="text-align: center; padding: 2px;" valign="middle" height="17">1680105</td>
<td style="text-align: center; padding: 2px;">1714711</td>
<td style="text-align: center; padding: 2px;" valign="middle">1669977</td>
<td style="text-align: center; padding: 2px;">1714195</td>
<td style="text-align: center; padding: 2px;" valign="middle">1640985</td>
<td style="text-align: center; padding: 2px;">1698418</td>
<td style="text-align: center; padding: 2px;" valign="middle">1543625</td>
<td style="text-align: center; padding: 2px;">1695743</td>
</tr>
<tr>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle" height="17"><b>Pass rate: 97.98%</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Pass rate: 97.42%</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Pass rate: 96.62%</b></td>
<td style="text-align: center; padding: 2px;" colspan="2" valign="middle"><b>Pass rate: 91.03%</b></td>
</tr>
</tbody>
</table>
And here at <a href="http://www.igalia.com">Igalia</a>, we've recently had the opportunity to work on this for a little while and so I'd like to write a bit about that...
<h2><a id="user-content-the-web-platform-project-and-the-coronavirus-outbreak" class="anchor" href="#the-web-platform-project-and-the-coronavirus-outbreak" aria-hidden="true"></a>Upstreaming Chromium's tests during the Coronavirus Outbreak</h2>
As you all know, we're in the middle of an unprecedented world-wide crisis that is affecting everyone in one way or another. One particular consequence of it in the context of the Chromium project is that <a href="https://blog.chromium.org/2020/03/upcoming-chrome-releases.html" target="_blank" rel="nofollow noreferrer noopener">Chromium releases were paused for a while</a>. On top of this, some <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-dev/Vn7uzglqLz0/6oGsNFUZEAAJ" target="_blank" rel="nofollow noreferrer noopener">constraints on what could be landed upstream were put in place</a> to guarantee quality and stability of the Chromium platform during this strange period we're going through these days.
<p>These particular constraints impacted my team in that we couldn&rsquo;t really keep working on the tasks we were working on up to that point, in the context of <a href="http://www.chromium.org">the Chromium project</a>. Our involvement with the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE/edit#heading=h.uokewwiwnmn" target="_blank" rel="nofollow noreferrer noopener">Blink Onion Soup 2.0 project</a> usually requires the landing of relatively large refactors, and these kind of changes were forbidden for the time being.</p>
<p>Fortunately, we found an opportunity to collaborate in the meantime with the Web Platform Tests project by <strong>analyzing and trying to upstream many of the existing Chromium-specific tests</strong> that haven&rsquo;t yet been unified. This is important because tests exist for widely used specifications, but if they aren&rsquo;t in Web Platform Tests, their utility and benefits are limited to Chromium. If done well, this would mean that all of the tests that we managed to upstream would be immediately available for everyone else too. Firefox and WebKit-based browsers would not only be able to identify missing features and bugs, but also be provided with an extra set of tests to check that they were implementing these features correctly, and interoperably.</p>
<p style="text-align: center;"><a href="https://i0.wp.com/mariospr.org/wp-content/uploads/2020/05/WPTDashboard.png"><img src="https://i0.wp.com/mariospr.org/wp-content/uploads/2020/05/WPTDashboard.png" alt="The WPT Dashboard" /></a>
<small><em>The WPT Dashboard</em></small></p>
It was an interesting challenge considering that we had to switch very quickly from writing <em>C++</em> code around the <a href="https://www.chromium.org/developers/design-documents/inter-process-communication">IPC layers of Chromium</a> to analyzing, migrating and upstreaming Web tests from the huge pool of Chromium tests. We focused mainly on <a href="https://drafts.csswg.org/css-grid-2/">CSS Grid Layout</a>, <a href="https://drafts.csswg.org/css-flexbox-1/">Flexbox</a>, <a href="https://drafts.fxtf.org/css-masking-1/">Masking</a> and <a href="https://drafts.fxtf.org/filter-effects">Filters</a> related tests... but I think the results were quite good in the end:
<p>As of today, I&rsquo;m happy to report that, during the ~<strong>4 weeks we worked on this</strong> my team <strong><a href="https://docs.google.com/spreadsheets/u/2/d/1Fw1YRl9S8WNUkwwaFXZ0MCE0Qi3RcOJPPJm2tWhz6xw">migrated 240 Chromium-specific Web tests</a> to the Web Platform Tests&rsquo; upstream repository</strong>, helping increase test coverage in other Web Engines and thus helping towards improving interoperability among browsers:</p>
<ul>
 	<li><strong>CSS Flexbox</strong>: 89 tests migrated</li>
 	<li><strong>CSS Filters</strong>: 44 tests migrated</li>
 	<li><strong>CSS Masking</strong>: 13 tests migrated</li>
 	<li><strong>CSS Grid Layout</strong>: 94 tests migrated</li>
</ul>
But there is more to this than just numbers. Ultimately, as I said before, these migrations should help <strong>identifying missing features and bugs</strong> in other Web engines, and that was precisely the case here. You can easily see this by checking the <strong><a href="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&amp;chfieldto=2020-04-25&amp;chfield=%5BBug%20creation%5D&amp;resolution=---&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=INACTIVE&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;resolution=INCOMPLETE&amp;resolution=SUPPORT&amp;resolution=EXPIRED&amp;resolution=MOVED&amp;chfieldfrom=2020-03-22&amp;order=Last%20Updated&amp;query_format=advanced&amp;short_desc=wpt%20new%20failures%20css&amp;short_desc_type=allwordssubstr&amp;classification=Components&amp;product=Core">list of automatically created bugs in Firefox's bugzilla</a></strong>, as well as <a href="https://bugs.webkit.org/show_bug.cgi?id=210091">some</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=210586">of</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=210587">the</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=209983">bugs</a> filed in <strong><a href="https://bugs.webkit.org/">WebKit's bugzilla</a></strong> during the time we worked on this.
<p>&hellip;and note that this doesn&rsquo;t even include the additional <strong>96 Chromium-specific tests that we analyzed but determined were not yet eligible</strong> for migrating to WPT (normally because they relied on some internal Chromium API or non-standard behaviour), which would require further work to get them upstreamed. But that was a bit out of scope for those few weeks we could work on this, so we decided to focus on upstreaming the rest of tests instead.</p>
<p>Personally, I think this was a big win for the Web Platform and I&rsquo;m very proud and happy to have had an opportunity to have contributed to it during these dark times we&rsquo;re living, as part of my job at <a href="http://www.igalia.com">Igalia</a>. Now I&rsquo;m back to working on the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE/edit#heading=h.uokewwiwnmn" target="_blank" rel="nofollow noreferrer noopener">Blink Onion Soup 2.0 project</a>, where I think I should write about too, but that&rsquo;s a topic for a different blog post.</p>
<h2><a id="user-content-credit-where-credit-is-due" class="anchor" href="#credit-where-credit-is-due" aria-hidden="true"></a>Credit where credit is due</h2>
<a href="https://www.igalia.com"><img src="https://i2.wp.com/mariospr.org/wp-content/uploads/2020/05/IgaliaLogoSmall.png" alt="Igalia" align="right" /></a>I wouldn't want to finish off this blog post without acknowledging all the different contributors who tirelessly worked on this effort to help improve the Web Platform by providing the WPT project with these many tests more, so here it is:
<p>From the <a href="http://www.igalia.com">Igalia</a> side, my whole team was the one which took on this challenge, that is: Abhijeet, Antonio, Gyuyoung, Henrique, Julie, Shin and myself. Kudos everyone!</p>
<p>And from the reviewing side, many people chimed in but I&rsquo;d like to thank in particular the following persons, who were deeply involved with the whole effort from beginning to end regardless of their affiliation: Christian Biesinger, David Grogan, Robert Ma, Stephen Chenney, Fredrik Söderquist, Manuel Rego Casasnovas and Javier Fernandez. Many thanks to all of you!</p>
<p>Take care and stay safe!</p>
]]></content:encoded></item><item><title>End of the year Update: 2019 edition</title><link>https://mariospr.org/2019/12/23/end-of-the-year-update-2019-edition/</link><pubDate>Mon, 23 Dec 2019 23:13:01 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=2770</guid><description>&lt;p&gt;It&amp;rsquo;s the end of December and it seems that yet another year has gone by, so I figured that I&amp;rsquo;d write an EOY update to summarize my main work at &lt;a href="https://www.igalia.com"&gt;Igalia&lt;/a&gt; as part of our &lt;a href="https://www.igalia.com/project/chromium"&gt;Chromium team&lt;/a&gt;, as my humble attempt to make up for the lack of posts in this blog during this year.&lt;/p&gt;
&lt;p&gt;I did quit a few things this year, but for the purpose of this blog post I&amp;rsquo;ll focus on what I consider the most relevant ones: work on the &lt;a href="https://www.chromium.org/servicification"&gt;Servicification&lt;/a&gt; and the &lt;a href="https://docs.google.com/document/d/13XsbaBz7A2H0PZIdFcytHf5-fVOlAfkLlIUKhxKzs44"&gt;Blink Onion Soup&lt;/a&gt; projects, the &lt;a href="https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E"&gt;migration to the new Mojo APIs&lt;/a&gt; and the &lt;a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0"&gt;BrowserInterfaceBroker&lt;/a&gt;, as well as a summary of the conferences I attended, both as a regular attendee and a speaker.&lt;/p&gt;</description><content:encoded><![CDATA[<p>It&rsquo;s the end of December and it seems that yet another year has gone by, so I figured that I&rsquo;d write an EOY update to summarize my main work at <a href="https://www.igalia.com">Igalia</a> as part of our <a href="https://www.igalia.com/project/chromium">Chromium team</a>, as my humble attempt to make up for the lack of posts in this blog during this year.</p>
<p>I did quit a few things this year, but for the purpose of this blog post I&rsquo;ll focus on what I consider the most relevant ones: work on the <a href="https://www.chromium.org/servicification">Servicification</a> and the <a href="https://docs.google.com/document/d/13XsbaBz7A2H0PZIdFcytHf5-fVOlAfkLlIUKhxKzs44">Blink Onion Soup</a> projects, the <a href="https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E">migration to the new Mojo APIs</a> and the <a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0">BrowserInterfaceBroker</a>, as well as a summary of the conferences I attended, both as a regular attendee and a speaker.</p>
<p>But enough of an introduction, let&rsquo;s dive now into the gory details&hellip;</p>
<h2>Servicification: migration to the Identity service</h2>
<a href="/wp-content/uploads/2019/01/chromium-s13n-layers-1.png"><img style="margin: 6px;" src="/wp-content/uploads/2019/12/chromium-s13n-layers_small-1.png" align="right" /></a>As explained in my <a href="/2019/01/29/working-on-the-chromium-servicification-project/">previous post from January</a>, I've started this year working on the <strong><a href="https://www.chromium.org/servicification">Chromium Servicification (s13n) Project</a></strong>. More specifically, I joined my team mates in helping with the migration to the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/identity">Identity service</a> by updating consumers of several classes from the <a href="https://chromium.googlesource.com/chromium/src/+/master/components/signin">sign-in component</a> to ensure they now use the new <a href="https://source.chromium.org/chromium/chromium/src/+/master:components/signin/public/identity_manager/identity_manager.h">IdentityManager</a> API instead of directly accessing those other lower level APIs.
<p>This was important because at some point the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/identity">Identity Service</a> will run in a separate process, and a precondition for that to happen is that all access to sign-in related functionality would have to go through the <a href="https://source.chromium.org/chromium/chromium/src/+/master:components/signin/public/identity_manager/identity_manager.h">IdentityManager</a>, so that other process can communicate with it directly via <a href="https://source.chromium.org/chromium/chromium/src/+/master:services/identity/public/mojom">Mojo interfaces exposed by the Identity service</a>.</p>
<p>I&rsquo;ve already talked long enough in my <a href="/2019/01/29/working-on-the-chromium-servicification-project/">previous post</a>, so please take a look in there if you want to know more details on what that work was exactly about.</p>
<h2>The Blink Onion Soup project</h2>
Interestingly enough, a bit after finishing up working on the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/identity">Identity service</a>, our team dived deep into helping with another <a href="https://www.chromium.org/">Chromium project</a> that shared at least one of the goals of the s13n project: to improve the health of <a href="https://source.chromium.org/chromium/chromium/src">Chromium's massive codebase</a>. The project is code-named <strong>Blink Onion Soup</strong> and its main goal is, as described in the <a href="https://docs.google.com/document/d/13XsbaBz7A2H0PZIdFcytHf5-fVOlAfkLlIUKhxKzs44">original design document from 2015</a>, to <i>“simplify the codebase, empower developers to implement features that run faster, and remove hurdles for developers interfacing with the rest of the Chromium”</i>. There's also a <a href="https://docs.google.com/presentation/d/1Dpj4tpueCdne4MoRh6UOHrFTq3fdfz_yH5QGQInFCl4">nice slide deck from 2016's BlinkOn 6</a> that explains the idea in a more visual way, if you're interested.
<p style="text-align: center;"><a href="https://www.flickr.com/photos/29233640@N07/9585503388"><img src="/wp-content/uploads/2019/12/onionlayers_small.jpg" />
</a><small><a href="https://www.flickr.com/photos/29233640@N07/9585503388"><em>"Layers", by Robert Couse-Baker (CC BY 2.0)</em></a></small></p>
In a nutshell, the <strong>main idea</strong> is to <strong>simplify the codebase by removing/reducing the several layers of located between Chromium and Blink</strong> that were necessary back in the day, before Blink was forked out of WebKit, to support different embedders with their particular needs (e.g. Epiphany, Chromium, Safari...). Those layers made sense back then but these days Blink's only embedder is <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/content/README.md">Chromium's content module</a>, which is the module that Chrome and other Chromium-based browsers embed to leverage Chromium's implementation of the <a href="https://webplatform.github.io/">Web Platform</a>, and also where the <a href="https://www.chromium.org/developers/design-documents/multi-process-architecture">multi-process</a> and <a href="https://www.chromium.org/developers/design-documents/process-models#TOC-Sandboxes-and-plug-ins">sandboxing</a> architecture is implemented.
<p>And in order to implement the <a href="https://www.chromium.org/developers/design-documents/multi-process-architecture">multi-process</a> model, the <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/content/README.md">content module</a> is split in two main parts running in separate processes, which communicate among each other over IPC mechanisms: <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/browser"><code>//content/browser</code></a>, which represents the &ldquo;browser process&rdquo; that you embed in your application via the <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/content/public/README.md">Content API</a>, and <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a>, which represents the &ldquo;renderer process&rdquo; that internally runs the web engine&rsquo;s logic, that is, <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/">Blink</a>.</p>
<p>With this in mind, the <strong>initial version</strong> of the <strong>Blink Onion Soup</strong> project (aka <em><a href="https://docs.google.com/document/d/13XsbaBz7A2H0PZIdFcytHf5-fVOlAfkLlIUKhxKzs44">&ldquo;Onion Soup 1.0&rdquo;</a></em>) project was born about 4 years ago and the folks spearheading this proposal started working on a 3-way plan to implement their vision, which can be summarized as follows:</p>
<ol>
 	<li><strong>Migrate usage of <a href="https://www.chromium.org/developers/design-documents/inter-process-communication">Chromium's legacy IPC</a> to the new IPC</strong> mechanism called <strong><a href="https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md">Mojo</a></strong>.</li>
 	<li><strong>Move</strong> as much <strong>functionality</strong> as possible <strong>from <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a></strong> down <strong>into <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a></strong> itself.</li>
 	<li><strong>Slim down <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/public/">Blink's public APIs</a> </strong>by removing classes/enums unused outside of <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a>.</li>
</ol>
Three clear steps, but definitely not easy ones as you can imagine. First of all, if we were to remove levels of indirection between <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> and <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a> as well as to slim down <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/public/">Blink's public APIs</a> as much as possible, a precondition for that would be to allow direct communication between the browser process and <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a> itself, right?
<p>In other words, if you need your browser process to communicate with <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a> for some specific purpose (e.g. reacting in a visual way to a <a href="https://developers.google.com/web/fundamentals/push-notifications">Push Notification</a>), it would certainly be sub-optimal to have something like this:</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/blogpost-legacyipc-1.png"><img src="/wp-content/uploads/2019/12/blogpost-legacyipc_small.png" /></a></p>
...and yet that is what would happen if we kept using <a href="https://www.chromium.org/developers/design-documents/inter-process-communication">Chromium's legacy IPC</a> which, unlike <a href="https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md">Mojo</a>, doesn't allow us to communicate with Blink directly from <code><a href="https://source.chromium.org/chromium/chromium/src/+/master:content/browser">//content/browser</a></code>, meaning that we'd need to go first through <code><a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer">//content/renderer</a></code> and then navigate through different layers to move between there and Blink itself.
<p>In contrast, using <a href="https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md">Mojo</a> would allow us to have Blink implement those remote services internally and then <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/public/mojom">publicly declare the relevant Mojo interfaces</a> so that other processes can interact with them without going through extra layers. Thus, doing that <a href="https://chromium.googlesource.com/chromium/src.git/+/master/docs/mojo_ipc_conversion.md">kind of migration</a> would ultimately allow us to end up with something like this:</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/blogpost-mojoipc.png"><img src="/wp-content/uploads/2019/12/blogpost-mojoipc_small.png" /></a></p>
...which looks nicer indeed, since now it is possible to communicate directly with Blink, where the remote service would be implemented (either in its core or in a module). Besides, it would no longer be necessary to consume Blink's public API from <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a>, nor the other way around, enabling us to remove some code.
<p>However, we can&rsquo;t simply ignore some stuff that lives in <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> implementing part of the original logic so, before we can get to the lovely simplification shown above, we would likely need to move some logic from <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> right into <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a>, which is what the second bullet point of the list above is about. Unfortunately, this is not always possible but, whenever it is an option, the job here would be to figure out what of that logic in <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> is really needed and then figure out how to move it into Blink, likely removing some code along the way.</p>
<p>This particular step is what we commonly call <em>&ldquo;Onion Soup&rsquo;ing <code>//content/renderer/&lt;feature&gt;</code>&rdquo; </em>(not entirely sure &ldquo;Onion Soup&rdquo; is a verb in English, though&hellip;) and this is for instance how things looked before (left) and after (right) Onion Souping a feature I worked on myself: Chromium&rsquo;s implementation of the <a href="https://www.w3.org/TR/push-api/">Push API</a>:</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/OS-PushMessaging.png"><img src="/wp-content/uploads/2019/12/OS-PushMessaging_small.png" /></a>
<small><em>Onion Soup'ing //content/renderer/push_messaging</em></small></p>
Note how the whole design got quite simplified moving from the left to the right side? Well, that's because some abstract classes declared in Blink's public API and implemented in <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> (e.g. WebPushProvider, WebPushMessagingClient) are no longer needed now that those implementations got moved into Blink (i.e. PushProvider and PushMessagingClient), meaning that we can now finally remove them.
<p>Of course, there were also cases where we found some public APIs in Blink that were not used anywhere, as well as cases where they were only being used inside of Blink itself, perhaps because nobody noticed when that happened at some point in the past due to some other refactoring. In those cases the task was easier, as we would just remove them from the public API, if completely unused, or move them into Blink if still needed there, so that they are no longer exposed to a content module that no longer cares about that.</p>
<p>Now, trying to provide a <strong>high-level overview of what our team <em>&ldquo;Onion Soup&rsquo;ed&rdquo;</em> this year</strong>, I think I can say with confidence that we <strong>migrated</strong> (or helped migrate)<strong> more than 10 different modules</strong> like the one I mentioned above, such as <code>android/</code>, <code>appcache/</code>, <code>media/stream/</code>, <code>media/webrtc</code>, <code>push_messaging/</code> and <code>webdatabase/</code>, among others. You can see the full list with all the modules migrated during the lifetime of this project in the <a href="https://docs.google.com/spreadsheets/d/1VIINt17Dg2cJjPpoJ_HY3HI0uLpidql-1u8pBJtpbGk">spreadsheet tracking the Onion Soup efforts</a>.</p>
<p>In my particular case, I <em>&ldquo;Onion Soup&rsquo;ed&rdquo;</em> the <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=939943">PushMessaging</a>,  <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=933873">WebDatabase</a> and <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=980151">SurroundingText</a> features, which was a fairly complete exercise as it involved working on all the 3 bullet points: <a href="https://chromium.googlesource.com/chromium/src.git/+/master/docs/mojo_ipc_conversion.md">migrating to Mojo</a>, moving logic from <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> to Blink and removing unused classes from Blink&rsquo;s public API.</p>
<p>And <strong>as for slimming down Blink&rsquo;s public API</strong>, I can tell that we helped get to a point where <strong>more than 125 classes/enums were removed</strong> from that <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/public/">Blink&rsquo;s public APIs</a>, simplifying and reducing the Chromium code- base along the way, as you can check in <a href="https://docs.google.com/spreadsheets/d/1TBzERV4BAd9peJJrxvrVn1tZb-WrPb7iMFiRUqJ6crE">this other spreadsheet that tracked that particular piece of work</a>.</p>
<p>But we&rsquo;re not done yet! While <strong>overall progress for the Onion Soup 1.0 project</strong> is <strong>around 90%</strong> right now, there are still a few more modules that require <em>&ldquo;Onion Soup&rsquo;ing&rdquo;</em>, among which we&rsquo;ll be tackling <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer/media"><code>media/</code></a> (already WIP) and <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer/accessibility"><code>accessibility/</code></a> (starting in 2020), so there&rsquo;s quite some more work to be done on that regard.</p>
<p>Also, there is a newer design document for the so-called <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE"><strong>Onion Soup 2.0</strong></a> project that contains some tasks that we have been already working on for a while, such as &ldquo;Finish Onion Soup 1.0&rdquo;, &ldquo;Slim down Blink public APIs&rdquo;, &ldquo;Switch Mojo to new syntax&rdquo; and &ldquo;Convert legacy IPC in //content to Mojo&rdquo;, so definitely not done yet. Good news here, though: some of those tasks are already quite advanced already, and in the particular case of the migration to the new Mojo syntax it&rsquo;s nearly done by now, which is precisely what I&rsquo;m talking about next&hellip;</p>
<h2>Migration to the new Mojo APIs and the BrowserInterfaceBroker</h2>
Along with working on <em>"Onion Soup'ing"</em> some features, a big chunk of my time this year went also into this other task from the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE"><strong>Onion Soup 2.0</strong></a> project, where I was lucky enough again not to be alone, but accompanied by several of my team mates from <a href="https://www.igalia.com">Igalia</a>'s Chromium team.
<p>This was a massive task where we worked hard to migrate <strong>all of Chromium&rsquo;s codebase</strong> to the new Mojo APIs that were introduced a few months back, with the idea of getting Blink updated first and then having everything else migrated by the end of the year.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/MojoMigrationsStats2019.png"><img src="/wp-content/uploads/2019/12/MojoMigrationsStats2019_small.png" /></a>
<small><em>Progress of migrations to the new Mojo syntax: June 1st - Dec 23rd, 2019</em></small></p>
But first things first: you might be wondering what was wrong with the "old" Mojo APIs since, after all, Mojo is the new thing we were migrating to from <a href="https://www.chromium.org/developers/design-documents/inter-process-communication">Chromium's legacy API</a>, right?
<p>Well, as it turns out, the previous APIs had a few problems that were causing some confusion due to not providing the most intuitive type names (e.g. what is an <a href="https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/cpp/bindings/interface_ptr_info.h"><code>InterfacePtrInfo</code></a> anyway?), as well as being quite error-prone since the old types were not as strict as the new ones enforcing certain conditions that should not happen (e.g. trying to bind an already-bound endpoint shouldn&rsquo;t be allowed). In the <a href="https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E">Mojo Bindings Conversion Cheatsheet</a> you can find an exhaustive list of cases that needed to be considered, in case you want to know more details about these type of migrations.</p>
<p>Now, as a consequence of this additional complexity, the task wouldn&rsquo;t be as simple as a &ldquo;search &amp; replace&rdquo; operation because, while moving from old to new code, it would often be necessary to fix situations where the old code was working fine just because it was relying on some constraints not being checked. And if you top that up with the fact that there were, literally, <strong>thousands of lines</strong> in the Chromium codebase using the old types, then you&rsquo;ll see why this was a massive task to take on.</p>
<p>Fortunately, after a few months of hard work done by our <a href="https://www.igalia.com/project/chromium">Chromium team</a>, we can proudly say that we have <strong>nearly finished this task</strong>, which involved<strong> more than 1100 patches landed upstream</strong> after combining the patches that migrated the types inside Blink (see <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=978694">bug 978694</a>) with those that tackled the rest of the Chromium repository (see <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=955171">bug 955171</a>).</p>
<p>And by &ldquo;nearly finished&rdquo; I mean an <strong>overall progress of 99.21%</strong> according to the <a href="https://docs.google.com/spreadsheets/d/1khYVrfnN74RSDqqXgCFlG9fI89IKWA9J32Ln_2ZcTaU">Migration to new mojo types spreadsheet</a> where we track this effort, where <strong style="font-size: 1rem;">Blink and //content have been fully migrated</strong>, and <strong>all the other directories</strong>, aggregated together, are at <strong>98.64%</strong>, not bad!</p>
<p>On this regard, I&rsquo;ve been also sending a bi-weekly status report mail to the <a href="https://groups.google.com/a/chromium.org/forum/#!forum/chromium-mojo">chromium-mojo</a> and <a href="https://groups.google.com/a/chromium.org/forum/#!forum/platform-architecture-dev">platform-architecture-dev</a> mailing lists for a while (see the <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-mojo/kSVBn0Y6vQA/CiPtFMqEAgAJ">latest report here</a>), so make sure to subscribe there if you&rsquo;re interested, even though those reports might not last much longer!</p>
<p>Now, back with our feet on the ground, the main roadblock at the moment preventing us from reaching 100% is <a href="https://source.chromium.org/chromium/chromium/src/+/master:components/arc"><code>//components/arc</code></a>, whose migration needs to be agreed with the folks maintaining a copy of <a href="https://source.chromium.org/chromium/chromium/src/+/master:components/arc/mojom">Chromium&rsquo;s ARC mojo files</a> for Android and ChromeOS. This is currently under discussion (<a href="https://groups.google.com/a/chromium.org/d/msg/chromium-mojo/BRK0Xeu7bgQ/LWL2ELAOAwAJ">see chromium-mojo ML</a> and <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1035484">bug 1035484</a>) and so I&rsquo;m confident it will be something we&rsquo;ll hopefully be able to achieve early next year.</p>
<p>Finally, and still related to this Mojo migrations, my colleague <a href="https://blogs.igalia.com/mshin/">Shin</a> and I took a &ldquo;little detour&rdquo; while working on this migration and focused for a while in the more specific task of <strong><a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0">migrating uses of Chromium&rsquo;s InterfaceProvider to the new BrowserInterfaceBroker class</a></strong>. And while this was not a task as massive as the other migration, it was also very important because, besides fixing some problems inherent to the old <a href="https://source.chromium.org/chromium/chromium/src/+/master:services/service_manager/public/cpp/interface_provider.h"><code>InterfaceProvider</code></a> API, it also blocked the migration to the new mojo types as <a href="https://source.chromium.org/chromium/chromium/src/+/master:services/service_manager/public/cpp/interface_provider.h"><code>InterfaceProvider</code></a> did usually rely on the old types!</p>
<p style="text-align: center;"><a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0"><img src="/wp-content/uploads/2019/12/BrowserInterfaceBroker_small.png" /></a>
<a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0"><small><em>Architecture of the BrowserInterfaceBroker</em></small></a></p>
Good news here as well, though: after having the two of us working on this task for a few weeks, we can proudly say that, today, <strong>we have finished all the 132 migrations</strong> that were needed and are now in the process of doing some after-the-job cleanup operations that will remove even more code from the repository! \o/
<h2>Attendance to conferences</h2>
This year was particularly busy for me in terms of conferences, as I did travel to a few events both as an attendee and a speaker. So, here's a summary about that as well:
<p><img style="margin: 6px;" src="/wp-content/uploads/2019/12/fosdem-2019_small.png" align="right" />As usual, I started the year attending one of my favourite conferences of the year by going to <strong><a href="https://archive.fosdem.org/2019/">FOSDEM 2019</a></strong> in Brussels. And even though I didn&rsquo;t have any talk to present in there, I did enjoy my visit like every year I go there. Being able to meet so many people and being able to attend such an impressive amount of interesting talks over the weekend while having some beers and chocolate is always great!</p>
<p>Next stop was Toronto, Canada, where I attended <strong><a href="https://docs.google.com/document/u/1/d/e/2PACX-1vTgBrqyQ4KCchsymvssri1pN1BkOg3sEqHThqhvFDl9-zl-hLx1S5c8sc5gaZ_VzKEVaYj94H3m1vso/pub">BlinkOn 10</a></strong> on April 9th &amp; 10th. I was honoured to have a chance to <a href="https://speakerdeck.com/mariospr/summary-of-igalias-contributions-to-chromium-in-the-past-year"><strong>present a summary of the contributions that Igalia</strong> <strong>made to the Chromium</strong></a> Open Source project in the 12 months before the event, which was a rewarding experience but also quite an intense one, because it was a lightning talk and I had to go through all the ~10 slides in a bit under 3 minutes! <strong><a href="https://speakerdeck.com/mariospr/summary-of-igalias-contributions-to-chromium-in-the-past-year">Slides are here</a></strong> and there is also a <strong><a href="https://www.youtube.com/watch?v=XZ08w8wIo3I">video of the talk</a>,</strong> in case you want to check how crazy that was.</p>
<p>Took a bit of a rest from conferences over the summer and then attended, also as usual, the <strong><a href="https://webengineshackfest.org/2019/">Web Engines Hackfest</a></strong> that we at <a href="https://www.igalia.com">Igalia</a> have been organising every single year since 2009. Didn&rsquo;t have a presentation this time, but still it was a blast to attend it once again as an Igalian and celebrate the hackfest&rsquo;s 10th anniversary sharing knowledge and experiences with the <a href="https://webengineshackfest.org/2019/#attendees">people who attended this year&rsquo;s edition</a>.</p>
<p><img style="margin: 6px;" src="/wp-content/uploads/2019/12/Chromium_logo_small.png" align="right" />Finally, I attended two conferences in the Bay Area by mid November: first one was the <strong><a href="https://developer.chrome.com/devsummit/">Chrome Dev Summit 2019</a></strong> in San Francisco on Nov 11-12, and the second one was <strong><a href="https://docs.google.com/document/u/2/d/e/2PACX-1vR9u7kNG0X5tkblbkBWc-lGtPj-E5i9eYbsocSeY6fwzg4qwf_Ajw-QPyFCtr-bXiWngmDtLaBJncd6/pub">BlinkOn 11</a></strong> in Sunnyvale on Nov 14-15. It was my first time at the <a href="https://developer.chrome.com/devsummit/">Chrome Dev Summit</a> and I have to say I was fairly impressed by the event, how it was organised and the quality of the talks in there. It was also great for me, as a browsers developer, to see first hand what are the things web developers are more &amp; less excited about, what&rsquo;s coming next&hellip; and to get to meet people I would have never had a chance to meet in other events.</p>
<p>As for <a href="https://docs.google.com/document/u/2/d/e/2PACX-1vR9u7kNG0X5tkblbkBWc-lGtPj-E5i9eYbsocSeY6fwzg4qwf_Ajw-QPyFCtr-bXiWngmDtLaBJncd6/pub">BlinkOn 11</a>, I presented a 30 min <strong><a href="https://speakerdeck.com/mariospr/improving-chromiums-code-health-onion-soup-and-beyond">talk about our work on the Onion Soup project, the Mojo migrations and improving Chromium&rsquo;s code health</a></strong> in general, along with my colleague <a href="https://blogs.igalia.com/tonikitoo">Antonio Gomes</a>. It was basically a &ldquo;extended&rdquo; version of this post where we went not only through the tasks I was personally involved with, but also talked about other tasks that other members of our team worked on during this year, which include way many other things! Feel free to check out the <a href="https://speakerdeck.com/mariospr/improving-chromiums-code-health-onion-soup-and-beyond"><strong>slides here</strong></a>, as well as the <strong><a href="https://youtu.be/0T-ZMW5PiDY">video of the talk</a></strong>.</p>
<h2>Wrapping Up</h2>
As you might have guessed, 2019 has been a pretty exciting and busy year for me work-wise, but the most interesting bit in my opinion is that what I mentioned here was just the tip of the iceberg... many other things happened in the personal side of things, starting with the fact that this was the year that we consolidated our return to Spain after 6 years living abroad, for instance.
<p>Also, and getting back to work-related stuff here again, this year I also became accepted back at <a href="https://www.igalia.com">Igalia</a>&rsquo;s Assembly after having <a href="/2018/08/03/on-moving/">re-joined this amazing company back in September 2018 after a 6-year &ldquo;gap&rdquo; living and working in the UK</a> which, besides being something I was very excited and happy about, also brought some more responsibilities onto my plate, as it&rsquo;s natural.</p>
<p>Last, I can&rsquo;t finish this post without being explicitly grateful for all the people I got to interact with during this year, both at work and outside, which made my life easier and nicer at so many different levels. To all of you,  cheers!</p>
<p>And to everyone else reading this&hellip; happy holidays and happy new year in advance!</p>
]]></content:encoded></item><item><title>Working on the Chromium Servicification Project</title><link>https://mariospr.org/2019/01/29/working-on-the-chromium-servicification-project/</link><pubDate>Tue, 29 Jan 2019 18:35:44 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=2660</guid><description>&lt;p&gt;&lt;a href="https://www.igalia.com/browsers-webkit-chromium"&gt;&lt;img class="alignright wp-image-2687" src="https://mariospr.org/wp-content/uploads/2019/01/igalia-chromium-logos-vertical-147x300.png" alt="Igalia &amp;amp; Chromium" width="108" height="220" /&gt;&lt;/a&gt;It's been a few months already since I (re)joined &lt;a href="https://www.igalia.com/"&gt;Igalia&lt;/a&gt; as part of its &lt;a href="https://www.igalia.com/browsers-webkit-chromium/"&gt;Chromium team&lt;/a&gt; and I couldn't be happier about it: right since the very first day, I felt perfectly integrated as part of the team that I'd be part of and quickly started making my way through the -fully upstream- project that would keep me busy during the following months: the &lt;strong&gt;&lt;a href="https://www.chromium.org/servicification"&gt;Chromium Servicification Project&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;But what is this "&lt;a href="https://www.chromium.org/servicification"&gt;Chromium servicification project&lt;/a&gt;"? Well, according to the &lt;a href="https://en.wiktionary.org/wiki/servicification"&gt;Wiktionary&lt;/a&gt; the word &lt;em&gt;"servicification"&lt;/em&gt; means, applied to computing, &lt;em&gt;"the migration from monolithic legacy applications to service-based components and solutions"&lt;/em&gt;, which is exactly what this project is about: as described in the &lt;a href="https://www.chromium.org/servicification"&gt;Chromium servicification project's website&lt;/a&gt;, the whole purpose behind this idea is &lt;em&gt;"to migrate the code base to a more modular, service-oriented architecture"&lt;/em&gt;, in order to &lt;em&gt;"produce reusable and decoupled components while also reducing duplication"&lt;/em&gt;.&lt;/p&gt;</description><content:encoded><![CDATA[<p><a href="https://www.igalia.com/browsers-webkit-chromium"><img class="alignright wp-image-2687" src="/wp-content/uploads/2019/01/igalia-chromium-logos-vertical-147x300.png" alt="Igalia &amp; Chromium" width="108" height="220" /></a>It's been a few months already since I (re)joined <a href="https://www.igalia.com/">Igalia</a> as part of its <a href="https://www.igalia.com/browsers-webkit-chromium/">Chromium team</a> and I couldn't be happier about it: right since the very first day, I felt perfectly integrated as part of the team that I'd be part of and quickly started making my way through the -fully upstream- project that would keep me busy during the following months: the <strong><a href="https://www.chromium.org/servicification">Chromium Servicification Project</a></strong>.</p>
<p>But what is this "<a href="https://www.chromium.org/servicification">Chromium servicification project</a>"? Well, according to the <a href="https://en.wiktionary.org/wiki/servicification">Wiktionary</a> the word <em>"servicification"</em> means, applied to computing, <em>"the migration from monolithic legacy applications to service-based components and solutions"</em>, which is exactly what this project is about: as described in the <a href="https://www.chromium.org/servicification">Chromium servicification project's website</a>, the whole purpose behind this idea is <em>"to migrate the code base to a more modular, service-oriented architecture"</em>, in order to <em>"produce reusable and decoupled components while also reducing duplication"</em>.</p>
<p>Doing so would not only make Chromium a more manageable project from a source code-related point of view and create better and more stable interfaces to embed chromium from different projects, but should also enable teams to experiment with new features by combining these services in different ways, as well as to ship different products based in Chromium without having to bundle the whole world just to provide a particular set of features. </p>
<p>For instance, as <a href="https://www.linkedin.com/in/camille-lamy-2506a459">Camille Lamy</a> put it in the <a href="https://www.youtube.com/watch?v=AHlZ_T74nOo">talk delivered</a> (<a href="https://webengineshackfest.org/2018/slides/servicification-modularizing-chromium-by-camille-lamy-colin-blundell-and-robert-kroeger.pdf">slides here</a>) during the <a href="https://webengineshackfest.org/2018/">latest Web Engines Hackfest</a>,  <em>"it might be interesting long term that the user only downloads the bits of the app they need so, for instance, if you have a very low-end phone, support for VR is probably not very useful for you"</em>. This is of course not the current status of things yet (right now everything is bundled into a big executable), but it's still a good way to visualise where this idea of moving to a services-oriented architecture should take us in the long run.</p>
<p><a href="/wp-content/uploads/2019/01/chromium-s13n-layers-1.png"><img class="size-medium wp-image-2711 alignright" src="/wp-content/uploads/2019/01/chromium-s13n-layers-1-269x300.png" alt="Chromium Servicification Layers" width="269" height="300" /></a></p>
<p>With this in mind, the idea behind this project would be to work on the migration of the different parts of Chromium depending on those components that are being converted into services, which would be part of a "foundation" base layer providing the core services that any application, framework or runtime build on top of chromium would need.</p>
<p>As you can imagine, the whole idea of refactoring such an enormous code base like Chromium's is daunting and a lot of work, especially considering that currently ongoing efforts can't simply be stopped just to perform this migration, and that is where our focus is currently aimed at: we integrate with different teams from the Chromium project working on the migration of those components into services, and we make sure that the clients of their old APIs move away from them and use the new services' APIs instead, while keeping everything running normally in the meantime.</p>
<p>At the beginning, we started working on the migration to the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/network">Network Service</a> (which allows to run Chromium's network stack even without a browser) and managed to get it shipped in Chromium Beta by early October already, which was a pretty big deal as far as I understand. In my particular case, that stage was a very short ride since such migration was nearly done by the time I joined Igalia, but still something worth mentioning due to the impact it had in the project, for extra context.</p>
<p>After that, our team started working on the migration of the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/identity">Identity service,</a> where the main idea is to encapsulate the functionality of accessing the user's identities right through this service, so that one day this logic can be run outside of the browser process. One interesting bit about this migration is that this particular functionality (largely implemented inside the <a href="https://chromium.googlesource.com/chromium/src/+/master/components/signin">sign-in component</a>) has historically been located quite high up in the stack, and yet it's now being pushed all the way down into that "foundation" base layer, as a core service. That's probably one of the factors contributing to making this migration quite complicated, but everyone involved is being very dedicated and has been very helpful so far, so I'm confident we'll get there in a reasonable time frame.</p>
<p>If you're curious enough, though, you can check this <a href="https://groups.google.com/a/chromium.org/forum/#!topic/identity-service-dev/c18zBMpaj-8">status report for the Identity service</a>, where you can see the evolution of this particular migration, along with the impact our team had since we started working on this part, back on early October. There are more reports and more information in the <a href="https://groups.google.com/a/chromium.org/forum/#!forum/identity-service-dev">mailing list for the Identity service</a>, so feel free to check it out and/or subscribe there if you like.</p>
<p>One clarification is needed, tough: for now, the scope of this migrations is focused on using the public C++ APIs that such services expose (see <code>//services/&lt;service_name&gt;/public/cpp</code>), but in the long run the idea is that those services will also provide <a href="https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md">Mojo interfaces</a>. That will enable using their functionality regardless of whether you're running those services as part of the browser's process, or inside their own &amp; separate processes, which will then allow the flexibility that chromium will need to run smoothly and safely in different kind of environments, from the least constrained ones to others with a less favourable set of resources at their disposal.</p>
<p>And this is it for now, I think. I was really looking forward to writing a status update about what I've been up to in the past months and here it is, even though it's not the shortest of all reports.</p>
<div class="wp-block-image">
<figure class="alignright"><a href="https://fosdem.org"><img class="wp-image-2679" src="/wp-content/uploads/2019/01/fosdem-2019.png" alt="FOSDEM 2019" /></a></figure>
</div>
<p>One last thing, though: as usual, I'm <strong>going to <a href="https://fosdem.org/">FOSDEM</a></strong> this year as well, along with a bunch of colleagues &amp; friends from <a href="https://www.igalia.com/">Igalia</a>, so please feel free to drop me/us a line if you want to chat and/or hangout, either to talk about work-related matters or anything else really.</p>
<p>And, of course, I'd be also more than happy to talk about any of the <strong><a href="https://www.igalia.com/nc/about-us">open job positions at Igalia</a></strong>, should you consider applying. There are quite a few of them available at the moment for all kind of things (most of them available for remote work): from more technical roles such as <a href="https://www.igalia.com/nc/about-us/form/webkit-graphics-developer">graphics</a>, <a href="https://www.igalia.com/nc/about-us/form/compilers-developer">compilers</a>, <a href="https://www.igalia.com/nc/about-us/form/multimedia-developer">multimedia</a>, <a href="https://www.igalia.com/nc/about-us/form/javascript-engine-developer">JavaScript engines</a>, browsers (<a href="https://www.igalia.com/nc/about-us/form/webkit-developer">WebKit</a>, <a href="https://www.igalia.com/nc/about-us/form/chromium-developer">Chromium</a>, <a href="https://www.igalia.com/nc/about-us/form/web-platform-engineer">Web Platform</a>) or <a href="https://www.igalia.com/nc/about-us/form/senior-systems-administrator-galicia-spain">systems administration</a> (this one not available for remotes, though), to other less "hands-on" types of roles like <a href="https://www.igalia.com/nc/about-us/form/developer-advocate">developer advocate</a>, <a href="https://www.igalia.com/nc/about-us/form/sales-engineer">sales engineer</a> or <a href="https://www.igalia.com/nc/about-us/form/project-manager">project manager</a>, so it's possible there's something interesting for you if you're considering to join such an special company like this one.</p>
<p>See you in <strong><a href="https://fosdem.org/">FOSDEM</a></strong>!</p>
]]></content:encoded></item><item><title>Chromium Browser on xdg-app</title><link>https://mariospr.org/2016/04/13/chromium-browser-on-xdg-app/</link><pubDate>Wed, 13 Apr 2016 11:17:10 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=2135</guid><description>&lt;p&gt;Last week I had the chance to attend for 3 days the &lt;a href="https://wiki.gnome.org/Hackfests/GnomeSoftware2016"&gt;GNOME Software Hackfest,&lt;/a&gt; organized by &lt;a href="https://blogs.gnome.org/hughsie"&gt;Richard Hughes &lt;/a&gt;and hosted at the brand new &lt;a href="https://www.redhat.com/en/about/office-locations"&gt;Red Hat&amp;rsquo;s London office&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And besides meeting new people and some old friends (which I admit to be one of my favourite aspects about attending these kind of events), and discovering what it&amp;rsquo;s now &lt;a href="http://boroughmarket.org.uk"&gt;my new favourite place for fast-food near London bridge&lt;/a&gt;, I happened to learn quite a few new things while working on my particular personal quest: getting &lt;a href="http://www.chromium.org/Home"&gt;Chromium browser&lt;/a&gt; to run as an &lt;a href="https://wiki.gnome.org/Projects/SandboxedApps"&gt;xdg-app&lt;/a&gt;.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Last week I had the chance to attend for 3 days the <a href="https://wiki.gnome.org/Hackfests/GnomeSoftware2016">GNOME Software Hackfest,</a> organized by <a href="https://blogs.gnome.org/hughsie">Richard Hughes </a>and hosted at the brand new <a href="https://www.redhat.com/en/about/office-locations">Red Hat&rsquo;s London office</a>.</p>
<p>And besides meeting new people and some old friends (which I admit to be one of my favourite aspects about attending these kind of events), and discovering what it&rsquo;s now <a href="http://boroughmarket.org.uk">my new favourite place for fast-food near London bridge</a>, I happened to learn quite a few new things while working on my particular personal quest: getting <a href="http://www.chromium.org/Home">Chromium browser</a> to run as an <a href="https://wiki.gnome.org/Projects/SandboxedApps">xdg-app</a>.</p>
<p>While this might not seem to be an immediate need for <a href="https://www.endlessm.com">Endless</a> right now (we currently ship a Chromium-based browser as part of our <a href="https://ostree.readthedocs.org/en/latest/">OSTree</a> based system), this was definitely something worth exploring as we are now implementing the next version of <a href="https://endlessm.com/press/endless_os_appstore_en/">our App Center </a>(which will be based on <a href="https://wiki.gnome.org/Apps/Software">GNOME Software</a> and <a href="https://wiki.gnome.org/Projects/SandboxedApps">xdg-app</a>). Chromium updates very frequently with fixes and new features, and so being able to update it separately and more quickly than the OS is very valuable.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2016/04/Endless_OS_Appstore_EN.png"><img src="/wp-content/uploads/2016/04/Endless_OS_Appstore_EN-600x338.png" alt="Endless OS App Center" width="584" height="329" /></a>
Screenshot of Endless OS's current App Center</p>
So, while <a href="http://www.joaquimrocha.com/">Joaquim</a> and <a href="http://ramcq.net">Rob</a> were working on the GNOME Software related bits and discussing aspects related to <a href="https://build.gnome.org">Continuous Integration</a> with the rest of the crowd, I spent some time learning about xdg-app and trying to get Chromium to build that way which, unsurprisingly, was not an easy task.
<p>Fortunately, the <a href="https://wiki.gnome.org/Projects/SandboxedApps">base documentation about xdg-app</a> together with <a href="https://blogs.gnome.org/alexl/2016/02/19/building-an-xdg-app-part-1">Alex Larsson&rsquo;s blog post series</a> about this topic (which I wholeheartedly recommend reading) and some experimentation from my side was enough to get started with the whole thing, and I was quickly on my way to fixing build issues, adding missing deps and the like.</p>
<p>Note that my goal at this time was <strong>not</strong> to get a fully featured Chromium browser running, but to get something running based on the version that we use use in Endless (Chromium 48.0.2564.82), with a couple of things disabled for now (e.g. chromium&rsquo;s own sandbox, udev integration&hellip;) and putting, of course, some holes in the xdg-app configuration so that Chromium can access the system&rsquo;s parts that are needed for it to function (e.g. network, X11, shared memory, pulseaudio&hellip;).</p>
<p>Of course, the long term goal is to close as many of those holes as possible using <a href="https://wiki.gnome.org/Projects/SandboxedApps/Sandbox">Portals</a> instead, as well as not giving up on Chromium&rsquo;s own sandbox right away (some work will be needed here, since <code>setuid</code> binaries are a no-go in xdg-app&rsquo;s world), but for the time being I&rsquo;m pretty satisfied (and kind of surprised, even) that I managed to get the whole beast built and running after 4 days of work since I started :-).</p>
<p>But, as <a href="https://siliconislandblog.wordpress.com/">Alberto</a> usually says&hellip; &ldquo;screencast or it didn&rsquo;t happen!&rdquo;, so I recorded a video yesterday to properly share my excitement with the world. Here you have it:</p>
<p style="text-align: center;"><iframe src="https://www.youtube.com/embed/euwSnOm89hM" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
[<a href="https://www.youtube.com/watch?v=euwSnOm89hM">VIDEO: Chromium Browser running as an xdg-app</a>]</p>
As mentioned above, this is <em>work-in-progress</em> stuff, so please hold your horses and manage your expectations wisely. It's not quite there yet in terms of what I'd like to see, but definitely a step forward in the right direction, and something I hope will be useful not only for us, but for the entire Linux community as a whole. Should you were curious about the current status of the whole thing, feel free to check the relevant files at <a href="https://github.com/mariospr/chromium-browser-xdg-app">its git repository here</a>.
<p>Last, I would like to finish this blog post saying thanks specially to <a href="https://blogs.gnome.org/hughsie">Richard Hughes</a> for organizing this event, as well as the <a href="https://www.gnome.org/foundation/">GNOME Foundation</a> and <a href="http://www.redhat.com/">Red Hat</a> for their support in the development of <a href="https://wiki.gnome.org/Apps/Software">GNOME Software</a> and <a href="https://wiki.gnome.org/Projects/SandboxedApps">xdg-app</a>. Finally, I&rsquo;d also like to thank my employer <a href="https://www.endlessm.com">Endless</a> for supporting me to attend this hackfest. It&rsquo;s been a terrific week indeed&hellip; thank you all!</p>
<img src="https://feaneron.files.wordpress.com/2016/02/banner-down.png?w=810" alt="Credit to Georges Stavracas" align="middle" />
<p style="text-align: center;">Credit to <a href="https://feaneron.com/home/blog">Georges Stavracas</a></p>
]]></content:encoded></item><item><title>Importing include paths in Eclipse</title><link>https://mariospr.org/2015/11/07/importing-include-paths-in-eclipse/</link><pubDate>Sat, 07 Nov 2015 02:35:51 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=2071</guid><description>&lt;p&gt;First of all, let me be clear: no, I&amp;rsquo;m not &lt;a href="https://mariospr.org/2013/03/23/multiple-cursors-emacs-and-me/"&gt;trying to leave Emacs again&lt;/a&gt;, already got over that stage. Emacs is and will be my main editor for the foreseeable future, as it&amp;rsquo;s clear to me that there&amp;rsquo;s no other editor I feel more comfortable with, which is why I spent some time &lt;a href="https://github.com/mariospr/emacs-configuration"&gt;cleaning up my .emacs.d and making it more &amp;ldquo;manageable&amp;rdquo;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But as much as like Emacs as my main &amp;ldquo;weapon&amp;rdquo;, I sometimes appreciate the advantages of using a different kind of beast for specific purposes. And, believe me or not, in the past 2 years I learned to love &lt;a href="https://eclipse.org/cdt/"&gt;Eclipse/CDT&lt;/a&gt; as the best work-mate I know when I need some extra help to get deep inside of the two monster C++ projects that &lt;a href="http://www.webkit.org"&gt;WebKit&lt;/a&gt; and &lt;a href="http://www.chromium.org/"&gt;Chromium&lt;/a&gt; are. And yes, I know Eclipse is resource hungry, slow, bloated&amp;hellip; and whatnot; but I&amp;rsquo;m lucky enough to have fast &lt;em&gt;SSDs&lt;/em&gt; and lots of RAM in my laptop &amp;amp; desktop machines, so that&amp;rsquo;s not really a big concern anymore for me (even though I reckon that indexing chromium in the laptop takes &amp;ldquo;quite some time&amp;rdquo;), so let&amp;rsquo;s move on :-)&lt;/p&gt;</description><content:encoded><![CDATA[<p>First of all, let me be clear: no, I&rsquo;m not <a href="/2013/03/23/multiple-cursors-emacs-and-me/">trying to leave Emacs again</a>, already got over that stage. Emacs is and will be my main editor for the foreseeable future, as it&rsquo;s clear to me that there&rsquo;s no other editor I feel more comfortable with, which is why I spent some time <a href="https://github.com/mariospr/emacs-configuration">cleaning up my .emacs.d and making it more &ldquo;manageable&rdquo;</a>.</p>
<p>But as much as like Emacs as my main &ldquo;weapon&rdquo;, I sometimes appreciate the advantages of using a different kind of beast for specific purposes. And, believe me or not, in the past 2 years I learned to love <a href="https://eclipse.org/cdt/">Eclipse/CDT</a> as the best work-mate I know when I need some extra help to get deep inside of the two monster C++ projects that <a href="http://www.webkit.org">WebKit</a> and <a href="http://www.chromium.org/">Chromium</a> are. And yes, I know Eclipse is resource hungry, slow, bloated&hellip; and whatnot; but I&rsquo;m lucky enough to have fast <em>SSDs</em> and lots of RAM in my laptop &amp; desktop machines, so that&rsquo;s not really a big concern anymore for me (even though I reckon that indexing chromium in the laptop takes &ldquo;quite some time&rdquo;), so let&rsquo;s move on :-)</p>
<p>However, there&rsquo;s this one little thing that still bothers quite me a lot of Eclipse: you need to <a href="http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_proj_paths.htm">manually setup the include paths for the external dependencies not in a standard location that a C/C++ project uses</a>, so that you can get certain features properly working such as code auto-completion, automatic error-checking features, call hierarchies&hellip; and so forth.</p>
<p>And yes, I know there is an <a href="https://marketplace.eclipse.org/content/pkg-config-support-eclipse-cdt">Eclipse plugin adding support for pkg-config</a> which should do the job quite well. But for some reason I can&rsquo;t get it to work with <a href="https://projects.eclipse.org/releases/mars">Eclipse Mars</a>, even though others apparently can use it there for some reason (and I remember using it with <a href="https://eclipse.org/juno/">Eclipse Juno</a>, so it&rsquo;s definitely not a myth).</p>
<p>Anyway, I did not feel like fighting with that (broken?) plugin, and in the other hand I was actually quite inclined to play a bit with <a href="https://www.python.org/">Python</a> so&hellip; my quick and dirty solution to get over this problem was to write a <a href="https://github.com/mariospr/scripts/blob/master/pkg-config-to-eclipse">small script that takes a list of package names (as you would pass them to pkg-config) and generates the XML content that you can use to import in Eclipse</a>. And surprisingly, that worked quite well for me, so I&rsquo;m sharing it here in case someone else finds it useful.</p>
<p>Using <a href="https://git.gnome.org/browse/frogr/">frogr</a> as an example, I generate the XML file for Eclipse doing this:</p>
<pre>
  $ pkg-config-to-eclipse glib-2.0 libsoup-2.4 libexif libxml-2.0 \
        json-glib-1.0 gtk+-3.0 gstreamer-1.0 > frogr-eclipse.xml
</pre>
<p>&hellip;and then I simply import <em>frogr-eclipse.xml</em> from the project&rsquo;s properties, inside the <em>C/C++ General &gt; Paths and Symbols</em> section.</p>
<p>After doing that I get rid of all the brokenness caused by so many missing symbols and header files, I get code auto-completion nicely working back again and all those perks you would expect from this little big IDE. And all that without having to go through the pain of defining all of them one by one from the settings dialog, thank goodness!</p>
<p>Now you can quickly see how it works in the video below:</p>
<p style="text-align: center;"><iframe src="https://www.youtube.com/embed/16TJ1zopjeY" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<a href="https://www.youtube.com/watch?v=16TJ1zopjeY">VIDEO: Setting up a C/C++ project in Eclipse with pkg-config-to-eclipse</a></p>
This has been very helpful for me, hope it will be helpful to someone else too!
]]></content:encoded></item></channel></rss>