Bug 27586 - URL appears in back/forward button menu instead of title for items with custom representation
Summary: URL appears in back/forward button menu instead of title for items with custo...
Alias: None
Product: WebKit
Classification: Unclassified
Component: History (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Darin Adler
Keywords: InRadar
Depends on:
Reported: 2009-07-22 16:44 PDT by Darin Adler
Modified: 2009-07-23 17:11 PDT (History)
0 users

See Also:

patch (3.91 KB, patch)
2009-07-22 16:49 PDT, Darin Adler
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2009-07-22 16:44:35 PDT
To reproduce:

1. visit bookmarks
2. visit some other page
3. press and hold on the Back button in the location field

The menu contains "bookmarks:". It should contain "Bookmarks".

The history code expects that the DocumentLoader will store a copy of the title. This is subtly incompatible with having a title method on the representation -- we can ask what the title is, but we won't know when the title changes so we won't be able to update the title in the DocumentLoader.

Here are some ways to fix this:

    1) change the history item code to call via the client to get the title, so it can pass through the representation object in Mac WebKit

    2) have the WebDataSource call setTitle on the DocumentLoader, passing the current title from the representation, exactly once, after the representation gets its setDataSource: call

    3) same as (2), but after every method call from WebDataSource to the representation

    4) change the representation API so there's a setTitle: method on WebDataSource instead of a title method on the representation

I am planning to do (2) largely because we want to phase out this representation feature anyway.
Comment 1 Darin Adler 2009-07-22 16:44:45 PDT
Comment 2 Darin Adler 2009-07-22 16:49:02 PDT
Created attachment 33307 [details]
Comment 3 Brady Eidson 2009-07-22 18:14:12 PDT
Comment on attachment 33307 [details]