IE8 haslayout = true

After numerous promises that layout was never going to be included in IE8, it’s now become clear that the feature which, should have never been exposed [even in earlier IE versions] is alive in the latest version of Internet Explorer, albeit in a far less detrimental form than earlier IE* releases.

Believing what Microsoft had promised about layout not being in IE8, I didn’t feel it necessary to carry out a simple test which checks whether an element has layout, back when Beta 1 was first released. The test happened to have been included in a recent thread on WebmasterWorld, in which a contributor suggested that layout was indeed part of IE8. Upon running this test, I was absolutely astonished by the result I was seeing; the test proves that layout is definitely included in IE8 Standards Mode.  Upon checking the scope of the known layout triggers to test the completeness of IE8’s layout implementation, I observed that all (including IE7-specific) known trigger properties invoke layout.

Now that I’d identfied layout was indeed a feature of IE8, I needed to try and ascertain the scope of layout with regards to its effect on document styling.

After discovering this unwelcome addition, the first port of call was to go back over all the bugs I’ve documented to see if by triggering layout, a workaround could be established for each of the bugs, although it subsequently turned out this wasn’t to be the case. With this in mind, I’ve concluded that layout in IE8 is either:-

  1. an implementation whose effects on layout style have been purposefully suppressed. This could have resulted from IE7’s codebase being forked to provide a base for development of IE8
  2. an accidental implementation whose suppressed effect on document styling can be attributed to inadvertant links with IE8’s seperate browser/document modes

More confirmation

I then came across a thread at SitePoint relating to an issue where a rounded-corner JS library (Nifty Corners Cube) was wrongly invoking the shrink-to-fit computation for block-level elements in normal flow. One contributor pointed out a confirmed fix which is reminiscent of triggering layout; height:1%. This particular issue, which is discussed in more detail, was essentially down to Javascript triggering layout in elements whose layout value was initially set to false. Adding a triggering property before the Javascript was fired, fixed the issue since these properties are recognised in IE8 as being layout triggers.

In conclusion, I haven’t yet some across any direct issues, such as CSS-only layout anomalies, that have resulted from layout in IE8, and I’d be very surprised if any such issues arose because of it. The real issue here however, is that some existing web pages are now broken as an indirect consequence of Microsoft backtracking on what it had previously promised. A perfectly plausible rationale behind the train of thought from the creator of Nifty Cube Corners, could be that since Microsoft had promised not to include layout in IE8, he saw no need to change the display:inline-block layout trigger, as this property doesn’t exhibit the change in width computation in IE6 & 7 (as the change to the shrink-to-fit computation is ignored for elements that aren’t naturally inline-level). However, since IE8 includes a full implementation of display:inline-block and implements layout, the unwanted behavior (in this context) is exhibited. Another example of Microsoft going back on their word, and another example of the negative effect that their fabrications are having on authors…

Aside: the IE8 fix for Nifty Corners Cube

I’ve seen a fair few posts now where IE8 appears to adopt the shrink-to-fit computation for block-level elements in normal flow, which the Javascript from Nifty Corners Cube is applied to. A snippet from the distributed ‘niftycube.js’ file:-

function FixIE(el){
if(el.currentStyle!=null && el.currentStyle.hasLayout!=null && el.currentStyle.hasLayout==false)
    el.style.display="inline-block";
}

display:inline-block (which uses the shrink-to-fit computation) is being used in the context of a layout trigger if hasLayout is detected as being false. Since we’ve already established that IE8 includes an implementation of layout, this trigger will be applied unless layout is set to true before this script is activated.

A more suitable trigger would be a property that doesn’t affect the initial width computation of an element. To fix this issue, instead use a more suitable trigger such as overflow:hidden

Downtime, shmowntime.

Apologies if you were greeted with a 403 upon arriving at this here blog this afternoon. A non-sarcastic thanks to YCombinator News for the huge traffic spike, which subsequently resulted in my blog being knocked out for the last 7 or so hours. I recommend Super Cache:)

Update

From June up until a few weeks ago, I took an immediate break for web-related work. The aim of this post is to provide a brief update of my goings on between June and present.

IE8 Bugs

I’m discovering (and people are writing in about) bugs in IE8 on a fairly regular basis at the moment, although that regularity has obviously decreased significantly since the RTW version was released. Astonishingly, there’s still a significant (around 40-50%) percentage of bugs that are regressions from IE7, which I guess goes to demonstrate the insufficient regression testing program used in IE8.  More so, the nature of some of the reported bugs [1][2][3][4][5] go to demonstrate how quirky and broken IE8 actually is; these aren’t straightforward spec violations – these are some very serious quirks akin to the severity of bugs found in a beta release.

Why Microsoft still haven’t removed statements claiming full CSS 2.1 support from their PR material, is beyond me. It’s astonishing to think that Microsoft thought that they could get away with publishing these blantant lies; even if IE8 didn’t have any CSS bugs/spec violations (which is essentially near impossible in itself), we still don’t have an which is one of the criterion required to demonstrate interoperability.

CSS 2.1 testsuite

I recently became a to the CSS 2.1 testsuite, and have been busy submitting many of the test cases used to demonstrate bugs in IE8. It’s of the upmost importance that every conceivable area of the specification is covered, so that we end up with a concise test suite – feel free to , if you’d be willing.

New domain

Since idreamincode.co.uk was only ever meant to be temporary, I decided to purchase the domain name, jhop.me. I’ve always been a fan of acquiring an ‘exotic’ country-code TLD, so I decided to go for a .me. I’ve been careful to preserve legacy links, but if you spot a link that is broken, please get in touch.

Compatibility View and Hard Asserts

