RESOLVED CONFIGURATION CHANGED24169
REGRESSION: gap.com (and affiliates) "QuickLinks" aren't linkfied
https://bugs.webkit.org/show_bug.cgi?id=24169
Summary REGRESSION: gap.com (and affiliates) "QuickLinks" aren't linkfied
Alice Liu
Reported 2009-02-25 13:29:52 PST
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>
Attachments
Partial reduction (1.15 KB, text/html)
2009-02-26 11:14 PST, Cameron Zwarich (cpst)
no flags
Further reduction (19.33 KB, text/html)
2009-02-26 11:36 PST, Cameron Zwarich (cpst)
no flags
Further reduction (38.63 KB, text/html)
2009-02-26 18:32 PST, Cameron Zwarich (cpst)
no flags
Cameron Zwarich (cpst)
Comment 1 2009-02-26 07:47:19 PST
I suspect this is a JS or DOM issue.
Cameron Zwarich (cpst)
Comment 2 2009-02-26 11:14:23 PST
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.
Cameron Zwarich (cpst)
Comment 3 2009-02-26 11:36:30 PST
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.
Cameron Zwarich (cpst)
Comment 4 2009-02-26 18:32:17 PST
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.
Cameron Zwarich (cpst)
Comment 5 2009-02-26 18:32:30 PST
The problem is that the 'contains' DOM function has changed behaviour. I'll assign this bug to myself.
Cameron Zwarich (cpst)
Comment 6 2009-02-26 18:55:54 PST
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.
Note You need to log in before you can comment on or make changes to this bug.