Sunday, 22 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.



7 comments:

  1. 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.

    ReplyDelete
  2. 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 :).

    ReplyDelete
  3. > 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:
    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

    ReplyDelete
  4. 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.

    ReplyDelete
  5. 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.

    ReplyDelete
  6. Robert O'Callahan23 February 2009 22:40

    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.

    ReplyDelete
  7. 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.

    ReplyDelete