Where did you appear from, Compatibility View?

Something very strange occured when I started viewing this site in the IE8 Candidate Release; for some reason, when I was moving from page to page, I sometimes managed to invoke Compatibility View. Thinking that this was just an issue with the CR, I didn’t bother investigating it. However this issue has crept up in at least , and less than two weeks ago, hidden in a post entitled, Compatibility View and “Smart Defaults”, we got clarificiation as to exactly what this behaviour is, and when we can expect it to affect us;

For the most part, we’ve removed assertions from our retail code. That said, there are particular code paths within the new layout engine where, should an error occur, the layout process can’t gracefully recover and we’ve kept assertions around these paths. In the IE8 Beta builds, encountering one of these layout “hard asserts” caused IE to display a blank page – the thought process being that it was better to show the user nothing at all than allow interaction with a corrupt or otherwise obviously incorrectly displayed page. We refined this experience further in the released version of IE8 by recovering layout “hard asserts” using Compatibility View. In other words, we believe that showing a page the way IE7 would have offers a better user experience than showing no content at all.

Compatibility View and “Smart Defaults” article on IEBlog

In short, when IE8 detects an error which, as we’ve seen, can be invoked by , the browser will fall-back to rendering that document (and entire domain) in Compatibility View. Note however, that this process only applies when you don’t force Standards Mode using either the META declaration or HTTP Header. If however, you do force Standards Mode in this instance, IE8 will display a blank page.

Firstly, it’s quite astonishing to think that it’s possible to invoke complete page blankness simply by using a combination of CSS properties. What’s more, the latter option of forcing Standards Mode is now being used as a pre-emptive measure by authors who, one way or another, have misunderstood the information published by Microsoft and are afraid of their sites being rendered by users in Compatibility View. Ultimately, the combination of forcing Standards Mode and utilising certain CSS property combinations is likely to have some disastrous effects. Secondly, by not forcing Standards Mode, an author is inadvertently introducing the possibility of their entire domain being rendered in Compatibility View, for the remainder of that browser session. This is simply another of the many irrational decisions made by Microsoft throughout the development of IE8.

Aside

Bug Testing

First off, let me expell some myths – a) IE8 is not fully CSS 2.1 compliant, b) passing Acid 2 does not mean a browser is fully CSS 2.1 compliant and, c) creating and passing 7000 or so of your own tests also does not mean you’re fully CSS 2.1 compliant.

If you’ve been keeping track of my , you’ll see there’s been a steady stream of additions to the list – it currently stands at 51 CSS bugs. This is, to some part, thanks to folks who wrote in about issues they’ve come across, which has meant many more bugs have been identified and logged on Connect. If you’re someone who has taken the time to write in and I haven’t been in contact yet, please bear with me; I’ve had a lot on my plate over the past few months, but I assure you I’ll get round to replying to you, and filing the issue if neccessary.

Link exchanging with a positive side-effect

Upon visiting the W3C Supporters Program page it became fairly obvious that some companies (whose choice of keywords in link text are reminiscent of a spammed bulletin board) are wiling to pay upwards of $2500 to get a (good) bit of link juice from this PR 8 page.

I am however, surprised that Ian Jacobs or whoever owns the page would, first of all, allow so blatantly obvious generic keywords and, use a such a mix of capitalization and lowercase link text. Just an observation.

Better Already

Tagged in: , ,

Nice to see a finally.

Lets hope this isn’t true

http://www.neowin.net/news/main/09/02/23/internet-explorer-8-has-reached-rtm

There’s been absolutely no public or internal (within Connect) message from MS regarding the release date, so I for one am going to be extremeley annoyed with them if this is the case, since myself and others are continuing to file bug reports. Lets hope our work and time hasn’t been wasted.

IE8 Release Candidate 1 public build launched

Tagged in: ,

After several months without a public build, we’ve finally got to the RC1.

They’ve fixed around 8 of the 16 of the bugs (that I logged) that were present in the pre-RC1. A list of the bugs that were fixed between the pre-RC1 and this latest build are below:-

# Name Description
1 Dynamic changes to counter-increment?? Test Case
2 Children’s counter does not take into account the scope of the parent’s counter, resulting in incorrect incrementation. This issue goes against the self-nesting nature of counters, as defined in 12.5.1 Bug Ticket
3 Vertical scrollbar when using overflow:auto, and certain combinations of EM units for line-height and font-size for descendant elements Bug Ticket
4 Mispositioned borders and outlines on elements when parent element has a negative text-indent Bug Ticket
5 TABLE-displayed element (in normal flow) is rendered below preceeding floated element Bug Ticket
6 Expanded :hover (and clickable, if A element) area (caused by Padding) of inline element not honoured
7 Bullets or counters within a list (OL or UL, with rtl direction) are affected by the highlighting text within their immediate succeeding element Bug Ticket
8 Value of malformed width property is parsed

As you can see they’ve fixed quite a few bugs in this latest build, but the list of bugs in the IE8 Final Build is getting larger and larger by the day; this means its certain that IE8 will not be fully Level 2.1 compliant, as I’ve said before.

sshhhhh… IE has brought back the ‘filter’ property (without the prefix) in IE8

I personally don’t have an issue with Microsofts property prefix being left off the filter property; either way, they don’t validate so I don’t see it as an issue. If anything I would prefer it if they left the prefix off as this would mean we would could retain some level of backwards compatibility.

What’s funny though is that this property currently works without this prefix – check my .

Bugtastic

I’ve been fairly busy over the past couple of days adding bugs/spec violations in IE8 pre-RC1 ‘Partner build’ to my IE8 Bugs page. I’ve found an additional six; four or so, I would deem fairly serious.