Bug 58072

Summary: URLs accessed as a result of pushState/replaceState should count as "visited" and be in the global history
Product: WebKit Reporter: Brady Eidson <beidson>
Component: HistoryAssignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: kbalazs, ossy, sam, zoltan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Example showing bug (links should get visited, and should show up in Safari's history menu)
none
Patch v1 mjs: review+, beidson: commit-queue-

Description Brady Eidson 2011-04-07 13:16:13 PDT
URLs accessed as a result of pushState/replaceState should count as "visited" and be in the global history

See attached example, which works fine in Firefox 4 and Chrome.

Chrome is likely managing it themselves, but this should be something WebKit handles internally.
Comment 1 Brady Eidson 2011-04-07 13:16:50 PDT
Created attachment 88678 [details]
Example showing bug (links should get visited, and should show up in Safari's history menu)
Comment 2 Brady Eidson 2011-04-07 13:19:00 PDT
<rdar://problem/9251515>
Comment 3 Brady Eidson 2011-04-11 17:29:05 PDT
Created attachment 89131 [details]
Patch v1
Comment 4 Maciej Stachowiak 2011-04-11 18:11:54 PDT
Comment on attachment 89131 [details]
Patch v1

r=me
Comment 5 Brady Eidson 2011-04-11 18:28:24 PDT
http://trac.webkit.org/changeset/83547
Comment 6 Csaba Osztrogonác 2011-04-12 01:17:16 PDT
The new fast/loader/stateobjects/state-url-sets-links-visited.html fails on WK2 bot:
http://build.webkit.org/results/SnowLeopard%20Intel%20Release%20%28WebKit2%20Tests%29/r83558%20%2810595%29/fast/loader/stateobjects/state-url-sets-links-visited-pretty-diff.html
Comment 7 Brady Eidson 2011-04-12 08:39:43 PDT
(In reply to comment #6)
> The new fast/loader/stateobjects/state-url-sets-links-visited.html fails on WK2 bot:
> http://build.webkit.org/results/SnowLeopard%20Intel%20Release%20%28WebKit2%20Tests%29/r83558%20%2810595%29/fast/loader/stateobjects/state-url-sets-links-visited-pretty-diff.html

Interesting.  Seems possible/likely that WK2 DRT doesn't do history tracking properly yet.
Comment 8 Brady Eidson 2011-04-12 09:02:58 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > The new fast/loader/stateobjects/state-url-sets-links-visited.html fails on WK2 bot:
> > http://build.webkit.org/results/SnowLeopard%20Intel%20Release%20%28WebKit2%20Tests%29/r83558%20%2810595%29/fast/loader/stateobjects/state-url-sets-links-visited-pretty-diff.html
> 
> Interesting.  Seems possible/likely that WK2 DRT doesn't do history tracking properly yet.

WKTR does implement all of the related APIs, but it's returning the green unvisited link style, if I throw some alerts in.

I tested the patch and test manually in WK2, so I know there's nothing fundamentally wrong here.  I wonder if visited links round trip through the UI process and therefore we're getting hurt by IPC?  I don't know yet, still exploring.
Comment 9 Brady Eidson 2011-04-12 09:23:33 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > The new fast/loader/stateobjects/state-url-sets-links-visited.html fails on WK2 bot:
> > > http://build.webkit.org/results/SnowLeopard%20Intel%20Release%20%28WebKit2%20Tests%29/r83558%20%2810595%29/fast/loader/stateobjects/state-url-sets-links-visited-pretty-diff.html
> > 
> > Interesting.  Seems possible/likely that WK2 DRT doesn't do history tracking properly yet.
> 
> WKTR does implement all of the related APIs, but it's returning the green unvisited link style, if I throw some alerts in.
> 
> I tested the patch and test manually in WK2, so I know there's nothing fundamentally wrong here.  I wonder if visited links round trip through the UI process and therefore we're getting hurt by IPC?  I don't know yet, still exploring.

Found 3 other tests that rely on the same layout test controller APIs that were already skipped.

FIled https://bugs.webkit.org/show_bug.cgi?id=58334 and added this test to the skipped list.