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.
Comments
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 following blog post about Page/TableServices and LineServices is interesting:
http://blogs.msdn.com/murrays/archive/2006/11/15/lineservices.aspx
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'
http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx
eg:
//depot/longhorn_ie8/Inetcore/mshtml/src/PTLS/5.0/ls/src/LSCONTXT.CPP
//depot/longhorn_ie8/Inetcore/mshtml/src/PTLS/5.0/ls/src/LSCRLINE.CPP
//depot/longhorn_ie8/Inetcore/mshtml/src/PTLS/5.0/ls/src/LSCRSUBL.CPP
I wish they just dropped that mode.
RichB: LineServices was used for a while, yes, but Page/Table Services has only just been integrated.
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.