For certain item categories, gap.com stores have a floating div they call "QuickLinks" that has links of similar categories at their other stores. These links are linkified in Safari 3.2.1 but not on TOT webkit, as well as the Safari 4 Public Beta. Steps: 1) http://bananarepublic.gap.com/browse/category.do?cid=12065 2) small quicklinks div should appear near the bottom of the visible region of the webview, on the right side 3) hover over the "new arrivals" text Results: should be a link, but it isn't. <rdar://problem/6622853>
I suspect this is a JS or DOM issue.
Created attachment 28023 [details] Partial reduction Here's a start at a reduction. It uses the minimum amount of HTML and the minimum set of JS files required to reproduce the bug. I'll start removing JS from the files and see how far I can take it.
Created attachment 28028 [details] Further reduction Here's a further reduction. I couldn't directly include the source of all the JS libs in the file, because of problems with unescaped HTML in the middle of the JS. The problematic line is this in the show() method of crossLink: if( gidLib.checkMouseEvent(src, target) ) return; If this line is commented out, then it works fine.
Created attachment 28059 [details] Further reduction Here is a further reduction. It's all in one file, a bit over 1000 lines, but it still loads some data from the network. I'll try to make it static next.
The problem is that the 'contains' DOM function has changed behaviour. I'll assign this bug to myself.
It turns out that this is due to a programming error in one of their JS functions: checkMouseEvent: function(ele, target) { var isContain; if(target.contains) { isContain = !target.contains(ele); } if(target.compareDocumentPosition) { isContain = target.compareDocumentPosition(ele); } return target.contains ? isContain : isContain < 16; }, WebKit has supported IE's 'contains' DOM extension for a long time, but support was added for 'compareDocumentPosition' in r35143. This function assumes that no browser implements both. It is an easy fix, either checkMouseEvent: function(ele, target) { var isContain; if(target.contains) { isContain = !target.contains(ele); } else if(target.compareDocumentPosition) { isContain = target.compareDocumentPosition(ele); } return target.contains ? isContain : isContain < 16; }, or checkMouseEvent: function(ele, target) { var isContain; if(target.contains) { return !target.contains(ele); } else if(target.compareDocumentPosition) { return target.compareDocumentPosition(ele) < 16; } }, should work. This is really an evangelism bug, so I will unassign it from myself.