<?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>iamthewalr.us &#187; Mozilla</title>
	<atom:link href="http://iamthewalr.us/blog/category/mozilla/feed/" rel="self" type="application/rss+xml" />
	<link>http://iamthewalr.us/blog</link>
	<description>by Colin Barrett</description>
	<lastBuildDate>Thu, 10 May 2012 04:48:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Smaller Is Better</title>
		<link>http://iamthewalr.us/blog/2008/03/smaller-is-better/</link>
		<comments>http://iamthewalr.us/blog/2008/03/smaller-is-better/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 00:05:07 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[proto]]></category>
		<category><![CDATA[small icons]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2008/03/27/smaller-is-better/</guid>
		<description><![CDATA[I&#8217;m not a fan of how much screen real estate the new back button takes up in the latest builds of Firefox 3. Fortunately there&#8217;s an easy way to change that1. Here&#8217;s a visual walkthrough: Right click on the toolbar and select &#8220;Customize…&#8221; Check the &#8220;Use Small Icons&#8221; checkbox and then click &#8220;OK&#8221;. Enjoy! You [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not a fan of how much screen real estate the new back button takes up in the latest builds of Firefox 3. Fortunately there&#8217;s an easy way to change that<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>. Here&#8217;s a visual walkthrough:</p>

<ol>
<li><p>Right click on the toolbar and select &#8220;Customize…&#8221;</p>

<p><img src="http://iamthewalr.us/blog/wp-content/uploads/2008/03/picture-3.png" alt="Picture 3.png" border="0" width="307" height="135" /></p></li>
<li><p>Check the &#8220;Use Small Icons&#8221; checkbox and then click &#8220;OK&#8221;.</p>

<p><img src="http://iamthewalr.us/blog/wp-content/uploads/2008/03/picture-5.png" alt="Picture 5.png" border="0" width="792" height="479" /></p></li>
<li><p>Enjoy!</p>

<p><img src="http://iamthewalr.us/blog/wp-content/uploads/2008/03/picture-2.png" alt="Picture 2.png" border="0" width="642" height="518" /></p></li>
</ol>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>You can also move the Home button to the bookmarks toolbar by dragging it there while the Customize sheet is up.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2008/03/smaller-is-better/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Thanks, Lazyweb! Problems solved.</title>
		<link>http://iamthewalr.us/blog/2008/02/thanks-lazyweb-problems-solved/</link>
		<comments>http://iamthewalr.us/blog/2008/02/thanks-lazyweb-problems-solved/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 21:29:22 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Adium]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[buildbot]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2008/02/14/thanks-lazyweb-problems-solved/</guid>
		<description><![CDATA[I did in fact solve the problems we were having with Adium&#8217;s install of buildbot. It turns out that because of some security features of Mac OS X, I needed to start the buildbot process from an actual Terminal window on that machine, not from ssh. You can read about all this (and much, much [...]]]></description>
			<content:encoded><![CDATA[<p>I did in fact solve the problems we were having with <a href="http://adiumx.com">Adium</a>&#8217;s install of <a href="http://buildbot.net">buildbot</a>. It turns out that because of some security features of Mac OS X, I needed to start the buildbot process from an actual Terminal window on that machine, not from ssh. You can read about all this (and much, much more!) in <a href="http://developer.apple.com/technotes/tn2005/tn2083.html">this technote</a>.</p>

<p>A big thank you to everyone who helped, especially Keith, Rob and Ben. <img src="http://iamthewalr.us/blog/wp-content/uploads/2008/02/967d240d-061a-4fd9-a323-d88e8e07679a.jpg" alt=":ms:" border="0" width="65" height="22" /></p>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2008/02/thanks-lazyweb-problems-solved/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>smew problems</title>
		<link>http://iamthewalr.us/blog/2008/02/smew-problems/</link>
		<comments>http://iamthewalr.us/blog/2008/02/smew-problems/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 00:03:55 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Adium]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[buildbot]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2008/02/13/smew-problems/</guid>
		<description><![CDATA[So a while ago I set up buildbot for Adium. Briefly, buildbot provides continuous integration (i.e., building the source tree after every checkin) and runs our unit tests automatically. Cool stuff, and hats off to the buildbot team. Things seemed to be running fine for a while, no problems. However, recently we&#8217;ve started to get [...]]]></description>
			<content:encoded><![CDATA[<p>So a while ago I set up <a href="http://buildbot.net">buildbot</a> for <a href="http://adiumx.com">Adium</a>. Briefly, buildbot provides continuous integration (i.e., building the source tree after every checkin) and runs our unit tests automatically. Cool stuff, and hats off to the buildbot team. Things seemed to be running fine for a while, no problems. However, recently we&#8217;ve started to get some odd errors on the machine we use for running builds, a Mac Mini named <code>smew</code><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>.</p>

<p>Subversion began to fail looking up DNS requests. I could only reproduce the problem when buildbot was running svn. If I logged in, I could run the exact same commands myself. And even more curiously, telling buildbot to run <code>nslookup svn.adiumx.com</code> worked completely fine.</p>

<p>I &#8220;solved&#8221; this by having the buildbot master (on a Linux machine) doing the lookup and then telling the client to checkout <code>svn://&lt;ip here&gt;</code>. If the IP of the subversion server changes, we just need to do a clean build and it&#8217;ll pick up the change. It&#8217;s not a great solution, but definitely workable.</p>

<p>This worked either briefly or perhaps not at all, I don&#8217;t recall, because our automated tests began failing like so:</p>

<pre><code>/Developer/Tools/RunUnitTests:298: note: Started tests for architectures 'ppc i386'
/Developer/Tools/RunUnitTests:301: note: Running tests for architecture 'ppc'
Wed Feb 13 02:07:40 smew.adiumx.com otest[41048] &lt;Error&gt;: kCGErrorRangeCheck : On-demand launch of the Window Server is allowed for root user only.
Wed Feb 13 02:07:40 smew.adiumx.com otest[41048] &lt;Error&gt;: kCGErrorRangeCheck : Set a breakpoint at CGErrorBreakpoint() to catch errors as they are returned
2008-02-13 02:07 otest[41048] (CarbonCore.framework) FSEventStreamStart: ERROR: FSEvents_connect() =&gt; (ipc/send) invalid destination port (268435459)
FAILED TO GET ASN FROM CORESERVICES so aborting.
/Developer/Tools/RunUnitTests: line 301: 41048 Abort trap              arch -arch "${TEST_ARCH}" "${TEST_RIG}" "${TEST_BUNDLE_PATH}"
/Developer/Tools/RunUnitTests:314: error: Test rig '/Developer/Tools/otest' exited abnormally with code 134 (it may have crashed).
** BUILD FAILED **
</code></pre>

<p>This is particularly strange because again, I can run these tests manually and get proper results. Same user buildbot is running in (and that user is logged in to the machine and has a window server connection), same checkout, same everything, near as I can tell.</p>

<p>This may or may not be superstition and it is probably just a coincidence, but sometimes these tests do run, and it seems that when I am logged in to the machine via ssh things work OK. But after I log out, things go screwy again. It&#8217;s something screwy with that particular machine &#8212; I had the buildbot slave running on a Mac mini while I was at Mozilla and it worked just fine.</p>

<p>I&#8217;ve run a permissions repair. It fixed some things. Still no dice. Buildbot is using the python installed by Leopard. The machine is fully updated, none of that fixed the problems (not even the Leopard graphics update). This machine is located at a colo somewhere inaccessible (Mars?), so while doing an archive and install would normally be my next step, I don&#8217;t have easy access to the machine.</p>

<p>I&#8217;ve done everything I can think of that I can do easily. Help me blogosphere, you&#8217;re my only hope.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>The Smew (Mergellus albellus) is a small duck which is intermediate between the mergansers and the goldeneyes, and has interbred with the Common Goldeneye. It is the only member of the genus Mergellus. (<a href="http://en.wikipedia.org/wiki/Smew">Wikipedia</a>)&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2008/02/smew-problems/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>You&#8217;re missing out!</title>
		<link>http://iamthewalr.us/blog/2008/02/youre-missing-out/</link>
		<comments>http://iamthewalr.us/blog/2008/02/youre-missing-out/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 18:17:02 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2008/02/06/youre-missing-out/</guid>
		<description><![CDATA[There&#8217;s still time to claim your free iPod! An iPod full of blog entries by me! So, if you don&#8217;t want to miss out on all of the forthcoming posts by me, about me, for you, then subscribe to the main feed of this blog. I&#8217;m trying to say that Planet will only be syndicating [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s still time to claim your free iPod! An iPod full of blog entries by me! So, if you don&#8217;t want to miss out on all of the forthcoming posts by me, about me, for you, then subscribe to the main feed of this blog.</p>

<p>I&#8217;m trying to say that Planet will only be syndicating the Mozilla category of my blog now, which will only contain boring, Mozilla-related entries, and none of the super awesome non-Mozilla related entries. <strike>BUY</strike> SUBSCRIBE NOW!</p>

<p>I&#8217;m hoping that having a more self-selecting audience will encourage me to post more, and about things other than programming &#8212; likely current events, things happening in my life, and just in general more. I really enjoy writing and would like to do more of it.</p>

<p>I also think I&#8217;m going to take a little bit different tone here. Daniel Jalkut and Brent Simmons, both at one time the author of the amazing app <a href="http://www.red-sweater.com/marsedit/">MarsEdit</a> have said that one of the points of MarsEdit is to make blogging as easy as email. Well, I&#8217;ve been writing my blog with a different voice than I use when writing email, so that&#8217;s probably going to change too, again the intent being to get me to blog more.</p>

<p>I&#8217;ve got a lot to say, and this place is about to become quite the soapbox. So prep your feed readers and get ready to, uh, read some blog entries in a couple of days. Yes.</p>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2008/02/youre-missing-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving On</title>
		<link>http://iamthewalr.us/blog/2008/01/moving-on/</link>
		<comments>http://iamthewalr.us/blog/2008/01/moving-on/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 23:46:25 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2008/01/18/moving-on/</guid>
		<description><![CDATA[I&#8217;ve thought a lot about it and decided that January 29th will be my last day at Mozilla. It&#8217;s been a good run, but I need to move on to see what other opportunities are out there. I&#8217;m honored to have had the fine folks at MoCo as my colleagues this past year. I hope [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve thought a lot about it and decided that January 29th will be my last day at Mozilla.</p>

<p>It&#8217;s been a good run, but I need to move on to see what other opportunities are out there. I&#8217;m honored to have had the fine folks at MoCo as my colleagues this past year.</p>

<p>I hope 2008 will be as wonderful and enriching as 2007 was.</p>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2008/01/moving-on/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Theme Changes for Beta 2</title>
		<link>http://iamthewalr.us/blog/2007/12/theme-changes-for-beta-2/</link>
		<comments>http://iamthewalr.us/blog/2007/12/theme-changes-for-beta-2/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 00:04:48 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2007/12/04/theme-changes-for-beta-2/</guid>
		<description><![CDATA[No, this isn&#8217;t a post about Proto, the new mac theme, but it is about a change to Pinstripe I just checked in for beta 2. Both Josh &#38; I have heard a bunch of feedback that Firefox 3 beta 1 looks on Leopard is really confusing: Firefox looks mostly like it&#8217;s in the background, [...]]]></description>
			<content:encoded><![CDATA[<p>No, this isn&#8217;t a post about <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=397723">Proto, the new mac theme</a>, but it is about <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=406828">a change to Pinstripe</a> I just checked in for beta 2. Both Josh &amp; I have heard a bunch of feedback that Firefox 3 beta 1 looks on Leopard is really confusing: Firefox looks mostly like it&#8217;s in the background, even when it&#8217;s the frontmost app.</p>

<p>So we decided to revert the changes to Pinstripe we made for beta 1. Here&#8217;s what beta 2 will look like on Tiger:</p>

<p><img src="http://iamthewalr.us/blog/wp-content/uploads/2007/12/da7da36f-c082-4f7c-822f-5707f3838f9a.jpg" alt="DA7DA36F-C082-4F7C-822F-5707F3838F9A.jpg" border="0" width="337" height="171" /></p>

<p>And Leopard:</p>

<p><img src="http://iamthewalr.us/blog/wp-content/uploads/2007/12/1f1971c6-8391-4429-8abb-8714071e4712.jpg" alt="1F1971C6-8391-4429-8ABB-8714071E4712.jpg" border="0" width="342" height="164" /></p>

<p>Not the snazziest looking, but hopefully it should tide people over until Proto is finally ready :)</p>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2007/12/theme-changes-for-beta-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Firefox 3 beta 1 Test Day!</title>
		<link>http://iamthewalr.us/blog/2007/11/firefox-3-beta-1-test-day/</link>
		<comments>http://iamthewalr.us/blog/2007/11/firefox-3-beta-1-test-day/#comments</comments>
		<pubDate>Fri, 09 Nov 2007 17:59:44 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[testday]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2007/11/09/firefox-3-beta-1-test-day/</guid>
		<description><![CDATA[The Mozilla QA community is having a test day for Firefox 3 beta 1. So stop by irc and either run some litmus tests or just browse the web and report any issues you see in #testday. If even that&#8217;s too much, you can help answer people&#8217;s questions, help search bugzilla, etc. If you feel [...]]]></description>
			<content:encoded><![CDATA[<p>The Mozilla QA community is having a <a href="http://quality.mozilla.org/en/node/784">test day for Firefox 3 beta 1</a>. So <a href="irc://irc.mozilla.org/testday">stop by irc</a> and either <a href="http://quality.mozilla.org/howto/litmus/tutorial">run some litmus tests</a> or just browse the web and report any issues you see in #testday. If even that&#8217;s too much, you can help answer people&#8217;s questions, help search bugzilla, etc.</p>

<p>If you feel the need to digg/reddit this, <a href="http://digg.com/software/Join_the_Firefox_3_Beta_1_Testday_this_Friday_9_November">use</a> <a href="http://reddit.com/info/6081d/comments/">these</a> instead of submitting a new one for this blog post.</p>

<p>See you on IRC!</p>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2007/11/firefox-3-beta-1-test-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clean Room</title>
		<link>http://iamthewalr.us/blog/2007/10/clean-room/</link>
		<comments>http://iamthewalr.us/blog/2007/10/clean-room/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 01:34:13 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[extended attributes]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2007/10/30/clean-room/</guid>
		<description><![CDATA[So I was curious how Apple&#8217;s was implementing the new &#8220;You&#8217;re opening an Application downloded from the internet!&#8221; dialog, particularly because of the extra information that items downloaded with Safari are given. First off, it seems like that information is stored in the com.apple.metadata:kMDItemWhereFroms extended attribute, which is a binary plist. Use mdls filename to [...]]]></description>
			<content:encoded><![CDATA[<p>So I was curious how Apple&#8217;s was implementing the new &#8220;You&#8217;re opening an Application downloded from the internet!&#8221; dialog, particularly because of the extra information that items downloaded with Safari are given.</p>

<p>First off, it seems like that information is stored in the <code>com.apple.metadata:kMDItemWhereFroms</code> extended attribute, which is a binary plist. Use <code>mdls filename</code> to view just the Spotlight information about a file. First item seems to be the URL, and the second is optional and contains the referrer.</p>

<p>That&#8217;s all well and good, but what&#8217;s actually causing that dialog to display, and then go away again later?</p>

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

<p>So using the shiny new <code>xattr</code> utility, I took a look around. I found the <code>com.apple.quarantine</code> key. For a typical Safari download, it looked something like this:</p>

<blockquote>
  <p>com.apple.quarantine: 0000;4727b833;Safari;211E2770-C08D-487B-A602-3EDBC7D34124|com.apple.Safari</p>
</blockquote>

<p>For a Firefox (Minefield actually) download it looks more like this:</p>

<blockquote>
  <p>com.apple.quarantine: 0000;4727bb8d;Minefield;|org.mozilla.firefox</p>
</blockquote>

<p>The GUID is probably related to the kMDItemWhereFroms, and is what the dialog is actually pulling the &#8220;Show Web Page&#8221; and &#8220;downloaded from&#8221; information. By the way, it turns out that attribute gets set for <em>all</em> writes, including caches, Firefox profiles, etc. Probably a good thing.</p>

<p>fs_usage data supports the theory that that mdworker is seeing the kMDItemWhereFroms attribute and setting com.apple.quarantine appropriately, but I can&#8217;t really be sure yet (I haven&#8217;t tried DTrace).</p>

<p>I was still a little confused (and concerned) as to how Apple was setting this bit on writes from Firefox, which has no special code, or regular writes from Safari, so I tried an experiment: I copied Minefield, edited it&#8217;s CFBundleIdentifier to be something non-sensical (in this case <code>org.hello.world</code>) and tried downloading a file. The attribute wasn&#8217;t set.</p>

<p>So Apple&#8217;s doing bundle ID sniffing. Awesome. For the sake of completeness, I tried something else. I tried the same trick on Safari (this time used <code>org.cooldude.CoolBrowse</code>). I was further surprised to find that again <em>all</em> writes from CoolBrowse have the attribute set.</p>

<p>Really, I&#8217;m not sure <em>what</em> is going on here.</p>

<p>It looks like the xattr is actually set somewhere in the kernel (perhaps in seatbelt.kext?) I&#8217;m still curious as to how Safari&#8217;s getting special treatment here, and if other apps need (or want) to opt in.</p>

<p>I&#8217;m definitely not done figuring out what&#8217;s going on here, but I figured I&#8217;d put what I know so far up. Big thanks to <a href="http://www.mikeash.com/blog/">Mike Ash</a> and <a href="http://2chan.us/wordpress/">Alexander Strange</a> for helping out.</p>

<p>Edit: Well I&#8217;ll be damned. Check out LSQuarantine.h. It speaks volumes about either me or Apple (or both!) that I didn&#8217;t even think to check for anything public.</p>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2007/10/clean-room/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>User Agents, They Are A&#8217;Changin&#8217;</title>
		<link>http://iamthewalr.us/blog/2007/10/user-agents-they-are-achangin/</link>
		<comments>http://iamthewalr.us/blog/2007/10/user-agents-they-are-achangin/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 16:53:44 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[user agent]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2007/10/30/user-agents-they-are-achangin/</guid>
		<description><![CDATA[A while ago Adium had some troubles with our update mechanism that caused us to send versions of Adium to 10.3 users that would not launch on their operating system (since it was built against 10.4). One of the ways we mitigated this problem was to detect what version of OS X the users were [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago <a href="http://adiumx.com">Adium</a> had some troubles with our update mechanism that caused us to send versions of Adium to 10.3 users that would not launch on their operating system (since it was built against 10.4). One of the ways we mitigated this problem was to detect what version of OS X the users were running when they visited our website, and make the biggest, most obvious download link the correct one for their operating system.</p>

<p>Pretty cool, but there&#8217;s just one problem: there&#8217;s no way to detect that if the user isn&#8217;t using WebKit. <a href="http://trac.adiumx.com/wiki/zacw">Zac West</a> used <a href="http://developer.apple.com/internet/safari/uamatrix.html">this table of WebKit version numbers</a> to determine what OS a given user was running, based on which version of Safari shipped with that release.</p>

<p>That works well for browsers that come bundled with your system, but what about a third party browser? Gee, it&#8217;d be cool if there was a way to find out information about the browser being used to view your website.</p>

<p>Fortunately, the browser&#8217;s [User Agent string] (often just called its &#8220;UA&#8221;) is exactly the place for this sort of information to go, and indeed, that&#8217;s where those WebKit version numbers come from. Unfortunately, Firefox&#8217;s UA does not currently include which version of Mac OS X the was running on, despite Firefox&#8217;s Windows UA offering the ability to detect major releases of Windows.<sup id="fnref:linux"><a href="#fn:linux" rel="footnote">1</a></sup></p>

<p>So eventually, after ranting about this several times on IRC, <a href="http://www.oxymoronical.com/">Dave Townsend</a> mentioned that he&#8217;d be willing to write the patch if I shut up and filed the bug ;) <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=400089">So I did</a>. He checked in his patch this morning, and it should be available in tomorrow&#8217;s nightly. On Intel Macs, our UA now looks something like:</p>

<blockquote>
  <p>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9a9pre) Gecko/2007102604 Minefield/3.0a9pre</p>
</blockquote>

<p>On a PowerPC machine running an equivalent build, we&#8217;d a little bit more crufty.<sup id="fnref:macho"><a href="#fn:macho" rel="footnote">2</a></sup></p>

<blockquote>
  <p>Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O 10.4; en-US; rv:1.9a9pre) Gecko/2007102604 Minefield/3.0a9pre</p>
</blockquote>

<p>Including this information in our UA is something I&#8217;ve heard requested a number of times, and I&#8217;m glad it&#8217;s finally in.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:linux">
<p>Other *nixes also offer OS version information, <strike>but at least for Linux, Firefox uses the full kernel version, patch string included. Aside from the privacy implications, the kernel version is not really relevant. Perhaps which desktop environment you&#8217;re using (and its version) would be more appropriate, especially as we <a href="http://weblogs.mozillazine.org/roc/archives/2007/10/linux_matters.html">strive for more integration with GNOME</a>.</strike> Update: Turns out hasn&#8217;t been the case for many years. That&#8217;s what I get for reading old bugs. Sorry!&#160;<a href="#fnref:linux" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:macho">
<p>There&#8217;s a <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=401718">bug open about removing that Mach-O token</a> (it dates back to the earliest days of Mac OS X when Netscape was shipping both old-style CFM and new-style Mach-O binaries), but the user agent is a fragile beast, and removing tokens from it could break websites.&#160;<a href="#fnref:macho" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2007/10/user-agents-they-are-achangin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unified Toolbar for Firefox</title>
		<link>http://iamthewalr.us/blog/2007/10/unified-toolbar-for-firefox/</link>
		<comments>http://iamthewalr.us/blog/2007/10/unified-toolbar-for-firefox/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 09:07:08 +0000</pubDate>
		<dc:creator>Colin Barrett</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[toolbar]]></category>
		<category><![CDATA[unified]]></category>

		<guid isPermaLink="false">http://iamthewalr.us/blog/2007/10/30/unified-toolbar-for-firefox/</guid>
		<description><![CDATA[So I finally got to land bug 303110 earlier tonight. What a long road it&#8217;s been since my initial demo app that I hacked together in April! The Bugzilla bug above is quite long and very technical, so I&#8217;ll lay out what it means a few different groups of people (feel free to skip section [...]]]></description>
			<content:encoded><![CDATA[<p>So I finally got to land <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=303110">bug 303110</a> earlier tonight. What a long road it&#8217;s been since my initial demo app that I hacked together in April!</p>

<p>The Bugzilla bug above is quite long and very technical, so I&#8217;ll lay out what it means a few different groups of people (feel free to skip section that don&#8217;t apply to you):</p>

<h2>End Users</h2>

<p>There are immediate visual changes as a result of this patch. The default titlebar appearance now defaults to the same style as iTunes or Leopard, which is a much darker gray than normal Tiger windows. It doesn&#8217;t look so hot with Pinstripe, unfortunately, but you&#8217;ll have to bear with me.</p>

<p>Fortunately, good news is on the horizon. When <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=397723">bug 397723</a> lands, Firefox users will, for the first time in a while, have an interface that looks more or less at home on the Mac platform. Even better news is that it&#8217;s (as far as I know) going to happen for beta 1, so you&#8217;ll only have to wait a couple of days.</p>

<p>Thee changes will be a huge win for visual integration on Mac OS X, especially on Leopard. I definitely think it was worth doing.</p>

<h2>Theme Authors</h2>

<p>If you&#8217;re writing a Firefox theme on the Mac, you can now set the titlebar color of a window to be a flat, uniform color. There&#8217;s a new attribute for top level XUL elements, <code>titlebarcolor</code>. It only works on Mac, but shouldn&#8217;t cause too many problems.</p>

<p>Here&#8217;s an XBL trick you can use (courtesy of Boris Zbarsky) to apply this attribute to an existing top level element:</p>

<pre><code>&lt;binding id="unified"&gt;
    &lt;content titlebarcolor="orange"&gt;
        &lt;children/&gt;
    &lt;/content&gt;
&lt;/binding&gt;
</code></pre>

<p>Then in your css you set the <code>-moz-bidnding</code> rule as usual, e.g.</p>

<pre><code>window {
    -moz-binding: url(chrome://some/chrome/url/here/unified.xml#unified)
}
</code></pre>

<h2>Mac Developers</h2>

<p>For the curious, the technique I&#8217;m using here is a bit more advanced than the usual &#8220;set the background color of a metal window&#8221; trick that made the rounds on blogs in 2005 or so. Here&#8217;s a summary:</p>

<ul>
<li>First, we create a custom NSColor subclass that knows about our window, a titlebar color, and a background color, and override set.</li>
<li>From the set method, we create a CGPattern with a tile size as tall as the window and one pixel wide (YMMV), and set it as the pattern fill.</li>
<li>In the pattern&#8217;s draw callback, we draw our titlebar color in the upper 22 pixels of the tile and the background color everywhere else. This allows us to do neat things like have a transparent content area with our custom titlebar, which is needed for Gecko platform parity.</li>
<li>In the case where we don&#8217;t want our own custom titlebar, but want the default appearance, there&#8217;s code that draws a Leopard-style titlebar, (since you can&#8217;t change the window mask of a window after it&#8217;s ben created).</li>
</ul>

<p>You can check the code out <a href="http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/widget/src/cocoa/nsCocoaWindow.mm&amp;rev=1.112&amp;root=/cvsroot#1438">here</a>. It&#8217;s available under the terms of the MPL/LGPL/GPL, whichever you choose &#8212; contact me directly if you need help understanding the licenses.</p>

<h2>The Future?</h2>

<p>If all of this seems a little bit extreme and evil, don&#8217;t worry too much! Asaf Romano and I are scheming about implementing the titlebar completely in XUL, so themes could then style it however they wanted. It&#8217;s a much cleaner way to implement this than having a huge widget-leve API.</p>

<p>To do it though, we need <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=307204">bug 307204</a> to land. If anyone can give Håkan a hand getting his patch to work, many people would be very thankful :)</p>
]]></content:encoded>
			<wfw:commentRss>http://iamthewalr.us/blog/2007/10/unified-toolbar-for-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.061 seconds -->

