- Began working towards this quarter’s main-thread IO reduction goal by creating an asynchronous version of nsIContentPrefService::getPref. We currently use getPref every onLocationChange to check if there’s a page zoom setting saved for the site being loaded. This check happens on every page load and tab switch and sometimes multiple times for each (f.e. loading a link in new, focused tab fires onLocationChange when switching to the new tab, loading about:blank in that tab and then loading the final URL – arguably we can be a bit more intelligent about filtering these) and if it’s slow to return, the UI will be blocked while we wait for it. The downside to doing this is that in the cases where we’d previously be stuck waiting, unzoomed content will continue loading and then be set to the desired zoom level once we’ve gotten a result – sometimes leading to a distracting jump in size if the content’s already visible, but I think that’s definitely a hit worth taking. The API changes are covered in bug 539907, frontend in bug 541779.
- While working on the above, I ran across a few tests that check that entering and exiting print preview doesn’t interfere with the zoom level. Print preview works in a way that makes it rather difficult and fragile to do what I want, so I’ve decided to take advantage of our new ability to clone documents and make print preview open in a separate window. I’ll be posting a followup later this week with some builds to try out. Stay tuned!