WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
12740
www.bmw.com page doesn't work
https://bugs.webkit.org/show_bug.cgi?id=12740
Summary
www.bmw.com page doesn't work
jhorneratl
Reported
2007-02-12 00:49:00 PST
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.
Attachments
test case
(161 bytes, text/html)
2007-05-12 02:39 PDT
,
Alexey Proskuryakov
no flags
Details
Easy, the html5 spec covers this.
(829 bytes, patch)
2007-05-12 03:36 PDT
,
Dave Hyatt
mjs
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2007-02-12 01:42:47 PST
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 don't see any JavaScript errors in the JS Console, nor do I see any console output when visiting the page.
John Klimeck
Comment 2
2007-05-11 14:21:07 PDT
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
jklimeck@mac.com
David Kilzer (:ddkilzer)
Comment 3
2007-05-11 15:38:41 PDT
Adding NeedsRadar keyword since this is a fairly high-profile web site (and brand).
Alexey Proskuryakov
Comment 4
2007-05-12 02:39:52 PDT
Created
attachment 14511
[details]
test case
Alexey Proskuryakov
Comment 5
2007-05-12 02:41:48 PDT
This is a parsing problem; Firefox DOM tree matches html5lib one. <div style="display:none"> <table> <div> <table> </table> </div> </div>
Dave Hyatt
Comment 6
2007-05-12 02:58:37 PDT
Hmmm, WebKit basically does what I implemented here, which seems more sensible to me than the behavior I'm seeing in Firefox.
Dave Hyatt
Comment 7
2007-05-12 03:03:03 PDT
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.).
Dave Hyatt
Comment 8
2007-05-12 03:05:58 PDT
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.
Dave Hyatt
Comment 9
2007-05-12 03:07:27 PDT
This example shows that my analysis of what Firefox is doing is correct. <body> <p>Should say "SUCCESS" below:</p> <div style="border:2px solid red"> <table> <div style="border:2px solid green"> <table border=2><tr><td>Table </table> </div> <p>SUCCESS</p> </body> I don't even have the second close </div> in that example, proving that the first </div> closed up the outermost one.
Dave Hyatt
Comment 10
2007-05-12 03:18:03 PDT
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.
Dave Hyatt
Comment 11
2007-05-12 03:36:26 PDT
Created
attachment 14513
[details]
Easy, the html5 spec covers this. Will land the test case.
Maciej Stachowiak
Comment 12
2007-05-12 03:37:53 PDT
Comment on
attachment 14513
[details]
Easy, the html5 spec covers this. r=me
Dave Hyatt
Comment 13
2007-05-12 03:48:28 PDT
<
rdar://problem/5199034
>
Dave Hyatt
Comment 14
2007-05-12 14:38:48 PDT
Fixed in
r21428
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug