Bug 15293 - eBay item "SuperSize" popup image viewer does not display images
Summary: eBay item "SuperSize" popup image viewer does not display images
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Evangelism (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://cgi.ebay.com/Titan-Missile-Bas...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-09-26 23:00 PDT by Cameo Wood
Modified: 2020-10-23 13:35 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cameo Wood 2007-09-26 23:00:14 PDT
On an eBay item page, there is an option to view item photos in a "supersized" format that opens a new popup window and displays the enlarged images there.  This seems to be a cross-platform bug that doesn't display this image.  This site works in FF and IE.

Go to the above ebay item.
Click on the "Supersize" link under the thumbnail image on the left side of the page.
A new window pops up but no image is displayed.
Comment 1 Mark Rowe (bdash) 2007-09-27 03:41:14 PDT
I see the following JS exception when following the instructions:

Undefined value
http://include.ebaystatic.com/js/v/us/features/viewitem/viPopupBody.js:503

That line of code looks like the following:
if(client.safari){var ifhack=(typeof(ebay)!="undefined")?ebay.oDocument.createElement("iframe"):document.createElement("iframe");ifhack.style.width='1px';ifhack.style.height='1px';ifhack.style.visibility='hidden';document.body.appendChild(ifhack);with(ifhack.document){open();write('<body>&nbsp;</body>');close();}


To pretty it up a bit:
if (client.safari) {
    var ifhack = (typeof(ebay) != "undefined") ? ebay.oDocument.createElement("iframe") : document.createElement("iframe");
    ifhack.style.width = '1px';
    ifhack.style.height = '1px';
    ifhack.style.visibility = 'hidden';
    document.body.appendChild(ifhack);
    with(ifhack.document) {
        open();
        write('<body>&nbsp;</body>');
        close();
    }
    this.iframeHack = ifhack;
}


It is the clause
    with (ifhack.document) {

that is triggering the issue.  I found this by judicious experimentation with javascript entry in the address bar.
Comment 2 David Kilzer (:ddkilzer) 2007-09-27 10:31:31 PDT
(In reply to comment #1)
> It is the clause
>     with (ifhack.document) {

iframe.document was changed to iframe.contentDocument in r21651, ironically to fix eBay layout!  (See also Bug 14054.)

http://trac.webkit.org/projects/webkit/changeset/21651

eBay should be feature-testing for iframe.contentDocument instead of using user agent detection.

I'm guessing this should be an evangelism bug.

Comment 3 Cameo Wood 2007-12-05 11:13:47 PST
This bug still is a problem- anything I can do to help?
Comment 4 David Kilzer (:ddkilzer) 2007-12-06 07:10:30 PST
(In reply to comment #2)
> eBay should be feature-testing for iframe.contentDocument instead of using user
> agent detection.
> 
> I'm guessing this should be an evangelism bug.

Clearly an evangelism bug.

For more information about using "object detection" (not "feature detection") to detect iframe.contentDocument, see:

http://developer.apple.com/internet/webcontent/objectdetection.html

Comment 5 Maciej Stachowiak 2008-01-08 17:57:18 PST
I think eBay should be able to remove this Safari-specific code path entirely, at least for Safari 3.