Eyes Above The Waves

Robert O'Callahan. Christian. Repatriate Kiwi. Hacker.

Saturday 21 February 2009

Checking The Rear-View Mirror

This video from PDC 2008 is interesting; Alex Mogilevsky talks about IE8's new layout engine. It was generous of him to mention that the subpixel units and zoom approach first appeared in Firefox! It's interesting to get a little glimpse under the hood. It sounds like they have something much like our frame display lists. The glimpse we got of their "layout object dump" and "display list dump" output was quite revealing if you know what you're looking for, but I'll leave that as an exercise for the reader :-).

On the flip side, the decision to make the layout code reusable for apps like Word seems dubious, and I fancy I could sense him doubting it too. And Alex seemed remarkably sanguine about supporting an IE8-mode in IE9; "putting an 'if' statement around every bug fix" is far from the whole truth and would itself be a big maintenance burden. I stand by my skepticism of their whole approach here.


If they cut off backwards compatibility at IE8 then they're moving in the right direction. If I need to use an IE6 only webapp then I'll just download IE6.
It sounded to me like he was talking about the new layout engine being extendable enough so that an IE9 could have an IE8 mode the same way the IE7 rendering engine has a quirks mode. Although I concur with your assessment of the situation.
It's a shame it's not computationally efficient to calculate everything in quotient space, guess that's the mathematician in me not really like the imprecise nature of floats and the like :).
> the decision to make the layout code reusable for apps like Word seems dubious
The following blog post about Page/TableServices and LineServices is interesting:
It says:
"LineServices 3.0 was ... shipped with Word 2000, Internet Explorer 5.0"
So I suspect that layout has been shared with other apps for a long time.
Which is interesting as the first blog post about IE8 way back in 2007 mentions layout and includes a snippet of their source code tree including things called 'PTLS' and 'LS'
Another thought - if IE now has a switchable layout engine, there's nothing to stop them switching in a XAML (WPF/Silverlight) layout rather than using a plug-in system.
And you're right with your skepticism. It is an extreme example, but Acid 3 looks completly different in IE8's IE7 mode than it does in the real IE7.
I wish they just dropped that mode.
Robert O'Callahan
miguel: unfortunately you can't just install IE6 since they have this absurd constraint that you can install only one version of IE at a time.
RichB: LineServices was used for a while, yes, but Page/Table Services has only just been integrated.
Hmm, so they're using 100 units per "screen pixel". Interesting.
Firefox uses 60, right? 100 is nice in that you can always make percentages out of it if the starting point is an integer number of pixels. Not so much luck for thirds and sixths though.
It's easy to build tripcases for either choice though, so both browsers are just alleviating the problem. The fact that they choose different numbers will probably haunt us. I hope they changed behavior to always round down for non-exact matches.