<?xml version="1.0" encoding="UTF-8"?>
<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>Owl’s Portfolio &#187; HTML &amp;c</title>
	<atom:link href="http://www.owlfolio.org/htmletc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.owlfolio.org</link>
	<description></description>
	<lastBuildDate>Mon, 12 Dec 2011 23:52:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Breaking things every six weeks</title>
		<link>http://www.owlfolio.org/htmletc/breaking-things-every-six-weeks/</link>
		<comments>http://www.owlfolio.org/htmletc/breaking-things-every-six-weeks/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 20:54:42 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://www.owlfolio.org/?p=1124</guid>
		<description><![CDATA[Attention conservation notice: 900 words of inside baseball about Mozilla. No security content whatsoever. The Mozilla Project has been taking a whole lot of flak recently over its new &#8220;rapid release cycle&#8221;, in which there is a new major version &#8230; <a href="http://www.owlfolio.org/htmletc/breaking-things-every-six-weeks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<blockquote>
  <p>Attention conservation notice: 900 words of inside baseball about Mozilla.  No security content whatsoever.</p>
</blockquote>

<p>The <a href="http://www.mozilla.org/about/">Mozilla Project</a> has been taking a whole lot of flak recently over its new &#8220;<a href="http://blog.mozilla.com/futurereleases/2011/07/19/every-six-weeks/">rapid release cycle</a>&#8221;, in which there is a new <em>major</em> version of Firefox (and Thunderbird) every six weeks, and it potentially breaks all your extensions.  Especially the big complicated extensions like <a href="http://getfirebug.com/">Firebug</a> that people <em>cannot live without</em>.  One might reasonably ask, what the hell?  Why would any software development team in their right mind&#8212;especially a team developing a critical piece of system infrastructure, which is what Web browsers are these days, like it or not&#8212;inflict unpredictable breakage on all their users at six-week intervals?</p>

<p><span id="more-1124"></span></p>

<p>The first thing to know is that Firefox&#8217;s core developers are really focused on making the Web better.  If we weren&#8217;t, we would be hacking on something other than a Web browser.  The old release cycle was way too slow for us to do that effectively; as Jono Xia describes in his blog post &#8220;<a href="http://jonoscript.wordpress.com/2011/07/18/its-not-about-the-version-numbers-its-about-extension-compatibility-and-long-term-support/">It&#8217;s Not About the Version Numbers</a>,&#8221; anything we did might not get out to end users for <em>over a year</em>.  When David Baron fixed <a href="http://dbaron.org/mozilla/visited-privacy">visited-link history sniffing</a>, he patched Firefox first&#8212;but Chrome and Safari shipped the change before we did.  </p>

<blockquote>
  <p>You should read Jono&#8217;s post now.  I&#8217;ll be here when you get back.</p>
</blockquote>

<p>Shipping new versions of the browser every six weeks is clearly a better way to improve the Web rapidly, than shipping a new version only once a year or so.   But what&#8217;s stopping the Mozilla team from shipping a new batch of under-the-hood improvements to the Web every six weeks without breaking anything?  Why do we <em>need</em> to break things?</p>

<p>Well, we tried not breaking things for ten years, give or take, and it didn&#8217;t work. The second thing to know is that the core browser (&#8220;Gecko&#8221;) suffers from enormous technical debt.  Like any large, 15-year-old piece of software, we have code in abundance that was written under too much time pressure to get it right, was written so long ago that nobody remembers how it works, isn&#8217;t comprehensively tested, or any combination of the above.  We also have major components that reasonably seemed like good ideas at the time, but have since proven to be a hindrance (XUL, XBL, XPConnect, etc).  We have other major components that should have been recognized as bad ideas at the time, but weren&#8217;t (XPCOM, NSPR, etc).  And we have code for which there is no excuse at all (Firefox still had code using the infamous <a href="http://www.jwz.org/blog/2011/07/mork-keeps-on-giving-when-the-database-worms-eat-into-your-murder-trial/">&#8220;Mork&#8221; file format</a> until just this summer, and I understand it&#8217;s still live in Thunderbird).</p>

<p>It gets worse: many of the bugs <em>can&#8217;t</em> be fixed without breaking stuff.  For example, take <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=234856">bug 234856</a>.  That&#8217;s a seven-year-old <em>display glitch</em>.  What could possibly be an excuse for not fixing a simple display glitch for seven years?  Well, the root cause of that bug (described more clearly in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=643041">bug 643041</a>, where the actual fix is posted) is an error in an XPCOM interface that, until we decided we weren&#8217;t going to do this anymore (post-FF4), was &#8220;frozen&#8221;&#8212;it could not be changed <em>even though it was wrong</em>, precisely so that extensions could depend on it not changing.  There are <em>thousands</em> of XPCOM interfaces, and extensions can use <em>all</em> of them. That&#8217;s a great strength: it lets Firefox extensions do far more than, say, Chrome extensions can.  That&#8217;s also a huge problem for people trying to make the core better.  (Only about 200 of these interfaces were permanently frozen, but pre-FF4 we tried to avoid changing even the un-frozen ones as much as possible.)  You&#8217;ll notice that the change in bug 643041 makes it <em>easier</em> to write extensions that manipulate SSL certificates, because now there&#8217;s just <em>one</em> <code>nsIX509Cert</code> interface, not three.  But taking away <code>nsIX509Cert2</code> and <code>nsIX509Cert3</code> breaks code that was using them.</p>

<p>Some bugs can&#8217;t even be fixed without breaking Web sites.  Any time Gecko doesn&#8217;t do the same thing Webkit and/or IE do, we (and the Webkit and IE people) want to make that difference go away&#8212;but to do that, at least one of the three has to change, and there may be sites out there relying on the behavior that just got taken away.  In some cases, adding <em>features</em> breaks the web.  For instance, if you write &#8216;<code>&lt;element on<i>event</i>="do_something()"&gt;</code>&#8217; directly in your HTML, when the event fires, the JavaScript interpreter will try to call a <i>method of <code>element</code>&#8217;s DOM API</i> named <code>do_something</code> before it tries to call a global function with that name.  Which means that adding DOM methods to any HTML element potentially breaks websites.  (This is not a problem if you assign to <code>element.on<i>event</i></code> from a <code>&lt;script&gt;</code>.)</p>

<p>This is why Mozilla core developers can seem so callous to the needs of extension and website developers built on Gecko.  We know that we depend on both groups for our continued relevance&#8212;a browser is no use at all with no websites to browse, and without extensions there is not much reason to pick one browser over another.  But we feel that <em>right now</em> it is more important to fix the problems with our existing platform than to provide stability.  In the long run, we will have a better platform for both groups to work with.  And in the long run, stability will come back.  There are many bugs to fix first, but there are not infinitely many bugs, even if it seems like it sometimes. Having said that, there are some things we could be doing right now to make extension and website developers&#8217; lives better &#8230; but I&#8217;m going to save them for the next post.  900 words is enough.</p>

<blockquote>
  <p>Note to commenters: I know lots of people are unhappy with the UX changes post-FF3.6, but let&#8217;s keep this to discussion of API breakage, please.  </p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/breaking-things-every-six-weeks/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>A Zany Scheme for Compact Secure Hashes</title>
		<link>http://www.owlfolio.org/htmletc/zany-scheme-compact-hashes/</link>
		<comments>http://www.owlfolio.org/htmletc/zany-scheme-compact-hashes/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 19:29:03 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://www.owlfolio.org/?p=1097</guid>
		<description><![CDATA[Lots of current and near-future tech relies heavily on secure hashes as identifiers; these are usually represented as hexadecimal strings. For instance, in a previous post I threw out the strawman h: URN scheme that looks like this: &#60;!-- jQuery &#8230; <a href="http://www.owlfolio.org/htmletc/zany-scheme-compact-hashes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Lots of current and near-future tech relies heavily on <a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function">secure hashes</a> as identifiers; these are usually represented as hexadecimal strings.  For instance, in a <a href="http://www.owlfolio.org/research/securing-the-future-net/">previous post</a> I threw out the strawman <code>h:</code> URN scheme that looks like this:</p>

<pre><code> &lt;!-- jQuery 1.5.2 --&gt;
 &lt;script src="h:sha1,b8dcaa1c866905c0bdb0b70c8e564ff1c3fe27ad"&gt;&lt;/script&gt;
</code></pre>

<p>Now the problem with this is, these hexadecimal strings are inconveniently long and are only going to get longer.  <a href="http://en.wikipedia.org/wiki/SHA-1">SHA-1</a> (as shown above) produces 160-bit hashes, which take 40 characters to represent in hex.  That algorithm is looking kinda creaky these days; the most convenient replacement is <a href="http://en.wikipedia.org/wiki/SHA-2">SHA-256</a>.  As the name implies, it produces 256-bit hashes, which take 64 characters to write out in hex.  The next generation of secure hash algorithms, currently <a href="http://en.wikipedia.org/wiki/NIST_hash_function_competition">under development at NIST</a>, are also going to produce 256-bit (and up) hashes.  The inconvenience of these lengthy hashes becomes even worse if we want to use them as <em>components</em> of a URI with structure to it (as opposed to being the entirety of a URN, as above).  Clearly some encoding other than hex, with its 2x expansion, is desirable.</p>

<p>Hashes are incompressible, so we can&#8217;t hope to pack a 256-bit hash into fewer than 32 characters, or a 160-bit hash into fewer than 20 characters.  And we can&#8217;t just dump the raw binary string into our HTML, because HTML is not designed for that&#8212;there is no way to tell the HTML parser &#8220;the next 20 characters are a binary literal&#8221;.  However, what we <em>can</em> do is find 256 printable, letter-like characters within the first few hundred Unicode code points and use them as an encoding of the 256 possible bytes.  Continuing with the jQuery example, that might look something like this:</p>

<pre><code>&lt;script src="h:sha1,пՎЦbηúFԱщблMπĒÇճԴցmЩ"&gt;&lt;/script&gt;&lt;!-- jQuery 1.5.2 --&gt;
</code></pre>

<p>See how we can fit the annotation on the same line now?  Even with sha256, it&#8217;s still a little shorter than the original in hex:</p>

<pre><code>&lt;!-- jQuery 1.5.2 --&gt;
&lt;script src="h:sha256,ρKZհνàêþГJEχdKmՌYψիցyԷթνлшъÁÐFДÂ"&gt;&lt;/script&gt;
</code></pre>

<p>Here&#8217;s my proposed encoding table:</p>

<pre><code>    0              0 1              1
    0123456789ABCDEF 0123456789ABCDEF
 00 ABCDEFGHIJKLMNOP QRSTUVWXYZÞabcde
 20 fghijklmnopqrstu vwxyzþ0123456789
 40 ÀÈÌÒÙÁÉÍÓÚÂÊÎÔÛÇ ÄËÏÖÜĀĒĪŌŪĂĔĬŎŬÐ
 60 àèìòùáéíóúâêîôûç äëïöüāēīōūăĕĭŏŭð
 80 αβγδεζηθικλμνξπρ ςστυφχψωϐϑϒϕϖϞϰϱ
 A0 БГДЖЗИЙЛПФЦЧШЩЪЬ бгджзийлпфцчшщъь
 C0 ԱԲԳԴԵԶԷԸԹԺԻԽԾԿՀՁ ՂՃՄՅՆՇՈՉՊՋՌՍՎՐՑՒ
 E0 աբգդեզէըթժիխծկհձ ղճմյնշոչպջռսվրցւ
</code></pre>

<p>All of the characters in this table have one- or two-byte encodings in UTF-8.  Every punctuation character below U+007F is given special meaning in some context or other, so I didn&#8217;t use any of them.  This unfortunately does mean that only 62 of the 256 bytes get one-byte encodings, but <em>storage</em> compactness is not the point here, and it&#8217;s no worse than hex, anyway.  What this gets us is <em>display</em> compactness: a 256-bit hash will occupy exactly 32 columns in your text editor, leaving room for at least a few other things on the same line.</p>

<p>Choosing the characters is a little tricky.  A whole lot of the code space below U+07FF is taken up by characters we can&#8217;t use for this purpose&#8212;composing diacritics, control characters, punctuation, and right-to-left scripts.  I didn&#8217;t want to use diacritics (even in precomposed form) or pairs of characters that might be visually identical to each other in some (combination of) fonts.  Unfortunately, even with the rich well of Cyrillic and Armenian to work with, I wasn&#8217;t able to avoid using a bunch of Latin-alphabet diacritics. Someone a little more familiar with the repertoire might be able to do better.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/zany-scheme-compact-hashes/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Legibility of embedded Web fonts</title>
		<link>http://www.owlfolio.org/htmletc/legibility-of-embedded-web-fonts/</link>
		<comments>http://www.owlfolio.org/htmletc/legibility-of-embedded-web-fonts/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 23:20:46 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://www.owlfolio.org/?p=973</guid>
		<description><![CDATA[It&#8217;s recently become possible to em&#8204;bed fonts in your website, so that you aren&#8217;t limited to using the same old fonts that everyone already has on their computer. Yay! Unfortunately, there are a lot of gotchas. Lots of people discuss &#8230; <a href="http://www.owlfolio.org/htmletc/legibility-of-embedded-web-fonts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s recently become possible to <a href="http://sixrevisions.com/css/font-face-guide/">em&zwnj;bed fonts</a> in your website, so that you aren&#8217;t limited to using the same old fonts that everyone already has on their computer.  Yay!  Unfortunately, there are a lot of gotchas.  Lots of people discuss the <a href="http://www.fontsquirrel.com/blog/2010/11/troubleshooting-font-face-problems">technical gotchas</a>, but when you get past that, you&#8217;ve still got to worry about <strong>legibility</strong>.</p>

<p>Consider the recently redesigned online fiction zine, <a href="http://chizine.com/volume_47.htm">Chiaroscuro</a>.  <del>As of this writing, they&#8217;re using an embedded font called <a href="http://ebensorkin.wordpress.com/">Merriweather</a>.</del>  <strong>[EDIT 8 April:</strong> Chiaroscuro has removed the problematic font from its site.<strong>]</strong></p>

<p>Here&#8217;s what the first paragraph of body text for volume 47 looked like on my Mac, using Firefox 4:</p>

<p><img src="http://www.owlfolio.org/media/2011/04/chiaro-osx-z0.png" alt="Specimen of the &ldquo;Merriweather&rdquo; font as rendered by Firefox 4 on Mac OS X" title="chiaro-osx-z0" width="485" height="93" class="aligncenter size-full wp-image-977" /></p>

<p>Pretty slick, yeah?  Unfortunately &#8230; here&#8217;s what that same para looked like on Windows, with the same browser:</p>

<p><img src="http://www.owlfolio.org/media/2011/04/chiaro-win-z0.jpg" alt="Specimen of the &ldquo;Merriweather&rdquo; font as rendered by Firefox 4 on Windows" title="chiaro-win-z0" width="493" height="107" class="aligncenter size-full wp-image-975"></p>

<p>The letters are squished together in places, and the lowercase Ns are too tall.  It&#8217;s even worse on Linux: not all the strokes are the same thickness, some of the letters are still too tall (look carefully at the lowercase D, for instance) and others extend below the baseline when they shouldn&#8217;t (such as the lowercase R).</p>

<p><img src="http://www.owlfolio.org/media/2011/04/chiaro-linux-z0.png" alt="Specimen of the &ldquo;Merriweather&rdquo; font as rendered by Firefox 4 on Linux" title="chiaro-linux-z0" width="486" height="97" class="aligncenter size-full wp-image-978"></p>

<p>What causes this radically different appearance of the same font in the same browser?  At typical body-text sizes, the computer has to draw each letter using only 15 or so pixels in each direction.  It&#8217;s not possible to draw each letter exactly as the typographer intended, and keep all the lines crisp and smooth, with that few pixels.  Windows, OSX, and Linux all resolve this dilemma differently: to oversimplify a bit, OSX tries harder to preserve the font shapes, Windows tries harder to make the lines sharp, and Linux tries to do both at once and winds up achieving neither.  (For lots of technical discussion of exactly what the difference is, see these blog posts from 2007: <a href="http://www.codinghorror.com/blog/2007/06/font-rendering-respecting-the-pixel-grid.html">Respecting The Pixel Grid</a>, <a href="http://damieng.com/blog/2007/06/13/font-rendering-philosophies-of-windows-and-mac-os-x">Font rendering philosophies of Windows &#038; Mac OS X</a>, <a href="http://antigrain.com/research/font_rasterization/">Texts Rasterization Exposures</a>).  People argue, loudly, about which choice is better (as the above blog posts and their comment threads demonstrate) but I think it would be relatively uncontroversial to say that <strong>the Windows font-drawing algorithm only works well with help from the font itself</strong>.  The Merriweather font on Chiaroscuro demonstrates this: it doesn&#8217;t provide this help (it doesn&#8217;t have enough &#8220;hinting&#8221; information) so it looks fine on OSX, but horrible on Windows (and Linux &#8211; although there it&#8217;s not quite so much the font&#8217;s fault).</p>

<p>This isn&#8217;t &#8220;just&#8221; a matter of aesthetics (scare quotes because nobody wants visitors to think their website is <strong>ugly</strong>); it can mean that <strong>people can&#8217;t read your text</strong>.  I myself find Chiaroscuro unpleasant to read on Windows or Linux, but my acquaintance Rose Lemberg, who has weaker eyesight, says <a href="http://rose-lemberg.livejournal.com/153454.html">the site is illegible</a>.  I don&#8217;t think Chiaroscuro set out to be illegible, but I&#8217;ll bet cookies to donuts Chiaroscuro&#8217;s designer didn&#8217;t bother testing their new font on anything but a Mac.</p>

<p>I don&#8217;t want to deter people from using embeddable fonts altogether; however, this is another reason why <strong>you can&#8217;t just test your site on one operating system</strong>.  At the very least you need to be testing on OSX and Windows (and I understand there are significant differences between XP and Vista/7 in this area, by the way); I would thank you for trying Linux as well (maybe you don&#8217;t care about desktop Linux, but Android uses the same font-drawing code).  You might think that the font libraries at <a href="http://fontsquirrel.com/">fontsquirrel.com</a> or <a href="https://www.google.com/webfonts">Google Web Fonts</a> would have been checked for good rendering on all OSes, but it turns out Merriweather is available from both sites!  So, while I&#8217;d still recommend <strong>starting</strong> with one of those libraries&#8217; body-text fonts, it doesn&#8217;t get you out of testing.</p>

<p>(Note: Merriweather&#8217;s designer is aware that it looks terrible on Windows, and is working on it.  Still, it seems to me that inclusion in public catalogs of fonts &#8220;designed for the web&#8221; was premature.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/legibility-of-embedded-web-fonts/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Strawman: MIME type for fonts</title>
		<link>http://www.owlfolio.org/htmletc/strawman-mime-type-for-fonts/</link>
		<comments>http://www.owlfolio.org/htmletc/strawman-mime-type-for-fonts/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 00:05:35 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://www.owlfolio.org/?p=922</guid>
		<description><![CDATA[For a little while now, it&#8217;s been possible for websites to embed fonts that all major browsers will pick up on. This of course implies fonts being served as HTTP resources. But it turns out that nobody has bothered to &#8230; <a href="http://www.owlfolio.org/htmletc/strawman-mime-type-for-fonts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For a little while now, it&#8217;s been possible for websites to <a href="http://hacks.mozilla.org/2009/06/beautiful-fonts-with-font-face/"> embed fonts</a> that all major browsers will pick up on. This of course implies fonts being served as HTTP resources. But it turns out that nobody has bothered to assign any of the common font formats a MIME type.<sup><a href="#foot1">1</a></sup>  Fonts being embedded on the web nowadays come in two flavors and three kinds of container: you either have <a href="http://www.truetype-typography.com/">TrueType</a> or <a href="http://en.wikipedia.org/wiki/PostScript_fonts#Compact_Font_Format">PostScript CFF</a>-style outline glyphs, and they are in a bare &#8220;OpenType&#8221; (really <a href="http://developer.apple.com/fonts/tools/tooldir/TrueEdit/Documentation/TE/TE1sfnt.html">sfnt</a>) container, or else compressed with either <a href="http://en.wikipedia.org/wiki/Web_Open_Font_Format">WOFF</a> or <a href="http://en.wikipedia.org/wiki/Embedded_OpenType">EOT</a>.  (I am ignoring SVG fonts, which are spottily supported and open several cans of worms that I don&#8217;t want to get into right now.)  In the future, people might also want to embed <a href="http://en.wikipedia.org/wiki/TrueType#TrueType_Collection">TTC</a> font collections, which are also in a sfnt container and could thus also be compressed with WOFF&#8212;not sure about EOT there&#8212;and bare <a href="http://www.prepressure.com/fonts/basics/type1">PostScript Type 1</a> fonts, but neither of these is supported in any browser at present, as far as I know.  There is no official MIME type for any of these combinations; therefore, people deploying fonts over HTTP have been making them up.  Without trying very hard, I found real sites using all of: <code>application/ttf</code>, <code>application/otf</code>, <code>application/truetype</code>, <code>application/opentype</code>, <code>application/woff</code>, <code>application/eot</code>, any of the above with an x-prefix, or any of the above in <code>font/</code> instead of <code>application/</code> (with or without the x-). There is no top-level <code>font</code> <a href="http://www.iana.org/assignments/media-types/">MIME category</a>, making this last particularly <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/TVTropesWikiDrinkingGame">egregious</a>.</p>

<p>All of these made-up types work because browsers don&#8217;t pay any attention to the content type of a web-embedded font; they look at the data stream, and if it&#8217;s recognizably a font, they use it.  Such &#8220;sniffing&#8221; has historically caused serious problems&#8212;recall my old post regarding <a href="http://www.owlfolio.org/htmletc/css-data-theft/">CSS data theft</a>&#8212;so you might expect me to be waving red flags and arguing for the entire feature to be pulled until we can get a standard MIME category for fonts, standard subtypes for the common ones, and browsers to start ignoring fonts served with the wrong type.  But I&#8217;m not.  I have serious misgivings about the whole &#8220;the server-supplied Content-Type header is gospel truth, content sniffing is evil&#8221; thing, and I think the font situation makes a nice test case for moving away from that model a bit.</p>

<p>Content types are a security issue because many of the file formats used on the web are ambiguous.  You can make a well-formed HTML document that is simultaneously a well-formed CSS style sheet or JavaScript program, and attackers can and have taken advantage of this.  But this isn&#8217;t necessarily the case for fonts.  The sfnt container and its compressed variants are self-describing, unambiguously identifiable binary formats.  Browsers thoroughly validate fonts before using them (because an <em>accidentally</em> malformed font can <a href="https://bugzilla.mozilla.org/buglist.cgi?bug_id=595703,583715,594456,599061,598190,595026,594926,580730,580212,581359,597942,581029,594966,588233,594651,594627,595997,596112,599068,594618,574368,586847,594628,596227,596110,595689,582151,587742,594638,595960,586895">break the OS&#8217;s text drawing code</a>), and don&#8217;t allow them to do anything but provide glyphs for text. A good analogy is to images: browsers also completely ignore the server&#8217;s content-type header for anything sent down for an <code>&lt;img&gt;</code>, and that doesn&#8217;t cause security holes&#8212;because images are also in self-describing binary formats, are thoroughly validated before use, and can&#8217;t do anything but define the appearance of a rectangle on the screen.  We do not need filtering on the metadata, because we have filtering on the data itself.</p>

<p>Nonetheless, there may be value in having a MIME label for fonts as opposed to other kinds of binary blobs.  For instance, if the server doesn&#8217;t think the file it has is a font, shouldn&#8217;t it be able to convince the browser of that, regardless of whether the contents of the file are indistinguishable from a font?  (Old hands may recognize this as one of the usual rationales for not promoting <code>text/plain</code> to <code>text/html</code> just because the HTTP response body happens to begin with <code>&lt;!DOCTYPE</code>.)  The current draft <a href="http://tools.ietf.org/html/draft-ietf-websec-mime-sniff-00.html">standard algorithm for content sniffing</a> takes this attitude with images, recommending that browsers only treat HTTP responses as images if their declared content type is in the <code>image/</code> category, but ignore the subtype and sniff for the actual image format.  With that in mind, here&#8217;s my proposal: let&#8217;s standardize <strong><code>application/font</code></strong> as the MIME type for <em>all</em> fonts delivered over the Internet, regardless of their format.  Browsers should use only fonts delivered with that MIME type, but should detect the actual format based on the contents of the response body.</p>

<p>I can think of two potential problems with this scheme.  First, it would be good if browsers could tell servers (using the normal <code>Accept:</code> mechanism) which specific font formats they understand.  Right now, it&#8217;s reasonable to insist that browsers should be able to handle either TrueType or PostScript glyph definitions, in either bare sfnt or compressed WOFF containers, and ignore the other possibilities, but that state won&#8217;t endure forever.  SVG fonts might become useful someday (if those cans of worms can be resolved to everyone&#8217;s satisfaction), or someone might come up with a new binary font format that has genuine advantages over OpenType.  I think this should probably be handled with <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">accept parameters</a>, for instance <code>Accept: application/font;container=sfnt</code> could mean &#8220;I understand all OpenType fonts but no others&#8221;.  The other problem is, what if someone comes up with a font format that can&#8217;t reliably be distinguished from an OpenType font based on the file contents?  Well, this is pretty darn unlikely, and we can put it into the RFC defining <code>application/font</code> that future font formats need to be distinguishable or else get their own MIME type.  The sfnt container keeps its <a href="http://en.wikipedia.org/wiki/File_format#Magic_number">magic number</a> (and several other things that ought to be in the file header) in the wrong place, but as long as all the <em>other</em> font formats that we care about put their magic number at the beginning of the file where it belongs, that&#8217;s not a problem.</p>

<hr />

<p><sup><a name="foot1">1</a></sup> To be precise, there is <em>a</em> standard MIME type for <em>a</em> font format: <a href="http://www.rfc-editor.org/rfc/rfc3073.txt">RFC 3073</a> defines <code>application/font-tdpfr</code> for the <a href="http://web.archive.org/web/20080225160925/http://www.bitstream.com/font_rendering/products/truedoc/pfrspec.html">Bitstream PFR</a> font format, which nobody uses anymore, except possibly some proprietary television-related products.  Bitstream appear to have been trying to get it used for web fonts back in the days of Netscape 4, and then to have given up on it, probably because the font foundries&#8217; attitude was NO YOU CAN&#8217;T HAS LICENSE FOR WEBS until just last year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/strawman-mime-type-for-fonts/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Data theft with CSS</title>
		<link>http://www.owlfolio.org/htmletc/css-data-theft/</link>
		<comments>http://www.owlfolio.org/htmletc/css-data-theft/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 23:54:07 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://www.owlfolio.org/?p=818</guid>
		<description><![CDATA[Mozilla has released security updates to Firefox 3.5 and 3.6 that include defenses for an old, little-known, but serious security hole: cross-site data theft using CSS. These defenses have a small but significant chance of breaking websites that rely on &#8230; <a href="http://www.owlfolio.org/htmletc/css-data-theft/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Mozilla has released security updates to Firefox 3.5 and 3.6 that include defenses for an old, little-known, but serious security hole: cross-site data theft using CSS.  These defenses have a small but significant chance of breaking websites that rely on &#8220;<a href="http://www.quirksmode.org/css/quirksmode.html">quirks mode</a>&#8221; rendering <em>and</em> use a server in another DNS domain (e.g. a <a href="http://en.wikipedia.org/wiki/Content_delivery_network">CDN</a>) for their style sheets.</p>

<p>In this article I&#8217;ll describe the attack, what we&#8217;re doing about it, how you can ensure that your site will continue to work, and how you can protect your users who have not upgraded their browsers yet.</p>

<p><span id="more-818"></span></p>

<h2>The attack</h2>

<p>In a traditional <a href="http://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29">cross-site scripting</a> (XSS) attack, the attacker finds a way to inject JavaScript code fragments into a web page that they can&#8217;t read.  When a legitimate user of the targeted site loads the page, the attacker&#8217;s code executes.  It might send information back to the attacker&#8217;s servers, or it might forge commands to the targeted site.  CSS data theft also involves injecting strings into a page that the attacker can&#8217;t read, but this time, the strings are fragments of a style sheet. </p>

<p><a href="http://www.owlfolio.org/media/2010/06/steps.png"><img src="http://www.owlfolio.org/media/2010/06/steps.png" alt="Diagram of network traffic in a CSS data theft attack." title="Diagram of network traffic in a CSS data theft attack.  Click for full size." class="aligncenter" width="500"></a></p>

<p>The diagram above shows the course of a CSS data theft attack, from the perspective of a network hub that can see all the traffic.  Before the attack begins, a victim user (the laptop in the middle) logs into their favorite website, Clockworks (mockup icon, on the right).  Clockworks sends down a session cookie.</p>

<p>Some time later, while the victim is still logged into Clockworks, they click on an ad for dancing hamsters, and get sent to the attacker&#8217;s website (Badenov, on the left).  The attacker&#8217;s website sends down an innocent-looking webpage that contains a <code>&lt;link&gt;</code> tag whose URL points to the victim&#8217;s private-messages page at Clockworks.</p>

<p>The victim&#8217;s browser duly requests the private-messages page from Clockworks; since the victim is still logged in, it sends the session cookie, so the reply will include information meant only for the victim. The query string, chosen by the attacker, causes Clockworks&#8217; server to inject strings into the HTML on either side of an interesting piece of secret information.</p>

<p>Because the <em>attacker</em>&#8217;s website is being rendered in quirks mode, the victim&#8217;s browser ignores the <code>Content-Type</code> header and feeds HTML to the CSS parser.  Of course, the very first HTML tag in the file causes a CSS syntax error, but CSS has predictable, lenient rules for recovering from syntax errors.  The attacker&#8217;s injected strings make the CSS parser ignore most of the target page, and capture the secret as the value of the CSS <code>background</code> property.</p>

<p>Finally, since the <code>background</code> property applies to the <code>body</code> tag, the browser needs to download the image it specifies in order to render the attacker&#8217;s website.  The image URL has been wrapped around the secret information that the attacker wants.  So the browser sends that secret to the attacker&#8217;s server as a query string.</p>

<hr>

<p>This attack has been known for some time. The earliest public description I have found was <a href="http://www.greymagic.com/security/advisories/gm004-ie/">by GreyMagic Corporation in 2002</a>.  It has been rediscovered at least twice since then: <a href="http://www.hacker.co.il/security/ie/css_import.html">by Matan Gillon in 2005</a>, and <a href="http://d.hatena.ne.jp/ofk/20081111/1226407593">by pseudonymous blogger &#8216;ofk&#8217; in 2008</a> (article in Japanese).  There are many variations, some of which no longer work, and some of which only work in IE.  The variation I&#8217;ve described works everywhere that hasn&#8217;t deployed a defense; <a href="http://websec.sv.cmu.edu/">security researchers at CMU</a> were able to use this attack to steal the contents of private messages from a bulletin board and two different webmail providers, with victims using unpatched versions of all the popular browsers.</p>

<p>Since the attack relies on the CSS parser&#8217;s error recovery behavior, sites may be immune because of accidental properties of their page structure.  For instance, most browsers do not allow newlines in <code>url()</code> literals.  If there had been a newline in the middle of the secret information in the diagram, just because that&#8217;s the way Clockworks generates its HTML, the attack would only work against victims using IE.</p>

<h2>Browser-side defense</h2>

<p>This attack works because a webpage in quirks mode can load <em>anything</em> as a style sheet, even if it&#8217;s really a HTML page coming from someone else&#8217;s server.  If the attacker&#8217;s page were in standards mode, the browser would pay attention to the HTTP <code>Content-Type</code> header on the target page, declaring it not to be CSS, and refuse to load it as a style sheet.</p>

<p>The attacker, of course, controls whether their page is in quirks mode.  But the attacker&#8217;s page is on a different server than the target page, which means the attack can be blocked by an extension of the <a href="http://taossa.com/index.php/2007/02/08/same-origin-policy/">same-origin policy</a>.   Even if a page is in quirks mode, it&#8217;s not allowed to load a style sheet with a <code>Content-Type</code> header declaring it to be something other than CSS, unless that sheet comes from the same origin.  <a href="http://blog.mozilla.com/blog/2010/05/10/firefox-4-vision-fast-powerful-and-empowering/">Firefox 4</a> will implement this rule, and IE has also adopted it (see below).</p>

<p>Unfortunately, there are a few websites out there that are rendered in quirks mode, and load their style sheets from a different origin, and put a <code>Content-Type</code> header on those style sheets that says they&#8217;re not CSS.  These sites aren&#8217;t common&#8212;the aforementioned CMU security researchers found 62 in the Alexa top 100,000, and most of those have been fixed already&#8212;but Firefox 4 will break them.</p>

<p>To give folks more time to fix their sites, while blocking the attack as soon as possible, we implemented a more lenient rule in <a href="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.5/">Firefox &ge;3.5.11</a> and <a href="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.6/">&ge;3.6.7</a>.  If a page is in quirks mode, loads a style sheet cross-origin, and that sheet has the wrong <code>Content-Type</code>, we&#8217;ll start parsing it as CSS anyway &#8230; but we&#8217;ll stop and throw the sheet away if we encounter a syntax error before the first complete rule has been parsed.  HTML tags cause CSS syntax errors, so unless the attacker can inject text at the very beginning of a page, they won&#8217;t be able to make the attack work.  Safari, Google Chrome, and Opera have also adopted this rule.</p>

<p>It&#8217;s possible that this rule could break sites too.  For instance, if a style sheet begins with an <code>@</code>-rule that Firefox 3.5 does not understand, that will count as a syntax error, and the sheet will be discarded.</p>

<p><strong><em>UPDATE: August 28:</em></strong> The <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-stylesheet">HTML5 spec for <code>&lt;link rel="stylesheet"&gt;</code></a> now requires the strict rule (see <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=9834">HTML5 defect report 9834</a>).</p>

<p><strong><em>UPDATE: October 26:</em></strong> As of Microsoft&#8217;s <a href="http://www.microsoft.com/technet/security/bulletin/ms10-071.mspx">October 2010 cumulative security update</a>, <em>all</em> maintained versions of Internet Explorer (6, 7, 8, and 9) now <a href="http://blogs.msdn.com/b/ie/archive/2010/10/26/mime-handling-changes-in-internet-explorer.aspx">implement the strict rule</a>.</p>

<h2>Fixing your website</h2>

<p>You only have to worry about your site being broken by the defense if you load your style sheets from a different server than the HTML <em>and</em> you use quirks mode.  If your site works with a <a href="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/4.0b2/">Firefox 4 beta</a>, you&#8217;re fine.  Current versions of Firefox 3.5 and 3.6 will warn you in the <a href="https://developer.mozilla.org/en/error_console">error console</a> when they see a site that will break in Firefox 4, so you can also test that way.  (Unfortunately, due to limitations of our translation process, part of this warning will always be in English.)</p>

<p>If your site breaks, all you have to do to fix it is make sure that your style sheets are being served with <code>Content-Type: text/css</code> in the HTTP headers.  Please also consider switching to standards-mode rendering.  If you cannot fix your website, <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&#038;component=Style+System+%28CSS%29&#038;blocked=524223">we want to hear from you</a>.</p>

<h2>Protecting your users</h2>

<p>If a browser tries to load a style sheet, and the HTTP response it gets has no <code>Content-Type</code> header, it will just assume that it has been sent some CSS, even if it&#8217;s a cross-origin load.  Therefore, your users are not fully safe from the attack, even if they all have browsers with the defense, unless your servers put Content-Type headers on <strong>all content requiring authentication</strong>.  Check your web services as well as human-readable content.</p>

<p>You should also make sure that those headers are correct.  Most importantly, ensure that if your server can&#8217;t figure out what Content-Type to put on a response, it falls back to <code>application/&#8203;octet-stream</code> or <code>text/&#8203;plain</code>.  Certain other possibilities (for instance, <code>*/*</code> and <code>application/&#8203;x-unknown-content-type</code>) may be treated the same as if you hadn&#8217;t sent a <code>Content-Type</code> at all.</p>

<p>It is also vital to provide an accurate <code>charset=</code> option in your <code>Content-Type</code> headers for all textual data.  If you don&#8217;t, an attacker can <a href="http://openmya.hacker.jp/hasegawa/security/utf7cs.html">bypass your XSS filters</a> by encoding injected strings in UTF-7.  Declaring the charset in a <code>meta</code> tag or <code>&lt;?xml...?&gt;</code> instruction is <strong>not enough</strong> to defend against a CSS data theft attack encoded in UTF-7; the CSS parser doesn&#8217;t pay any attention to them.</p>

<p>To protect users that are still using browsers that have no defense against CSS data theft, you should block this attack in your filters for user-submitted content.  All you have to do is add <code>{</code>, <code>}</code>, and <code>@</code> to the set of characters that get replaced with equivalent HTML entities (<code>&amp;#123;</code>, <code>&amp;#125;</code>, and <code>&amp;#64;</code>, respectively).  If you can&#8217;t be sure that you are always producing <code>Content-Type</code> headers with the correct <code>charset=</code> option, you should also entity-encode <code>+</code> to <code>&amp;#43;</code>.</p>

<h2>More information</h2>

<p><a href="http://scarybeastsecurity.blogspot.com/2009/12/generic-cross-browser-cross-domain.html">Chris Evans rediscovered this exploit in late 2009</a> and has been instrumental in getting it fixed.  He has <a href="http://scarybeastsecurity.blogspot.com/2010/07/firefox-fixes-css-based-cross-origin.html">two other</a> <a href="http://scarybeastsecurity.blogspot.com/2010/08/internet-explorer-considered-harmful.html">blog posts</a> that go into more detail.  <a href="http://mayscript.com/blog/collinj/end-near-cross-origin-css-attacks">Collin Jackson</a> and his team at CMU have also been very helpful in understanding the full scope of the attack and ensuring all major browsers fixed it.  <a href="http://websec.sv.cmu.edu/css/css.pdf">Their paper</a> will appear at the <a href="http://www.sigsac.org/ccs/CCS2010/">ACM Computer and Communications Security conference</a> in October.</p>

<p>For technical details of the fixes, see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=524223">Mozilla bug 524223</a>, <a href="http://code.google.com/p/chromium/issues/detail?id=9877">Chromium bug 9877</a>, and <a href="https://bugs.webkit.org/show_bug.cgi?id=29820">Webkit bug 29820</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/css-data-theft/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>More on SSL errors</title>
		<link>http://www.owlfolio.org/htmletc/more-ssl-errors/</link>
		<comments>http://www.owlfolio.org/htmletc/more-ssl-errors/#comments</comments>
		<pubDate>Tue, 25 May 2010 23:11:52 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://www.owlfolio.org/?p=806</guid>
		<description><![CDATA[I got some great responses to my ideas for SSL errors and I thought I&#8217;d make a new post to talk about them, since that post is old enough that you can&#8217;t comment on it anymore. I should probably emphasize &#8230; <a href="http://www.owlfolio.org/htmletc/more-ssl-errors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I got some great responses to my <a href="http://www.owlfolio.org/htmletc/ssl-errors/">ideas for SSL errors</a> and I thought I&#8217;d make a new post to talk about them, since that post is old enough that you can&#8217;t comment on it anymore.  I should probably emphasize up front that I&#8217;m not on Firefox&#8217;s UX team, I don&#8217;t know if they&#8217;re listening to my suggestions, and anyway they were meant as a starting point rather than completely finished designs.</p>

<p><a href="http://davidbolton.info/">David Bolton</a> wanted to know why some of the error screens asked the user to visit other sites manually, rather than doing checks behind the scenes.  The main reason, honestly, is that that made a good example thing the user could do next.  In practice we probably <em>would</em> want to do at least some checks in the background.  Right now, another reason would be that error pages do not have &#8220;chrome&#8221; privileges so they can&#8217;t do anything of the sort (this is part of why the certificate error screen pops up a separate dialog box if you say you want to add an exception) but we may be able to get around that in a real implementation.</p>

<p><a href="http://www.johnjbarton.com/">John Barton</a>, in email, points out that SSL errors often come up in practice because of server-side configuration changes that ought to have been transparent to users, but a sysadmin goofed.  I&#8217;ve been using the <a href="https://addons.mozilla.org/en-US/firefox/addon/6415/">Certificate Patrol</a> extension, which brings up warnings when a site&#8217;s cert changes in any way; this reveals that cert handling mistakes happen even on very popular and well-staffed sites (recently, for instance, <code>mail.google.com</code> flipped back and forth between its own cert and the generic <code>*.google.com</code> cert several times in one day).  Of course <em>that</em> would have been invisible to most people, but it&#8217;s not much harder to make mistakes that do trigger warnings in a stock browser.</p>

<p>My general feeling on that is, yes, it is way too hard to administer an SSL-encrypted web site, and I would wholeheartedly support an initiative to make it easier, especially for sites that carry information of only moderate sensitivity (e.g. the plethora of Bugzilla instances with self-signed certs out there in the wild).  I don&#8217;t think that should stop us from raising the visibility of SSL administration mistakes, as long as we improve the presentation and advice on those mistakes so we are not just training people to click through the errors.</p>

<p>John also points out that most people won&#8217;t have any idea what &#8220;<a href="http://www.herdict.org/">Herdict</a>&#8221; is or why they are trustworthy.  The explicit mention of Herdict was mainly because I was riffing off Boriss&#8217; earlier <a href="http://jboriss.wordpress.com/2010/01/04/herdict-and-its-tasty-anonymized-aggregated-data/">proposal to use Herdict information to improve page not found errors</a>.  Indeed, we should probably put it more like &#8220;Other people who try to visit this website get (something) which (is/isn&#8217;t) what you got.&#8221;  We should credit whatever service we use for that information, but it doesn&#8217;t have to be as prominent as I made it.</p>

<p>Someone else (whose name I have lost; sorry, whoever you were!) pointed me at the <a href="http://www.cs.cmu.edu/~perspectives/">Perspectives</a> extension, which is said to do more or less exactly what I proposed, as far as comparing certificates seen by the user with those seen by &#8220;notaries&#8221; at other network locations.  I like the use of the term &#8220;notary&#8221; and the proof of concept; unfortunately, Perspectives seems not to be actively maintained at the moment, and doesn&#8217;t work with Firefox 3.6.  Also, for privacy, we want to make the queries to the notaries as uninformative as possible to an adversary that can observe network traffic.  Reusing the same system that is used for &#8220;is this site down?&#8221; requests would help there.  (Ideally, the <em>notaries</em> would also be unable to tell which users are asking what about which sites, but that might not be tractable.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/more-ssl-errors/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Mozilla Co. conference rooms</title>
		<link>http://www.owlfolio.org/htmletc/moco-conf-rooms/</link>
		<comments>http://www.owlfolio.org/htmletc/moco-conf-rooms/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 00:00:08 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://owl-folio.nfshost.com/?p=10</guid>
		<description><![CDATA[The Mozilla Corporation&#8217;s new(ish) office in downtown Mountain View has all its third-floor conference rooms named after Internet memes, except those that are named after rooms aboard the starship Enterprise. I&#8217;d like to share them with you now. Small conference &#8230; <a href="http://www.owlfolio.org/htmletc/moco-conf-rooms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.mozilla.com">Mozilla Corporation</a>&#8217;s new(ish) office in
downtown Mountain View has all its third-floor conference rooms named
after Internet memes, except those that are named after rooms aboard
the <a href="http://www.startrek.com/startrek/view/library/ships/article/70377.html">starship Enterprise</a>.
I&#8217;d like to share them with you now.</p>

<h2>Small conference rooms (memes)</h2>

<ul>
<li><a href="http://www.youtube.com/watch?v=qItugh-fFgg">All your base</a></li>
<li><a href="http://bikeshed.com/">Bike</a> <a href="http://en.wikipedia.org/wiki/Parkinson%27s_Law_of_Triviality">shed</a> (used as a storage area for a while)</li>
<li><a href="http://www.chucknorrisfacts.com/">Chuck Norris</a></li>
<li><a href="http://www.burningpixel.com/baby/babymus1.htm">Dancing Baby</a></li>
<li><a href="http://www.albinoblacksheep.com/flash/end">End of the World</a></li>
<li><a href="http://failblog.org/">Fail</a></li>
<li><a href="http://babychoppa.ytmnd.com/">Get to da choppa</a></li>
<li><a href="http://www.webhamster.com/">Hampster Dance</a></li>
<li><a href="http://icanhascheezburger.com/2007/01/11/i-can-has-cheezburger-3/">Icanhascheezburger</a></li>
<li><a href="http://sendables.jibjab.com/">Jibjab</a></li>
<li><a href="http://www.youtube.com/watch?v=J---aiyznGQ">Keyboard Cat</a></li>
<li><a href="http://www.youtube.com/watch?v=LkCNJRfSZBU">Leeroy Jenkins</a></li>
<li><a href="http://www.ebaumsworld.com/pictures/view/80663982/">Mullets Galore</a></li>
<li><a href="http://www.newgrounds.com/portal/view/206373">Numa Numa</a></li>
<li><a href="http://www.hjo3.net/orly/gallery1.htm">Orly</a></li>
<li><a href="http://www.youtube.com/watch?v=s8MDNFaGfT4">Peanut butter jelly</a></li>
<li><a href="http://www.urbandictionary.com/define.php?term=QQ">Q</a><a href="http://www.qq.com/">Q</a></li>
<li><a href="http://www.youtube.com/watch?v=oHg5SJYRHA0">Rick</a><a href="http://xkcd.com/524/">roll</a></li>
<li><a href="http://www.homestarrunner.com/sbemail.html">Strong Bad</a></li>
<li><a href="http://www.tronguy.net/">Tron Guy</a></li>
<li><a href="http://www.albinoblacksheep.com/flash/showdown">Ultimate</a></li>
<li><a href="http://en.wikipedia.org/wiki/Very_good_very_mighty">Very good, very mighty</a></li>
<li><a href="http://failblog.org/">Win</a></li>
<li><a href="http://www.newgrounds.com/collection/xiaoxiao">Xiao Xiao</a></li>
<li><a href="http://www.youtube.com/watch?v=rW6M8D41ZWU">Yatta</a></li>
<li><a href="http://www.zombo.com/">Zombocom</a></li>
</ul>

<h2>Large conference rooms (Star Trek)</h2>

<ul>
<li><a href="http://memory-alpha.org/wiki/Ten_Forward">10 Forward</a> (break room)</li>
<li><a href="http://memory-alpha.org/wiki/Holodeck">Holodeck</a></li>
<li><a href="http://memory-alpha.org/wiki/Bridge">The Bridge</a></li>
<li><a href="http://memory-alpha.org/wiki/Warp_core">Warp core</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/moco-conf-rooms/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Better SSL error screens</title>
		<link>http://www.owlfolio.org/htmletc/ssl-errors/</link>
		<comments>http://www.owlfolio.org/htmletc/ssl-errors/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 21:11:41 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://owl-folio.nfshost.com/?p=745</guid>
		<description><![CDATA[Right now, when you visit a website that uses encryption in Firefox and there&#8217;s anything at all wrong with the encrypted connection, you get this screen: This is a big block of jargon which doesn&#8217;t do anything to tell the &#8230; <a href="http://www.owlfolio.org/htmletc/ssl-errors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Right now, when you visit a website that uses encryption in Firefox
and there&#8217;s anything at all wrong with the encrypted connection, you
get this screen:</p>

<p><a href="http://owl-folio.nfshost.com/media/2010/05/mockup-current.html"><img src="http://owl-folio.nfshost.com/media/2010/05/mockup-current-300x169.png" alt="The current SSL warning screen, which is generic and uninformative unless you know how to read SSL certificates already" title="Current SSL warning" width="300" height="169" class="aligncenter size-medium wp-image-749" /></a></p>

<p>This is a big block of jargon which doesn&#8217;t do anything to tell the
user how big the risk actually is, or help them distinguish a minor
problem from a major one. If you click on &#8220;technical details&#8221; you get
a little bit more information about what went wrong, but it still
doesn&#8217;t make any effort to give advice.</p>

<p>The Firefox UI team has been talking about using <a href="http://www.herdict.org/web/">Herdict</a> or a
similar service to <a href="http://jboriss.wordpress.com/2010/01/04/herdict-and-its-tasty-anonymized-aggregated-data/">improve network error screens</a>,
especially the <a href="http://www.toolness.com/wp/?p=772">site not found screen</a>.  I think we
could get a lot of mileage out of that for SSL errors as well.  We
should also make use of the user&#8217;s history with the site, and pay
attention to what exactly is wrong with the credential.  Here are some
examples.</p>

<p><a href="http://owl-folio.nfshost.com/media/2010/05/mockup-selfsigned.html"><img src="http://owl-folio.nfshost.com/media/2010/05/mockup-selfsigned-300x210.png" alt="Proposed warning screen for a website with a self-signed certificate" title="Self-signed certificate" width="300" height="210" class="aligncenter size-medium wp-image-747" /></a></p>

<p>The only problem with self-signed certificates is they <em>haven&#8217;t</em> been
signed by a trusted third party.  The connection is secure, but you
might not be talking to who you think you are.  In the first section,
we emphasize that the concern here is with identity, and we use
Herdict information to deduce that this is probably <em>not</em> a hijacked
site, because lots of people get the same credential.  (&#8220;The same
credential&#8221; means <em>exactly</em> the same, not just some self-signed cert,
but we needn&#8217;t bother people with that unless they want to see the
details.)</p>

<p>In the &#8220;What should I do?&#8221; section, we give some examples of things
that might be unsafe to trust this site with, but we <strong>go ahead and
let them visit the site</strong>, automatically storing the self-signed cert
and marking it valid for this site only.  We implement <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=251407">bug 251407</a>,
so we can promise to notify the user if the site&#8217;s credentials change
in the future.</p>

<p>I&#8217;ve front-loaded the information that used to be in the &#8220;technical
details&#8221; section, so it has been replaced with &#8220;Inspect the
Credentials&#8221;.  If you open that area up, it shows the certificate, but
in a more user-friendly way than the existing certificate dialog box
does.  Especially important here is to reveal the interesting parts
immediately, highlight suspicious things, and deemphasize the jargon
and the long hexadecimal numbers.</p>

<p>&#8220;I understand the risks&#8221; is still there, but in this case, it&#8217;s for
people who didn&#8217;t read the rest of the page.  It&#8217;s meant to make
people stop, slow down, and reread.  If you click on it you get
another link to the page.</p>

<p><a href="http://owl-folio.nfshost.com/media/2010/05/mockup-tampering.html"><img src="http://owl-folio.nfshost.com/media/2010/05/mockup-tampering-300x204.png" alt="Proposed warning screen when connection tampering has been detected" title="Connection tampering detected" width="300" height="204" class="aligncenter size-medium wp-image-746" /></a></p>

<p>There are exploits in the wild that take over your WiFi hub, or your
cable modem.  Once they&#8217;ve done that, they are in a position to tamper
with all your Internet traffic.  I ran into one of these for reals
last week; I was in a café and getting certificate errors on <em>every</em>
secure site I tried to visit, including Mozilla&#8217;s mail server.  (The
theory is that you&#8217;ll just click through the error messages because
you want to get your email, or whatever; one of the staff at the café
did just that when I complained.)  Here&#8217;s where Herdict could really
come in handy: if <em>you</em> are getting certificate errors but nobody else
is, we can deduce a problem near your computer.</p>

<p>Again, the first section tries to be clear and specific about the
problem: we suspect that someone is tampering with your Internet
connection, and here is why.  The second section underlines how big a
deal this is: &#8220;Do not log into any site or buy anything online.&#8221;  It
then suggests a test: visit another secure website and see if the
problem persists.  This scenario should put the whole browser into a
paranoid mode, where it will not load saved passwords and continues to
try to work out whether there&#8217;s something wrong with the local router.
Ultimately, we should advise people in this boat to factory-reset
their WiFi hub and/or contact their ISP for help, but we should take
care to be certain in our diagnosis first.</p>

<p>In this scenario, the &#8220;I understand the risks&#8221; section gives you
access to the certificate-exception dialogs, as it does now.</p>

<p><a href="http://owl-folio.nfshost.com/media/2010/05/mockup-hijack.html"><img src="http://owl-folio.nfshost.com/media/2010/05/mockup-hijack-300x204.png" alt="Proposed warning screen for a website whose server may have been hijacked" title="Hijacked server" width="300" height="204" class="aligncenter size-medium wp-image-748" /></a></p>

<p>Finally, here&#8217;s what it looks like in the comparatively rare scenario
that SSL certificates were originally intended to defend against: the
server has been hijacked (but the attackers do not have access to the
cert).  We can tell from browser history that the cert has changed,
and we can tell from Herdict that it has changed for everyone.  We
tell the user not to visit <em>this</em> website, and again, suggest trying
another secure site.  (We need to take care to distinguish this case
from an expired or legitimately changed cert.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/ssl-errors/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Boxes with Rounded Corners</title>
		<link>http://www.owlfolio.org/htmletc/border-radius/</link>
		<comments>http://www.owlfolio.org/htmletc/border-radius/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 22:08:38 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://owl-folio.nfshost.com/?p=757</guid>
		<description><![CDATA[A Russian translation of this article can be read at higher.com.ua. The CSS 3 Backgrounds and Borders module introduces the border-radius property, which allows you to make the border of any CSS box be a rounded rectangle. Mozilla’s Gecko-based browsers &#8230; <a href="http://www.owlfolio.org/htmletc/border-radius/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="font-size:x-small;font-style:italic;text-align:right">A <a href="http://higher.com.ua/article/142/zakruglennye-ugly-v-css3">Russian translation</a> of this article can be read at <a href="http://higher.com.ua/">higher.com.ua</a>.</p>

<p>The <a href="http://dev.w3.org/csswg/css3-background/">CSS 3
   Backgrounds and Borders module</a> introduces
   the <a href="http://dev.w3.org/csswg/css3-background/#the-border-radius"><code>border-radius</code></a> property, which allows you to make
   the border of any CSS box be a rounded rectangle.
   Mozilla’s <a href="https://developer.mozilla.org/en/Gecko">Gecko</a>-based
   browsers (such as Firefox and SeaMonkey) have implemented parts of
   this feature for some time, as
   have <a href="http://webkit.org/">Webkit</a>-based browsers (such
   as Safari and
   Chrome).  <a href="http://www.mozilla.com/firefox/all-beta.html">Firefox
   3.5</a> adds support for elliptical corners, and brings the Gecko
   implementation into line with the standard on many details.</p>

<p><span id="more-757"></span></p>

<p><img class="caution" src="/media/2010/05/caution.png"> At the time of writing, the
  Backgrounds and Borders module is still
  a <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#maturity-levels">W3C
  Working Draft</a>, so all the browsers that
  implement <code>border-radius</code> require you to
  use <a href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">vendor-prefixed
  property names</a> for it.  This article uses the standard property
  names in all examples, but there is a table of equivalences at the
  end.  Mozilla’s policy is to enable the standard names once the
  module reaches Candidate Recommendation stage;
  see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=451134">bug
  451134</a>.</p>

<h2><a name="introduction">Introduction to rounded corners</a></h2>

<table class="example">
<tr><th>CSS source</th><th>In your<br />browser</th><th>Proper<br />rendering</th></tr>
<tr><td><pre class="exPre">width: 48px; height: 48px;
border: 1px solid black;
border-radius: 10px;</pre></td>
<td><div class="exDiv" id="ex1"></div></td>
<td><img class="exImg" src="/media/2010/05/ex1.png"></td>
</tr>
<tr><td><pre class="exPre">border-radius: 10px  0px;</pre></td>
<td><div class="exDiv" id="ex2"></div></td>
<td><img class="exImg" src="/media/2010/05/ex2.png"></td>
</tr>
<tr><td><pre class="exPre">border-radius: 10px  0px
               20px;</pre></td>
<td><div class="exDiv" id="ex3"></div></td>
<td><img class="exImg" src="/media/2010/05/ex3.png"></td>
</tr>
<tr><td><pre class="exPre">border-radius: 10px  0px
               20px 30px;</pre></td>
<td><div class="exDiv" id="ex4"></div></td>
<td><img class="exImg" src="/media/2010/05/ex4.png"></td>
</tr>
<tr><td><pre class="exPre">border-top-left-radius:
    20px 30px;</pre></td>
<td><div class="exDiv" id="ex5"></div></td>
<td><img class="exImg" src="/media/2010/05/ex5.png"></td>
</tr>
<tr><td><pre class="exPre">border-radius:
    10px 0 / 30px 0;</pre></td>
<td><div class="exDiv" id="ex6"></div></td>
<td><img class="exImg" src="/media/2010/05/ex6.png"></td>
</tr>
<tr><td><pre class="exPre">border-radius: 10px /
    30px 30px 10px 10px;</pre></td>
<td><div class="exDiv" id="ex7"></div></td>
<td><img class="exImg" src="/media/2010/05/ex7.png"></td>
</tr>
</table>

<p>In its simplest form, <code>border-radius</code> takes a single CSS
   <code>&lt;length&gt;</code> and rounds all four corners of a box
   border by that amount.  Rounded corners are never inherited by
   descendant boxes.</p>

<p>If you want the corners to have different sizes, you can list up to
   four <code>&lt;length&gt;</code>s; these round individual corners,
   counting clockwise from the top left.  With two or three numbers,
   the missing values default to the value for the diagonally opposite
   corner.</p>

<p>You can also use <q>longhand</q> properties to control the
  curvature of each corner independently from the
  others: <code>border-top-left-radius</code>,
  <code>border-top-right-radius</code>,
  <code>border-bottom-right-radius</code>,
  and <code>border-bottom-left-radius</code>.  Each takes a
  single <code>&lt;length&gt;</code>.  There is no defaulting from one
  corner to another with these properties.</p>

<p>The Backgrounds module adds the possibility of elliptical corners.
   If you’re using the <q>longhand</q> properties, you simply add a
   second <code>&lt;length&gt;</code> value to the property; the first
   value sets the horizontal semi-axis of the ellipse, the second sets
   the vertical semi-axis.  With the <q>shorthand</q>
   <code>border-radius</code> property, the notation is slightly more
   involved: after the first list of up to four
   <code>&lt;length&gt;</code>s, you add a forward slash and another
   list of up to four <code>&lt;length&gt;</code>s.  The values before
   the slash set the horizontal semi-axes, and the values after set
   the vertical semi-axes; both go clockwise from top left, and
   default <i>independently</i> to diagonally opposite corners.  If
   either semi-axis of a corner is zero, that corner will not be
   rounded.</p>

<p><img class="caution" src="/media/2010/05/caution.png">Webkit does not
   treat <code>border-radius</code> as a shorthand property; it
   accepts only one <code>&lt;length&gt;</code> value.  If you want
   any effect other than setting all four corners to the same circular
   radius, you must use the longhand properties with Webkit.
   See <a href="https://bugs.webkit.org/show_bug.cgi?id=23675">bug
   23675</a>.</p>

<h2><a name="corner-detail">Corner styling in detail</a></h2>

<table class="example">
<tr><th>Constant thickness</th><th>Varying thickness</th><th>Sharp
    inner corner</th></tr>
<tr><td><img class="exImg" src="/media/2010/05/control-ellipse.png"></td>
    <td><img class="exImg" src="/media/2010/05/control-ellipse-2.png"></td>
    <td><img class="exImg" src="/media/2010/05/control-ellipse-3.png"></td></tr>
</table>

<p>The <code>border-radius</code> properties directly control the
   horizontal and vertical semi-axes of the <i>outer</i> curve of the
   border.  The <i>inner</i> curve is determined by reducing each
   semi-axis by the thickness of the side border adjacent to that end
   of the curve.  This keeps the curved portion of the border within a
   rectangle whose sides are the semi-axes set by
   <code>border-radius</code>.</p>

<table class="example">
<tr><th colspan="2">Inner curve kink effect</th></tr>
<tr><td><pre class="exPre">border: 6px solid black;
border-radius: 8px / 20px;</pre></td>
    <td><div class="exDiv" id="ex12"></div></td></tr>
<tr><td><pre class="exPre">border-style: double;</pre></td>
    <td><div class="exDiv" id="ex13"></div></td></tr>
</table>

<p> When both sides’ borders are the same thickness, the curve has
   constant thickness; when they are not the same, the curved portion
   of the border interpolates smoothly between the two. When the
   border is at least as thick as the <code>border-radius</code> value
   on at least one side, the inner curve becomes a sharp corner.
   Thick elliptical borders sometimes look kinked because the inner
   curve is very flat.</p>

<table class="example">
<tr><th>CSS source</th><th>In your<br />browser</th><th>Proper<br />rendering</th></tr>
<tr><td><pre class="exPre">width: 48px; height: 48px;
border: 1px solid black;
border-radius: 25px 0;</pre></td>
    <td><div class="exDiv" id="ex8a"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex8a.png"></td>
</tr>

<tr><td><pre class="exPre">border-radius: 40px 0;</pre></td>
    <td><div class="exDiv" id="ex8b"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex8b.png"></td>
</tr>

<tr><td><pre class="exPre">border-radius: 50px 0;</pre></td>
    <td><div class="exDiv" id="ex8c"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex8c.png"></td>
</tr>

<tr><td><pre class="exPre">border-radius: 40px 10px
               10px 10px;</pre></td>
    <td><div class="exDiv" id="ex9a"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex9a.png"></td>
</tr>

<tr><td><pre class="exPre">border-radius: 50px 10px
               10px 10px;</pre></td>
    <td><div class="exDiv" id="ex9b"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex9b.png"></td>
</tr>

<tr><td><pre class="exPre">border-radius:100px 10px
               10px 10px;</pre></td>
    <td><div class="exDiv" id="ex9c"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex9c.png"></td>
</tr>
</table>

<p>When the curves are too big for the box, something has to give.
   The Backgrounds module constrains the <i>sum</i> of the semi-axes
   on each side of the box to be no more than the outer dimension of
   the border box on that side; thus you can make one corner curve all
   the way to the opposite side of the box, as long as both corners
   adjacent to it are not curved at all.  When the sum is too big on
   even one side, the renderer is required to compute a reduction
   factor that will make the largest pair of semi-axes fit exactly
   within the box, and apply that reduction to <i>all</i> the
   semi-axes.  This has advantages and disadvantages; in the spec’s
   words,</p>

<blockquote style="width:20em">This [rule] ensures that quarter circles remain quarter
circles and large [corners] remain larger than smaller ones, but it
may reduce corners that were already small enough, which may make
borders of nearby elements that should look the same look
different.</blockquote>

<p><img class="caution" src="/media/2010/05/caution.png">At time of writing, this
   rule is implemented in full <i>only</i> by Firefox 3.5 and very
   recent versions of Webkit (library version 1.1.8 and later;
   see <a href="https://bugs.webkit.org/show_bug.cgi?id=8736">bug
   8736</a>).  Older Gecko-based browsers scale each arc
   independently, and limit each corner to half the outer dimensions
   of the border box.  Older Webkit-based browsers ignore <i>all</i>
   the corner radii for a box if the sum of the semi-axes
   on <i>any</i> side is greater than the outer dimension of the
   border box on that side.</p>

<h2><a name="transitions">Transitions</a></h2>

<table class="example">
<tr><th>Color and style<br />transitions</th>
    <th>In your<br />browser</th><th>Ideal<br />rendering</th></tr>
<tr><td><pre class="exPre">border-radius: 20px;
border: 4px solid;
border-color: red green
              blue gray;</pre></td>
    <td><div class="exDiv" id="ex10"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex10.png"></td></tr>
<tr><td><pre class="exPre">border: 6px black;
border-style: solid  solid
             double double;</pre></td>
    <td><div class="exDiv" id="ex11"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex11.png"></td></tr>
</table>

<p>The Backgrounds module leaves the visual appearance of a transition
   between border colors and/or border styles undefined, but does
   require that they take place entirely within the curved region of
   the border.  It does, however, recommend the use of a gradient for
   transitions involving color only.</p>

<p>Both Gecko- and Webkit-based browsers currently implement all such
  transitions as abrupt, occurring at the diagonal of the rectangle
  that encloses the corner curve.  This may change in the future, at
  least for color transitions; see
  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=483696">bug
  483696</a> for Gecko.</p>

<h2><a name="non-solid-borders">Borders that are not solid</a></h2>

<table class="example">
<tr><th>Dotted and<br />dashed corners</th><th>In your<br />browser</th><th>Ideal<br />rendering</th></tr>
<tr><td><pre class="exPre">border-width: 2px;
border-radius: 15px;
border-style: dotted;</pre></td>
    <td><div class="exDiv" id="ex14"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex14.png"></td></tr>
<tr><td><pre class="exPre">border-style: dashed;</pre></td>
    <td><div class="exDiv" id="ex15"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex15.png"></td></tr>
</table>

<p>In terms of what gets drawn on the screen, inset and outset borders
   are the same as solid borders that aren’t the same color all the
   way around, so they are also affected the same way
   by <code>border-radius</code>.  Double, groove, and ridge borders
   are drawn with two or three stripes within the border thickness.
   The arc-reduction rule described above is applied to each stripe;
   this can exaggerate the apparent kink when the innermost arc is too
   flat, but otherwise works well.</p>

<p>For dotted and dashed borders, the dots or dashes are supposed to
   continue through the corner curve.  Gecko-based browsers don’t
   implement this at all; the curved portions of the border are drawn
   as solid
   (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=382721">bug
   382721</a>).  Webkit draws dots and dashes along the curves, but
   may show artifacts at the ends of the curves.</p>

<h2><a name="interactions">Clipping of background and content</a></h2>

<table class="example">
<tr><th>Clipping</th><th>In your<br />browser</th><th>Proper<br />rendering</th></tr>
<tr><td><pre class="exPre">border-radius: 15px;
border: none;
overflow: visible;</pre></td>
    <td><div class="exDiv" id="ex16"><img class="exImg" src="/media/2010/05/reticule.png"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex16.png"></td></tr>
<tr><td><pre class="exPre">overflow: hidden;</pre></td>
    <td><div class="exDiv" id="ex17"><img class="exImg" src="/media/2010/05/reticule.png"></div></td>
    <td><img class="exImg" src="/media/2010/05/ex17.png"></td></tr>

</table>

<p>Both colored and image backgrounds are clipped to the curved
   border.  This happens even if there is no visible border
   (with <code>border-style: none</code>, for instance).
   A <a href="http://dev.w3.org/csswg/css3-background/#border-image"><code>border-image</code></a>
   is <i>not</i> clipped, but backgrounds are still clipped to the
   curve, even though in the presence of <code>border-image</code>
   the regular border is not drawn.</p>

<p>Content is, by default, not clipped at all.  If you
   use <code>overflow:hidden</code>, however, the Backgrounds module
   requires content to be clipped to the border curve.  This works
   with very recent Webkit
   (partially, <a href="https://bugs.webkit.org/show_bug.cgi?id=9543">bug
   9543</a>) but not Gecko
   (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=459144">bug
   459144</a>). or older versions of Webkit.</p>

<p>The spec says <q>The UA may reduce or treat as zero the
   border-radius for a given corner if a scrolling mechanism is
   present in that corner.</q> In other words, if there are scrollbars
   (<code>overflow:scroll</code> or <code>overflow:auto</code>),
   corners on the sides that actually have scrollbars may not be
   rounded.  This is because the scrollbars themselves obviously
   should not be clipped, and the visual inconsistency was expected to
   be undesirable in at least some cases.</p>

<p>By default, the clipping path is the <i>outer</i> rounded
  rectangle; thus, the background will show under the border if the
  border is not fully opaque.  (This is visible in several of the
  examples above.)  The Backgrounds module includes a
  <a href="http://dev.w3.org/csswg/css3-background/#background-clip"><code>background-clip</code></a> property that can change this.
  Gecko and Webkit both include partial support for this property,
  but they conform to an older revision of the
  spec: the value keywords are <code>border</code>
  and <code>padding</code> instead of <code>border-box</code>
  and <code>padding-box</code>; <code>content-box</code>
  and <code>no-clip</code> are not supported.</p>

<h2><a name="browser-compat">Browser compatibility matrix</a></h2>

<table id="compatmatrix">
<thead>
<tr><td class="gap" colspan="2" rowspan="2"></td>
<th colspan="2">Gecko-based</th>
<td class="gap" rowspan="2"></td>
<th colspan="2">Webkit-based</th>
<td class="gap" rowspan="2"></td>
<th colspan="2">Other</th></tr>
<tr><th>Firefox<br />3.5</th><th>Firefox<br />3.0</th>
<th>Current<br />(Epiphany 2.27.3,<br />using Webkit 1.1.10)</th>
<th>Older<br />(Safari 3.2.2<br />for Windows)</th>
<th>Opera<br />(9, 10)</th>
<th>IE<br />(6, 7, 8)</th>
</tr>
</thead>
<tbody>
<tr><th class="sectioner" colspan="10">Property Names</th></tr>
<tr><th class="prophead">border-radius</th>
<td class="gap" rowspan="5"></td>
<td class="propcell" colspan="2">-moz-border-radius</td>
<td class="gap" rowspan="5"></td>
<td class="propcell" colspan="2">-webkit-border-radius</td>
<td class="gap" rowspan="5"></td>
<td class="absent" rowspan="17">Not supported</td>
<td class="absent" rowspan="17">Not supported</td></tr>
<tr><th class="prophead">border-top-left-radius</th>
<td class="propcell" colspan="2">-moz-border-radius-topleft</td>
<td class="propcell" colspan="2">-webkit-border-top-left-radius</td>
</tr>
<tr><th class="prophead">border-top-right-radius</th>
<td class="propcell" colspan="2">-moz-border-radius-topright</td>
<td class="propcell" colspan="2">-webkit-border-top-right-radius</td>
</tr>
<tr><th class="prophead">border-bottom-right-radius</th>
<td class="propcell" colspan="2">-moz-border-radius-bottomright</td>
<td class="propcell" colspan="2">-webkit-border-bottom-right-radius</td>
</tr>
<tr><th class="prophead">border-bottom-left-radius</th>
<td class="propcell" colspan="2">-moz-border-radius-bottomleft</td>
<td class="propcell" colspan="2">-webkit-border-bottom-left-radius</td>
</tr>
<tr><th class="sectioner" colspan="8">Value syntax</th></tr>
<tr><th>Single <code>&lt;length&gt;</code></th>
<td class="gap" rowspan="4"></td>
<td class="ok">Works</td>
<td class="ok">Works</td>
<td class="gap" rowspan="4"></td>
<td class="ok">Works</td>
<td class="ok">Works</td>
<td class="gap" rowspan="4"></td>
</tr>
<tr><th>Two <code>&lt;length&gt;</code>s in longhand</th>
<td class="ok">Works</td>
<td class="absent">Not supported</td>
<td class="ok">Works</td>
<td class="ok">Works</td>
</tr>
<tr><th>More than one circular radius in shorthand</th>
<td class="ok">Works</td>
<td class="ok">Works</td>
<td class="absent">Not supported</td>
<td class="absent">Not supported</td>
</tr>
<tr><th>Elliptical curves in shorthand</th>
<td class="ok">Works</td>
<td class="absent">Not supported</td>
<td class="absent">Not supported</td>
<td class="absent">Not supported</td>
</tr>
<tr><th class="sectioner" colspan="8">Semantic details</th></tr>
<tr><th>Oversized radius reduction</th>
<td class="gap" rowspan="6"></td>
<td class="ok">Works</td>
<td class="buggy">Buggy</td>
<td class="gap" rowspan="6"></td>
<td class="ok">Works</td>
<td class="buggy">Buggy</td>
<td class="gap" rowspan="6"></td>
</tr>
<tr><th>Color transitions</th>
<td class="buggy">Abrupt</td>
<td class="buggy">Abrupt</td>
<td class="buggy">Abrupt</td>
<td class="buggy">Abrupt</td>
</tr>
<tr><th>Style transitions</th>
<td class="buggy">Abrupt</td>
<td class="buggy">Abrupt</td>
<td class="buggy">Abrupt</td>
<td class="buggy">Abrupt</td>
</tr>
<tr><th>Dotted and dashed corners</th>
<td class="absent">Drawn solid</td>
<td class="absent">Drawn solid</td>
<td class="buggy">Artifacts</td>
<td class="buggy">Artifacts</td>
</tr>
<tr><th>Background clipping</th>
<td class="ok">Works</td>
<td class="ok">Works</td>
<td class="ok">Works</td>
<td class="ok">Works</td>
</tr>
<tr><th>Overflow clipping</th>
<td class="absent">Unimplemented</td>
<td class="absent">Unimplemented</td>
<td class="buggy">Partial</td>
<td class="absent">Unimplemented</td>
</tr>
<tr><th class="sectioner" colspan="10"></th></tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/border-radius/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>On the unfriendliness of bug reporting</title>
		<link>http://www.owlfolio.org/htmletc/unfriendliness-of-bug-reporting/</link>
		<comments>http://www.owlfolio.org/htmletc/unfriendliness-of-bug-reporting/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 20:05:00 +0000</pubDate>
		<dc:creator>Zack Weinberg</dc:creator>
				<category><![CDATA[HTML &c]]></category>

		<guid isPermaLink="false">http://owl-folio.nfshost.com/uncat/on-the-unfriendliness-of-bug-reporting/</guid>
		<description><![CDATA[There&#8217;s been a long discussion on one of the Mozilla mailing lists about how we can do a better job categorizing and triaging incoming bugs. This is my contribution, which I felt deserved a somewhat broader audience. Attention conservation notice: &#8230; <a href="http://www.owlfolio.org/htmletc/unfriendliness-of-bug-reporting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s been a long discussion on one of the Mozilla mailing
lists about how we can do a better job categorizing and triaging
incoming bugs.  This is my contribution, which I felt deserved a
somewhat broader audience.</p>

<p><span id="more-296"></span></p>

<p><em>Attention conservation notice: thousand-word rant about the user friendliness
of a bug database.</em></p>

<p>I, a developer, frequently have trouble figuring out which
component I ought to file a bug under, especially when it&#8217;s not
in one of the areas I work on&#8212;which is when it&#8217;s most
important for me to get it right, so that it comes to the attention of
people who do work on that area.  It doesn&#8217;t help that, for any
given bug, I might be supposed to file it under Firefox or under
Core, <em>each of which</em> has a dauntingly long list that you have to
scroll through via a five-line selection box.  (I was hoping that the
3.2 upgrade would at least give me a bigger box, but it didn&#8217;t;
showing the descriptions is nice but often the descriptions are just
as cryptic to me as the names themselves.)</p>

<p>I happened to be complaining about this last night and my SO, who
is a web designer, said that she&#8217;d completely given up on
reporting bugs to us because she had <em>no idea</em> what product and
component to select, and the new-bug form gave the impression that if
you didn&#8217;t get that right you might as well not bother filing
the bug at all! &#8212;She now has me proxy bug reports for her, which
is fine and all but doesn&#8217;t scale.  And if someone who already
knows HTML from CSS from JavaScript and the difference between Firefox
and Gecko can&#8217;t figure out how to label her bug reports, how can
we possibly expect less informed users to?</p>

<p>So I think the user-facing problem&#8212;the product+component
space is too big and daunting&#8212;is more serious than the
possibility that QA won&#8217;t scale to handle increased triage
responsibilities.  If MozCo needs to hire some (more?) people whose
entire job is to triage bugs, well, I have the impression
there&#8217;s room in the budget for that.</p>

<p>Now, the component list isn&#8217;t the only daunting thing about
the new-bug form.  I&#8217;m looking at it now, and to get to the
important part&#8212;the description-of-bug box&#8212;I have to scroll
past an entire screenful of form fields.  And I have a huge monitor.
And I know that most of the time I can leave all those fields blank.
The &ldquo;bugzilla helper&rdquo; is even worse; the first thing you
see is a giant confusing table of already-filed bugs. I appreciate the
attempt to reduce the number of dupes but I&#8217;d bet a dollar that
lots of users see that and give up without even reading it!</p>

<p>Oh, and halfway down the bugzilla helper it tells you to report
broken websites a totally different way. It&#8217;s good that we have
a guided wizard built into firefox for that&#8211;but
it&#8217;s <em>very bad</em> to let someone get halfway down the page
before telling them, no, wait, stop, do something totally different!
It&#8217;s also bad to demand that the user go try the latest
development version before they do anything else, and for the first
thing they see when they open the wizard (presumably first time only,
but still) to be a minuscule box containing over a thousand words of
legalese.</p>

<p>I think we could make life easier for both users and QA by doing
some serious user interface redesign on the new bug forms.  I&#8217;m
imagining a directed question-and-answer session with no more than
seven (plus or minus two) options at each stage, eventually leading up
to one or two freeform entry boxes. The goal of this would be to do a
rough-cut categorization that makes less work for human triagers, and
at the same time tries to get enough information out of the user that
we don&#8217;t need to go back for more.  It should be clear to people
unfamiliar with the terms, but not insulting to experienced users; I
think if we do it right it would be easier for <em>everyone</em> than
the current form.</p>

<p>For developers it might be good to have a special mode for when
you&#8217;re filing a bug to describe a specific chunk of work
that&#8217;s already planned.  This could do things like deduce the
correct component and suggest reviewers/cc: subscribers from file
names or bug numbers mentioned in the description, or even in the
patch that you&#8217;re attaching as you file the bug.</p>

<p>This is getting pretty far offtopic, but I&#8217;d also like to
bring up a pet peeve of mine: I don&#8217;t think we
should <em>ever</em> tell people to stop commenting on a bug.  I do
realize that when there are widely-cc:ed, widely-commented-on,
long-standing, not-gonna-be-fixed-soon bugs, it&#8217;s no fun to be
on the receiving end of all that mail, and the me-toos can obscure any
actual technical discussion that might get the bug solved.  Too often,
though, I see that turning into hostility to users. A &#8220;leave us
alone&#8221; response to a &#8220;hey this is still a problem for
me&#8221; comment is a great way to ensure that that person never
reports a bug again.  </p>

<p>I think there <em>ought</em> to be a way for a bug to host a deeply
technical conversation about how to fix it and a long train of me-toos
at the same time, but I don&#8217;t have any great ideas, probably
because I read too fast for it to be a serious problem for
me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.owlfolio.org/htmletc/unfriendliness-of-bug-reporting/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

