Buzz Archive: December 2005

Star HTML and Microsoft IE7

Chris Wilson, Group Program Manager for IE Platform and Security at Microsoft, and Position is Everything's Big John Gallant have been having a conversation about * html in Microsoft's upcoming Internet Explorer 7 for Windows (IE7). Wilson has been encouraging CSS designers and developers to repair any bug-specific hacks for several months now. Gallant remains unconvinced the solution is that easy and is afraid countless, unpaid hours of repair work will wind up on the shoulders of those designers and developers who have employed * html related hacks in their designs.

Universal woe

Hacks for browsers typically do one of two things. They exploit a bug (a flawed implementation) or they exploit the complete lack of an implementation. In the case of * html the hack is based on a bug. Child selector hacks, on the other hand, are based on the fact that IE versions up to 6.0 do not include any implementation for child selectors whatsoever.

The popular Holly Hack and related IE workarounds exploit a browser bug in which the universal selector, *, in CSS is misinterpreted. The bug is present in multiple versions of Internet Explorer. The hack is used primarily to correct a number of layout issues related to IE's proprietary layout model.

With the bug repaired, Wilson says universal selector-related hacks will fail in IE7's strict mode (compliance mode). The bug remains present when IE7 is running in quirks mode, and in that mode, the hacks will understandably work. Wilson began advocating that the Web design and development community prepare for change back in October. Gallant wants to know how the changes will affect you via a poll at p.i.e..

Is the entire kafuffle a non-issue until we actually have IE7 and see what we really get? Or maybe we can learn from Tantek Çelik (Technorati, WaSP) who advocates that bugs including * html be repaired; and that implementations such as child selectors (which are often used in tandem with the Holly Hack), could be held off until a later date if necessary.

Exploiting a software bug to create a hack becomes dangerous as software is updated and bugs are repaired. While somewhat less danger exists when implementation issues are addressed, what happens when the implementation is introduced and it, too, is flawed? This is why hacks are so problematic, but just how these particular hacks in IE7 will affect the community is still vague.

Me, Me, Select Me!

The faulty interpretation of the universal selector is currently present in the following versions of Internet Explorer:

  • Macintosh: 5.0, 5.15, 5.21
  • Windows: 5.0, 5.5, 6.0

The bug is present in both quirks and standards mode in these versions. Here's a look at what happens in these IE versions when the universal selector is involved:

Microsoft IE Browser Misnterpretations: Universal Selector
Selector IE Interpretation W3C Interpretation
* html html Matches no element (the html element is root and therefore never has an ancestor)
* * body * body Matches no element (body is the first child of html only)
* html body html body Matches no element

Have layout?

IE layout, which is IE's determination of how elements are drawn, bound, and behave, has been a bit of a mystery for some time. This is largely due to lack of documentation and discussion about the issue. Dean Edwards (WaSP, WHATWG), Gallant and others went in search of better documentation for hasLayout. Markus Mielke, a Microsoft program manager working with Wilson, joined in the conversations which bore fruit.

Two good references that emerged regarding IE layout are On Having Layout and HasLayout Overview in which Mielke writes:

There are several bugs in Internet Explorer that can be worked around by forcing a layout (an IE internal data structure) on an element (like, dimensional bug fixes and Holly hack). Most users are not aware of the implications of having a layout applied to an element. - HasLayout Overview, Markus Mielke, Microsoft

Mielke's article, which cites the input of Edwards, Gallant, Wilson and WaSP among others, goes directly to the heart of the * html concern.

Road to repair

Gallant says that the * html hack in CSS is “the only hack that is going to cause serious pain” and believes that the hack “could probably be retained without getting in the way of any actual support enhancements” that Microsoft has planned for IE7.

Wilson points out that the goal is to fix IE, and getting there is a process. “I want to remove the * html hack to make it useful . . . because it will then only apply to obsolete browsers.” He also shares a dislike for any hacks at all. “All CSS hacks are too risky in the long run, unless they only apply in orphaned or obsolete browsers, period. Tantek Çelik said this; I agree with it very strongly.”

