<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>chromium &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/chromium/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Mon, 23 Jun 2025 09:03:34 +0000</lastBuildDate>
	<language>en-GB</language>
	<copyright>© Terence Eden. 🄯 CC BY-SA. See https://shkspr.mobi/blog/copyright-and-copyleft/</copyright>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>chromium &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[An annoying SVG animation bug in Chrome]]></title>
		<link>https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/</link>
					<comments>https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#respond</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Mon, 23 Jun 2025 11:34:12 +0000</pubDate>
		<category><![CDATA[bug]]></category><category><![CDATA[chrome]]></category><category><![CDATA[chromium]]></category><category><![CDATA[svg]]></category>		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=61537</guid>

					<description><![CDATA[Writing web standards is hard. You have to write a formal specification which is useful for machines, humans, and web developers.  I recently stumbled across what I think is a little bug which might be caused by a misreading of the SVG Animation specification.  Here you should see two overlapping circles gradually appear:                                                  If you&#039;re on Chrome, you…]]></description>
										<content:encoded>&lt;p&gt;Writing web standards is hard&lt;sup id="fnref:experience"&gt;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fn:experience" class="footnote-ref" title="I do have some experience in this matter." role="doc-noteref"&gt;0&lt;/a&gt;&lt;/sup&gt;. You have to write a formal specification which is useful for machines, humans, and web developers&lt;sup id="fnref:webdev"&gt;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fn:webdev" class="footnote-ref" title="Back in 2006, Catharine A. MacKinnon provokatively asked &amp;quot;Are Women Human?&amp;quot;. Her argument (which I shall badly summarise) is that if women were human, then they'd be protected by universal human…" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;

&lt;p&gt;I recently stumbled across what I think is a little bug which &lt;em&gt;might&lt;/em&gt; be caused by a misreading of &lt;a href="https://svgwg.org/specs/animations/#KeyTimesAttribute"&gt;the SVG Animation specification&lt;/a&gt;.  Here you should see two overlapping circles gradually appear:&lt;/p&gt;

&lt;svg width="170" height="170" xmlns="http://www.w3.org/2000/svg"&gt;
    &lt;path fill="#2c4169" d="M170 0H0v170h170z"&gt;&lt;/path&gt;
    &lt;circle r="45" cx="50" cy="50" fill="#e4da2e" opacity="0"&gt;
        &lt;animate attributeName="opacity" begin="0s" dur="30s" values="0;  1;" keyTimes="0;  1" fill="freeze"&gt;&lt;/animate&gt;
    &lt;/circle&gt;
    &lt;circle r="45" cx="80" cy="80" fill="red" opacity="0"&gt;
        &lt;animate attributeName="opacity" begin="0s" dur="30s" values="0;  1;" keyTimes="0;  1;" fill="freeze"&gt;&lt;/animate&gt;
      &lt;/circle&gt;
&lt;/svg&gt;

&lt;p&gt;If you're on Chrome, you might only see one circle animate. Why? Bloody semicolons! The bane of every programmer's existence&lt;sup id="fnref:eng"&gt;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fn:eng" class="footnote-ref" title="I imagine English literature students also find them confusing; everyone does." role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://svgwg.org/specs/animations/#KeyTimesAttribute"&gt;specification for SVG Animation&lt;/a&gt; has this text for human readers:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;keyTimes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A semicolon-separated list of time values used to control the pacing of the animation. Each time in the list corresponds to a value in the ‘values’ attribute list, and defines when the value is used in the animation function.&lt;/p&gt;

&lt;p&gt;[…]&lt;/p&gt;

&lt;p&gt;If the last semicolon separator is followed by either just white space or no more characters, ignore both the separator and the trailing white space.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;To me, that isn't ambiguous. The text &lt;code&gt;keyTimes="0; 1;"&lt;/code&gt; has a final semicolon with nothing after it. Therefore it should be ignored. Instead, Chrome throws an hissyfit and says &lt;code&gt;Error: &amp;lt;animate&amp;gt; attribute keyTimes: Invalid value, "0; 1;".&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But maybe the humans who wrote the description were sloppy. There's also a machine-readable formal specification. It defines the acceptable sequence as being:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;number&amp;gt; [; &amp;lt;number&amp;gt;]* ;?&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This isn't quite Backus–Naur form&lt;sup id="fnref:bnf"&gt;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fn:bnf" class="footnote-ref" title="Also the bane of programmers everywhere!" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;, but rather &lt;a href="https://www.w3.org/TR/css-values/#value-defs"&gt;CSS Values&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;&amp;lt;number&amp;gt;&lt;/code&gt; is a &lt;a href="https://www.w3.org/TR/css-values/#component-types"&gt;component&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;[&lt;/code&gt; and &lt;code&gt;]&lt;/code&gt; are &lt;a href="https://www.w3.org/TR/css-values/#component-combinators"&gt;grouping combinators&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;*&lt;/code&gt; and &lt;code&gt;?&lt;/code&gt; are &lt;a href="https://www.w3.org/TR/css-values/#component-multipliers"&gt;component multipliers&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;/code&gt; "indicates that the preceding type, word, or group occurs zero or more times."&lt;/li&gt;
&lt;li&gt;&lt;code&gt;?&lt;/code&gt; "indicates that the preceding type, word, or group is optional (occurs zero or one times)."&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;;&lt;/code&gt; is just a semicolon&lt;sup id="fnref:cig"&gt;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fn:cig" class="footnote-ref" title="Just like how sometimes a cigar is just a cigar." role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reading the definition tells us that a valid value will be a number, followed by zero-or-more groups of "semicolon and another number" with an optional final semicolon.&lt;/p&gt;

&lt;p&gt;So, based on my reading, I think Chrome is wrong to throw an error here. Both Firefox and Safari work with a trailing semicolon.&lt;/p&gt;

&lt;p&gt;Accordingly, I've &lt;a href="https://issues.chromium.org/issues/427020732"&gt;raised a bug with the Chromium team&lt;/a&gt;.  If you think I have erred in this matter, please let me know.&lt;/p&gt;

&lt;div id="footnotes" role="doc-endnotes"&gt;
&lt;hr aria-label="Footnotes"&gt;
&lt;ol start="0"&gt;

&lt;li id="fn:experience"&gt;
&lt;p&gt;I do have &lt;a href="https://www.w3.org/TR/2018/WD-html53-20180426/"&gt;some experience in this matter&lt;/a&gt;.&amp;nbsp;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fnref:experience" class="footnote-backref" role="doc-backlink"&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn:webdev"&gt;
&lt;p&gt;Back in 2006, Catharine A. MacKinnon provokatively asked "&lt;a href="https://doi.org/10.2307/j.ctvjnrvck"&gt;Are Women Human?&lt;/a&gt;". Her argument (which I shall badly summarise) is that if women &lt;em&gt;were&lt;/em&gt; human, then they'd be protected by universal human rights. Given the state of the world then (and now) it is hard to argue that women receive as great a level of attention as the &lt;a href="https://www.the-tls.com/politics-society/rights-equality/default-male"&gt;default male&lt;/a&gt;. I don't intend to trivialise MacKinnon's work - but I do find it interesting that developers are often treated separately from other humans.&amp;nbsp;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fnref:webdev" class="footnote-backref" role="doc-backlink"&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn:eng"&gt;
&lt;p&gt;I imagine English literature students also find them confusing; everyone does.&amp;nbsp;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fnref:eng" class="footnote-backref" role="doc-backlink"&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn:bnf"&gt;
&lt;p&gt;Also the bane of programmers everywhere!&amp;nbsp;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fnref:bnf" class="footnote-backref" role="doc-backlink"&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn:cig"&gt;
&lt;p&gt;Just like how &lt;a href="https://quoteinvestigator.com/2011/08/12/just-a-cigar/"&gt;sometimes a cigar is just a cigar&lt;/a&gt;.&amp;nbsp;&lt;a href="https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/#fnref:cig" class="footnote-backref" role="doc-backlink"&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=61537&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2025/06/an-annoying-svg-animation-bug-in-chrome/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[RTL Bugs]]></title>
		<link>https://shkspr.mobi/blog/2014/02/rtl-bugs/</link>
					<comments>https://shkspr.mobi/blog/2014/02/rtl-bugs/#respond</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Mon, 24 Feb 2014 12:02:16 +0000</pubDate>
		<category><![CDATA[bugs]]></category><category><![CDATA[chrome]]></category><category><![CDATA[chromium]]></category><category><![CDATA[firefox]]></category><category><![CDATA[unicode]]></category>		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=9988</guid>

					<description><![CDATA[Take a look at the following text, looks normal enough doesn&#039;t it?  &#34;Harry ‮&#34;.draziw a si ‭Potter  Now, try to select the text and see what happens.  WHAT WITCHCRAFT IS THIS?!  If you examine the source code for this page, you&#039;ll see that I&#039;m using the Unicode Bi-Directional characters.  &#34;Harry &#38;#x202e;&#34;.draziw a si &#38;#8237;Potter  These characters are useful when writing text that includes, say, E…]]></description>
										<content:encoded>&lt;p&gt;Take a look at the following text, looks normal enough doesn't it?&lt;/p&gt;

&lt;h2 id="harry-draziw-a-si-potter"&gt;&lt;a href="https://shkspr.mobi/blog/2014/02/rtl-bugs/#harry-draziw-a-si-potter"&gt;"Harry ‮".draziw a si ‭Potter&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Now, try to select the text and see what happens.&lt;/p&gt;

&lt;p&gt;WHAT WITCHCRAFT IS THIS?!&lt;/p&gt;

&lt;p&gt;If you examine the source code for this page, you'll see that I'm using the &lt;a href="https://en.wikipedia.org/wiki/Unicode_character_property#Bidirectional_writing"&gt;Unicode Bi-Directional characters&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;"Harry &amp;amp;#x202e;".draziw a si &amp;amp;#8237;Potter&lt;/pre&gt;

&lt;p&gt;These characters are useful when writing text that includes, say, English and Arabic - but &lt;a href="http://krebsonsecurity.com/2011/09/right-to-left-override-aids-email-attacks/"&gt;they can also be used for malicious purposes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On a more mundane level, they can cause all sorts of UI bugs.  I've just &lt;a href="http://code.google.com/p/chromium/issues/detail?id=345691"&gt;filed a bug against the Chrome browser for how it handles these characters&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you right click on text with mixed direction, you'll notice that the UI behaves oddly.&lt;/p&gt;

&lt;img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Chrome-RTL-fs8.png" alt="Chrome RTL-fs8" width="480" height="330" class="aligncenter size-full wp-image-9996"&gt;

&lt;p&gt;In Firefox, the behaviour is correct - although one could argue whether "Potter" ought to be reversed.&lt;/p&gt;

&lt;img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Firefox-RTL-fs8.png" alt="Firefox RTL-fs8" width="480" height="430" class="aligncenter size-full wp-image-9995"&gt;

&lt;h2 id="searching"&gt;&lt;a href="https://shkspr.mobi/blog/2014/02/rtl-bugs/#searching"&gt;Searching&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;So, what happens when we run these searches?&lt;/p&gt;

&lt;p&gt;&lt;img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Chromium-RTL-Search-fs8.png" alt="Chromium RTL Search-fs8" width="640" height="165" class="aligncenter size-full wp-image-9999"&gt;&lt;br&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Firefox-RTL-Search-fs8.png" alt="Firefox RTL Search-fs8" width="640" height="165" class="aligncenter size-full wp-image-9998"&gt;&lt;/p&gt;

&lt;p&gt;Neither Firefox nor Chrome do particularly well.  I'm not sure if the reversed text in the window title and URL bar are bugs in Ubuntu - or whether it's the fault of the app itself.&lt;/p&gt;

&lt;p&gt;On Windows and Mac, we see this happen:&lt;/p&gt;

&lt;p&gt;&lt;img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/Safari-RTL-fs8.png" alt="Safari RTL-fs8" width="818" height="155" class="aligncenter size-full wp-image-10002"&gt;&lt;br&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/uploads/2014/02/IE-RTL-fs8.png" alt="IE RTL-fs8" width="606" height="145" class="aligncenter size-full wp-image-10003"&gt;&lt;/p&gt;

&lt;p&gt;This would suggest that Google isn't correcting the direction of the text and that is deforming its own title tags.&lt;/p&gt;

&lt;h2 id="are-these-bugs"&gt;&lt;a href="https://shkspr.mobi/blog/2014/02/rtl-bugs/#are-these-bugs"&gt;Are These Bugs?&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Ok, so having the title reversed isn't the worst problem in the world.  But do these examples count as bugs and, if so, who is responsible for them?&lt;/p&gt;

&lt;p&gt;Every search engine I tried passed through the right-to-left-over-ride unscathed - so that's the fault of the search engine, right?  How the hell do you a report a bug to Google?&lt;/p&gt;

&lt;p&gt;The title bar could either be a problem with the browser - &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=814030"&gt;Firefox has a bug report over a year old on the issue&lt;/a&gt; - or the problem could be with the underlying operating system.  How would one find out?&lt;/p&gt;

&lt;h2 id="thanks"&gt;&lt;a href="https://shkspr.mobi/blog/2014/02/rtl-bugs/#thanks"&gt;Thanks&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Thanks to &lt;a href="https://www.linkedin.com/in/yuanphoon/"&gt;Yuan Phoon&lt;/a&gt; for asking the questions which prompted this discovery.&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=9988&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2014/02/rtl-bugs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
