Bug 14721

Summary: links randomly don't end properly
Product: WebKit Reporter: Derk-Jan Hartman <hartman.wiki>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: ap, ddkilzer
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
screenshot
none
Test CSS
none
Test JavaScript
none
Test case none

Derk-Jan Hartman
Reported 2007-07-23 04:38:27 PDT
For the problem see the screenshot. This is with Safari 3.0.2 on 10.4.10 I used inspect element, and it seems that the DOM was incorrectly loaded because whereas the page source shows: <td><a href="/wiki/Wikipedia:Today%27s_featured_article/July_22%2C_2007" title="Wikipedia:Today's featured article/July 22, 2007">TFA</a></td> <td><a href="/wiki/Wikipedia:Today%27s_featured_article/July_23%2C_2007" title="Wikipedia:Today's featured article/July 23, 2007">TFA</a></td> <td><a href="/wiki/Wikipedia:Today%27s_featured_article/July_24%2C_2007" title="Wikipedia:Today's featured article/July 24, 2007">TFA</a></td> Inspect element shows: <td><a href="http://en.wikipedia.org/wiki/Wikipedia:Today%27s_featured<link rel="> With textcontent: _article/July_22%2C_2007" title="Wikipedia:Today's featured article/July 22, 2007">TFA A page reload usually fixes it, and I see it very rarely at all. (once every 100 or so pageloads). It seems completely random
Attachments
screenshot (26.92 KB, image/png)
2007-07-23 04:39 PDT, Derk-Jan Hartman
no flags
Test CSS (27 bytes, text/css)
2007-07-29 16:15 PDT, David Kilzer (:ddkilzer)
no flags
Test JavaScript (97 bytes, text/javascript)
2007-07-29 16:18 PDT, David Kilzer (:ddkilzer)
no flags
Test case (608.20 KB, text/html)
2007-07-29 16:20 PDT, David Kilzer (:ddkilzer)
no flags
Derk-Jan Hartman
Comment 1 2007-07-23 04:39:26 PDT
Created attachment 15646 [details] screenshot shot of an occurrence of this problem
Alexey Proskuryakov
Comment 2 2007-07-23 05:41:51 PDT
Can you reproduce this on the original page using "clone slowly" bookmarklet from <http://www.squarefree.com/bookmarklets/testbrowsers.html> (drag and drop it to the bookmarks bar to use)? I have tried cloning your HTML snippet using several parameter values, but the clone was always correct.
Derk-Jan Hartman
Comment 3 2007-07-23 08:19:37 PDT
i have a suspicion that this may be a document.write from a javascript of a <link> ending up in a random place within my page. I'll try to get more details
Derk-Jan Hartman
Comment 4 2007-07-29 14:07:00 PDT
I can confirm that this is caused by a document.write from a .js in the <head> of this page. Apparently Safari 3 introduces a great randomness factor whenever you use document.write from non-inline .js Since this is quite common however (i have seen this in many scripts), some safeguarding might be appropriate...
David Kilzer (:ddkilzer)
Comment 5 2007-07-29 15:55:29 PDT
A (reproducible) reduced test case (or a URL to an example page) would be very helpful!
David Kilzer (:ddkilzer)
Comment 6 2007-07-29 16:15:59 PDT
Created attachment 15732 [details] Test CSS
David Kilzer (:ddkilzer)
Comment 7 2007-07-29 16:18:54 PDT
Created attachment 15733 [details] Test JavaScript
David Kilzer (:ddkilzer)
Comment 8 2007-07-29 16:20:41 PDT
Created attachment 15734 [details] Test case Sample test case which writes a <link> element from an external JavaScript file. NOTE: I have not been able to reproduce the issue using this test case locally.
Note You need to log in before you can comment on or make changes to this bug.