Gallant states that the “time to kill the * html hack is when Vista arrives, presumably without the layout problem.” Wilson feels that fixing the browser is most important. “The Holly hack, and I say this with the greatest of respect, is an elephant gun solution. Sometimes it's an elephant you're trying to fix. Sometimes it's a mouse. Some elephants are fixed in IE7, some mice are. We will not fix every possible layout issue in IE in IE7, however, and it's unrealistic to expect we can do so.”

This entry cross posted to take your comments and trackbacks.

A Final End to IE/Mac

Microsoft has announced that they will cease all support for IE/Mac as of December 31, 2005 and will cease all distribution of the software on January 31, 2006.

While IE/Mac has become something of a red-headed stepchild in the past couple years, it has a proud history of standards-related achievements, most of which were the result of now-WaSP, then Microsoftie Tantek Çelik.

This milestone doesn't actually mean much for working web developers — how much effort to put into supporting a given browser is best determined by audience share, not whether the browser is currently 'supported' or not. Nevertheless, it's a bittersweet reminder of the creeping obsolescence of what was arguably the single piece of software most responsible for kicking off the CSS layout revolution.

The Bad Old Days Linger On

Most professional web developers understand why browser sniffing sucks, and have long since moved on to more robust techniques like object or property testing to make their sites degrade gracefully in less-capable user agents. But apparently Yahoo! Music didn't get the memo: their site still sniffs browsers, urging Firefox users on Windows to 'upgrade' to Netscape 7.1 or higher (actually a downgrade, since Netscape 7.1 uses an older version of the Gecko rendering engine than does Firefox 1.x) when one tries to watch a video. Visit Yahoo! music on a Mac, and the situation is even grimmer: Yahoo! music requires Netscape Communicator 4.7 for Mac viewing.

Upgraded your browser (or OS — Communicator 4.x only runs on the long-deprecated OS 9) recently? No video for you!

Lame.

Prince 5.1 Passes Acid2

Prince, a program that converts XML documents styled with CSS into PDF files for printing, has passed the Acid2 test. While Prince isn't a browser per se — it's a file converter — it does join Konqueror and Apple's Safari as the first CSS & HTML implementations to pass the WaSP's Acid2 Test (disclosure: Håkon Wium Lie, one of the authors of the Acid2 Test, is on the board of YesLogic Pty Ltd).

Congratulations, guys! Nice work.

Microsoft Tweaks IE's Handling of ActiveX, Java

Microsoft has announced that they'll be changing the way IE handles ActiveX controls and Java applets to avoid liability in the Eolas patent suit.

The suit, you'll recall, is about a patent held by the University of California and licenced to a company called Eolas. The patent ostensibly covers embedding multimedia and interactive widgets within web pages. Eolas and the UC say that Microsoft (and presumably just about every other browser maker on the planet) violates their patent with the way Internet Explorer handles ActiveX controls (such as the Flash plugin) and Java applets. The patent is viewed by many people as too vague, overly broad and in fact not valid due to other people's prior work in this field. In fact, the W3C and Tim Berners Lee filed evidence against the patent with the U.S. patent office.

Nevertheless, the courts seem to be less persuaded of Microsoft's case than does the W3C and Microsoft is now changing IE to avoid continuing liability. As a result, millions of web pages will have to be modified lest visitors be forced to click a button on a dialogue in order to view, say, Flash banner ads. While some may see blocking Flash banners by default as a feature, advertisers — and consequently the folks buidling web pages that carry their ads — disagree quite strongly.

24 Ways to Impress Your Friends

It's an online advent calender, and behind each door* you'll find a web development tip/tutorial (all standards-based goodness, of course) to impress your friends with - 24 of them, to be precise. I'd prefer that to a piece of chocolate any day. 24 ways to impress your friends kicks off with some easy ajax prototyping.

[* OK, so there aren't really doors .. it's just a metaphor. And no, Drew will not be adding reindeers and snowmen to make it all festive.]