When the user requests a page this starts a request in the webview, then
once this has completed a loadEvent is fired [0]. This load event adds a
history entry with url and current title (the url) [1] and stores the
url in an internal cache [2]. The normally when a page has finished
rendering the title changes [3], which updates the history entry with
the new title and blocks any future updates.

However if you start a request to another page while loading a slow page
and the title has not changed. Then the onTitleChanged [3] code is
triggered before the loadEvent [0] as the title is updated to the new
request url. But because of the cached url [2] it updates the wrong
history entry.

I've found a reproducible way of doing this on my machine. Navigate to
[4]. Click on one of the entries, such as Firewatch [5]. Now as the page
is loading quickly navigate to google.com. If you were fast enough, when
you type "Firewatch" into the address bar you get a title of
"google.com" and a url of "store.playstation.com/..."


So to resolve this issue when a new page is requested, the cache needs to be 
unset or the code in onTitleChanged needs to be blocked.

0 - 
http://bazaar.launchpad.net/~phablet-team/webbrowser-app/trunk/view/head:/src/app/webbrowser/Browser.qml#L1237
1 - 
http://bazaar.launchpad.net/~phablet-team/webbrowser-app/trunk/view/head:/src/app/webbrowser/Browser.qml#L1252
2 - 
http://bazaar.launchpad.net/~phablet-team/webbrowser-app/trunk/view/head:/src/app/webbrowser/Browser.qml#L1231
3 - 
http://bazaar.launchpad.net/~phablet-team/webbrowser-app/trunk/view/head:/src/app/webbrowser/Browser.qml#L1255
4 - 
http://www.thesixthaxis.com/2016/10/05/the-october-savings-sale-for-the-ps-store-is-now-live/
5 - 
https://store.playstation.com/#!/cid=EP0144-CUSA04118_00-FIREWATCH0000000?smcid=psblog:en:October
 savings start today on PlayStation Store, inc. Uncharted 4, Just Cause 3, 
moreFirewatch

** Changed in: webbrowser-app (Ubuntu)
       Status: Confirmed => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to webbrowser-app in Ubuntu.
https://bugs.launchpad.net/bugs/1603835

Title:
  Sometimes url and description of the url do not match in the address
  bar

Status in webbrowser-app package in Ubuntu:
  In Progress

Bug description:
  In the webbrowser, when entering an address url of a website in the address 
bar, a list of similar webpages is provided below by auto-completion. The list 
is composed of url with a description of the address.
  But sometimes (and quite randomly it seems) the url address and the 
description do not match at all.

  Guess: It seems to happen with websites that I had removed from the history.
  Actually, a website that has been suppressed from the history should not 
appear in the url list no?

  Mx4 Ota 11 stable

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/webbrowser-app/+bug/1603835/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to