Bug 44637 - REGRESSION(r64712): Safari fails to show most of the contents of http://www.milliyet.com.tr
Summary: REGRESSION(r64712): Safari fails to show most of the contents of http://www.m...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL: http://www.milliyet.com.tr/2010/08/25...
Keywords: HasReduction, InRadar, Regression
Depends on:
Blocks: 41115
  Show dependency treegraph
 
Reported: 2010-08-25 14:46 PDT by Mark Rowe (bdash)
Modified: 2011-02-16 01:08 PST (History)
5 users (show)

See Also:


Attachments
Reduction (134 bytes, text/html)
2011-01-27 20:07 PST, Andy Estes
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Rowe (bdash) 2010-08-25 14:46:34 PDT
After <http://trac.webkit.org/changeset/64712>, which enabled the HTML5 tree builder, pages on milliyet.com.tr are displayed as mostly blank.  See <http://www.milliyet.com.tr/2010/08/25/index.html> for an example of one such page.
Comment 1 Mark Rowe (bdash) 2010-08-25 14:47:23 PDT
<rdar://problem/8354793>
Comment 2 Adam Barth 2010-08-25 14:53:30 PDT
Will investigate.
Comment 3 Adam Barth 2010-08-27 12:02:43 PDT
The site is doing a bad User Agent detect.  A few places in the page says:

 if(navigator.userAgent.indexOf("Firefox")==-1 && navigator.userAgent.indexOf("Chrome")==-1) 

If you change that to

 if(navigator.userAgent.indexOf("Firefox")==-1 && navigator.userAgent.indexOf("Safari")==-1) 

everything works great.  :(
Comment 4 Andy Estes 2011-01-27 20:07:56 PST
Created attachment 80407 [details]
Reduction

Here is a reduction.

The site injects an unclosed object element towards the beginning of the page which causes the remainder of the document to be considered fallback content for the object. The legacy parser behavior was to close the object tag implicitly when its parent div was closed, but the HTML5 parser does not behave this way. Minefield shows the same behavior we do (if you trick it into following Safari's code path). In general, Firefox/Minefield don't suffer from this problem because the site injects an embed tag (which of course can't have fallback content).
Comment 5 Andy Estes 2011-01-27 20:15:02 PST
and Chrome gets the embed tag too, of course :)

No love for Safari, unfortunately.
Comment 6 Andy Estes 2011-01-27 20:21:29 PST
milliyet.com.tr is actually quite popular in Turkey (ranked 7th by Alexa) and surprisingly popular globally (ranked #510). We should consider adding a evangelizing the site developer as well as perhaps adding a site-specific hack.
Comment 7 Adam Barth 2011-02-16 01:08:28 PST
The site appears to work fine now.