A few LayoutTests have bugs that assume WebKit's buggy implementation of javascript URLs (see Bug 16855). I audited all the LayoutTests and found bugs in: fast/replaced/image-map.html fast/events/event-listener-html-non-html-confusion.html svg/custom/prevent-default.svg I'll attach a patch for the tests shortly.
Created attachment 18410 [details] Fixes wrong tests These tests to not intend to replace the document when navigating to their javascript URLs. This patch wraps the calls in void, which always returns undefined. This also keeps the old version of image-map.html to retain a regression test for Bug 16782, but maybe it should be turned into a reduced test case for that bug.
Sorry for what may be a stupid question, but would something like "javascript:document.getElementById('rect').style.fill='red'" also replace the current document when entered in address bar? I'm not seeing such behavior in other browsers.
Try typing <javascript:document.getElementById('rect').style.fill='red'> into <http://crypto.stanford.edu/~abarth/research/webkit/16856/ap.html> in Firefox and IE. What's going on is the "=" operator returns the value 'red', which then becomes the current document. This is currently broken in Safari.
Indeed. I was so sure that I never saw this, that I couldn't be bothered to double-check :).
Comment on attachment 18410 [details] Fixes wrong tests +<map name="map"><area shape="poly" coords="0,0,0,100,100,100,100,0" href="void(javascript:document.getElementById('result').innerHTML='area clicked')"></map> You put "void" in the wrong place here. Did you try it? Did it work? Also need ChangeLog so we can land this.
Comment on attachment 18410 [details] Fixes wrong tests Patch also needs to include expected results for the new image-map-bug16782.html test.
Created attachment 21545 [details] Improved patch Here is a patch that should work. Sorry about the confusion earlier. Now that I have a Mac, I can actually run the tests properly.
Comment on attachment 21545 [details] Improved patch r=me
Fixed in r34463.