You need to
before you can comment on or make changes to this bug.
I tried out the bmw.com website, and when I tried to select my country or region from the list, the list wouldn't open and the page formatting went crazy.
Confirmed with a local debug build of WebKit r19572 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8L127). This is not a regression as shipping Safari looks and acts about the same.
I can also confirm this, 05/11/2007, still exists in Safari 2.0.4 (419.3)
and today's latest WebKit build.
Want to lease a BMW 328i, went to page in Safari.
www.bmw.com main webpage is totally messed up and useless in Safari, works with Firefox
(QA engineer on FCP 4 at Apple, 2001-2003
Please fix, thanks
Adding NeedsRadar keyword since this is a fairly high-profile web site (and brand).
Created an attachment (id=14511) [details]
This is a parsing problem; Firefox DOM tree matches html5lib one.
Hmmm, WebKit basically does what I implemented here, which seems more sensible to me than the behavior I'm seeing in Firefox.
WebKit's model is to detect when you enter stray table content. When this happens you pull that content out and put it before the table. (Firefox does this as well for the div that is inside the table. Where we differ is with what happens next. We assume that until we encounter a <tr> or <td> that we are still inside that stray table content. I guess Mozilla assumes <table> should end the stray table content section.
Because we put the second <table> inside the <div>, when we hit the first close</div>, we close up the stray table content and then we are back inside the outer table. The second </div> is not sufficient to close up (since </div> never wins when inside a <table>), and so the <p> ends up inside the <div> as well.
Firefox closes up the stray content the minute it hits the second table, and so the first </div> encountered actually closed up the *outer* div. The second </div> is then ignored. The <p> is then outside the outer div.
I'll have to go study the HTML5 spec. It may be that <table> is on the list of tags to be considered as "ending" stray table content. I'm not so sure that it should be though, since you should really be looking for things that would logically be elements of *your* table (like <tr> and <td> and <tbody> etc.).
My guess is that html5lib just parses this dumbly as a tree and doesn't do any of the stray table content stuff that real browsers have to do.
This example shows that my analysis of what Firefox is doing is correct.
<p>Should say "SUCCESS" below:</p>
<div style="border:2px solid red">
<div style="border:2px solid green">
I don't even have the second close </div> in that example, proving that the first </div> closed up the outermost one.
In Firefox and html5lib and IE a <table> encountered while in stray table content actually has the effect of closing up the original table!
This is a rule we are simply missing. I'll try implementing it and see what breaks.
Created an attachment (id=14513) [details]
Easy, the html5 spec covers this.
Will land the test case.
(From update of attachment 14513 [details])
Fixed in r21428.