{"id":172,"date":"2014-04-17T15:27:49","date_gmt":"2014-04-17T13:27:49","guid":{"rendered":"http:\/\/www.gijsk.com\/blog\/?p=172"},"modified":"2014-04-17T15:27:49","modified_gmt":"2014-04-17T13:27:49","slug":"why-doing-visual-refreshes-of-firefox-is-hard","status":"publish","type":"post","link":"https:\/\/www.gijsk.com\/blog\/2014\/04\/why-doing-visual-refreshes-of-firefox-is-hard\/","title":{"rendered":"Why doing visual refreshes of Firefox is hard"},"content":{"rendered":"<p>We&#8217;re getting closer and closer to releasing Australis with Firefox 29, and that gives me more time to write something that&#8217;s been on my mind the last couple of weeks\/months. Extra impetus was provided by sentiment along the lines of &#8220;how did you possibly miss this \/ think fix X was a good idea?&#8221; from some people outside the core development team, responding to some of our changes.<\/p>\n<p>In this post, I&#8217;d like to give you an idea of the number of combinations of options, configurations, themes, add-ons, fonts and styles. It is <strong>enormous<\/strong>. Firefox generally tries to fit in with your operating system as best it can, and that means we have to pay attention to lots of things. And yes, that means sometimes we miss things. Here&#8217;s a breakdown of some of the things I&#8217;ve seen fly by as we made Australis, all linked to bugs specific to particular scenarios (there are 54 individual bugs linked, the majority of which were fixed for 29).<\/p>\n<p>Firefox is available on three main (tier-1) platforms: Windows, Linux, and OS X.<\/p>\n<p>All three platforms support lightweight themes, of which we support light and dark text variants. On light text lightweight themes, we invert the text and icons to be bright (which usually means the theme itself has a dark background). Interactions between these themes and the OS are not always the same everywhere, which leads to <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=983046\">bugs<\/a>.<\/p>\n<p>Different toolbars like the menubar and the bookmarks toolbar can be toggled on and off (which sometimes <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=870605\">makes certain ideas more difficult<\/a>), and the menubar has an <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=979608\">autohide state<\/a>, which is new on Linux and <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=966683\">caused specific bugs there<\/a>.<\/p>\n<p>And although we normally always show the tabbar and the navbar, there are popup windows where we don&#8217;t (toolbar=no), which, you guessed it, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=873449\">causes bugs<\/a>.<\/p>\n<p>Then we have per-window private browsing, which <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=996148\">has an indicator which makes things &#8216;fun&#8217;<\/a> (and soon private browsing will look even more different from normal browsing).<\/p>\n<p>Of course, while we stick to English layout direction is more or less fixed, but we ship both LTR and RTL locales on all platforms, which changes the order of things, which <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=979232\">frequently<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=970816\">leads<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=979300\">to<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=979501\">bugs<\/a>.<\/p>\n<p>Then there&#8217;s the padding that we added for &#8220;customize mode&#8221;, which affects layout of the toolbars and the (&#8216;fake&#8217;) titlebar, which had its <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=964322\">own<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=933933\">problems<\/a>.<\/p>\n<p>Some issues are specific to <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=972140\">pinned<\/a> or <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=971630\">overflowing<\/a> tabs (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=853415\">sometimes even particular tabs<\/a>), as well as <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=941309\">panorama\/tab groups<\/a>.<\/p>\n<p>Beyond that, styling is somewhat platform-specific, each with their own quirks:<\/p>\n<h2>OS X<\/h2>\n<p>OS X is, in a certain sense, &#8220;easiest&#8221; because the OS doesn&#8217;t have a lot of options that mess with things (font size, for example, isn&#8217;t easily configurable). But there&#8217;s still some variation:<\/p>\n<ul>\n<li>Lion vs. pre-lion: 10.6, which we still support, has no fullscreen button in the titlebar (unlike 10.7-10.9) and has no concept of &#8220;Lion fullscreen&#8221;.<\/li>\n<li>Spaces: causes <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=996892\">odd bugs<\/a> with panels.<\/li>\n<li>HiDPI (&#8220;retina&#8221;): this causes bugs \/ <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=883147\">missed cases<\/a>. Add external displays which might not be hidpi, and you get even <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=968838\">odder<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=985947\">bugs (this one&#8217;s 10.9-only, too, it seems!)<\/a>.<\/li>\n<li>RTL. Coupled with retina &#8211;&gt; more <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=991254\">bugs<\/a>.<\/li>\n<li>10.9 broke <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=931040\">more stuff<\/a>.<\/li>\n<li>Titlebar can be turned on\/off now: cue <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=941831\">more<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=973694\">bugs<\/a>.<\/li>\n<\/ul>\n<h2>Linux<\/h2>\n<p>Linux really means &#8220;Unix that has GTK&#8221;, as far as theming is concerned. Unfortunately that ends up being a wide spectrum of cases:<\/p>\n<ul>\n<li>Configurable font-sizes. And unsurprisingly, even when we use font-size based sizing to avoid issues, that still causes bugs (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=963365#c11\">because CSS rounds things. ouch.<\/a>)<\/li>\n<li>Different GTK themes cause <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=947356\">lots<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=901469\">of<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=992980\">bugs<\/a>.<\/li>\n<li>The same GTK theme being different in different distros or shells (Gnome 3 vs. Unity) makes bugs <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=989466#c16\">difficult to reproduce\/track down<\/a>.<\/li>\n<li>Different versions of GTK and\/or GTK with\/without compositor <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=994562\">cause<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=980220\">issues<\/a>.<\/li>\n<\/ul>\n<h2>Windows<\/h2>\n<p>Windows really means &#8220;Windows XP, Windows Vista, Windows 7, Windows 8(.1) and all the corresponding Windows Server versions&#8221;. Which then means:<\/p>\n<ul>\n<li>A large number of OS themes to worry about:\n<ul>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=979747\">Windows<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=978752\">classic<\/a> (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=986529\">on XP<\/a>, <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=986920\">Vista<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=989761\">and 7<\/a>)<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=978483\">Windows XP &#8220;modern&#8221; <\/a><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=978758\">(Luna Blue, Olive and Silver)<\/a><\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=940479\">Vista\/7 &#8220;Basic&#8221; a.k.a. Aero-lite<\/a><\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=889610\">Vista\/7 Aero<\/a><\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=986324\">Pre-Windows-8 high contrast themes<\/a><\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=859751\">Windows 8 default theme<\/a> <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=940393\">(with arbitrary colors)<\/a><\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=946595\">Windows 8 high contrast themes<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Configurable <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=978050\">colors<\/a>, fonts and <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=857088\">font-sizes<\/a> for Windows classic themes (and I <em>think<\/em> pre-Windows-8 high contrast themes, too?)<\/li>\n<li>Different <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=980534\">fonts<\/a> ship as default in different Windows locales (!), and the default fonts change between Windows versions. The font is user-configurable under some themes and versions of Windows, but not others (e.g. Windows 8).<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=981569\">Titlebar toggling and some Windows themes<\/a> (but not others, and also, multiple windows and a non-default session restore pref, in the case of this bug)<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=987859\">Toggling some about:config preferences has surprising results.<\/a><\/li>\n<li>HiDPI is increasingly common, and more complicated than on OS X because of the variety of scaling factors available. <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=946987\">We improved the tabs<\/a>, but there is <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=820679\">plenty left to do<\/a>.<\/li>\n<li><a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=851662\">Custom Windows XP themes!<\/a> (which don&#8217;t always seem to expose the right colors, making it practically impossible to work well)<\/li>\n<li>Significant differences between <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=981643\">maximized<\/a> and <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=870849\">restored<\/a> mode.<\/li>\n<\/ul>\n<p>This list doesn&#8217;t include bugs caused or revealed by add-ons, but of course those also add interesting behaviour to the mix.<\/p>\n<p>All in all, it&#8217;s been an interesting first year as an employee at Mozilla (I started April 1st, 2013), and I can&#8217;t wait to see all our changes ship: Firefox 29 is scheduled for release on April 29th.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re getting closer and closer to releasing Australis with Firefox 29, and that gives me more time to write something that&#8217;s been on my mind the last couple of weeks\/months. Extra impetus was provided by sentiment along the lines of &hellip; <a href=\"https:\/\/www.gijsk.com\/blog\/2014\/04\/why-doing-visual-refreshes-of-firefox-is-hard\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-172","post","type-post","status-publish","format-standard","hentry","category-mozilla"],"_links":{"self":[{"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/posts\/172"}],"collection":[{"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/comments?post=172"}],"version-history":[{"count":3,"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/posts\/172\/revisions"}],"predecessor-version":[{"id":175,"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/posts\/172\/revisions\/175"}],"wp:attachment":[{"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/media?parent=172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/categories?post=172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gijsk.com\/blog\/wp-json\/wp\/v2\/tags?post=172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}