Sites can be updated with wrong title

VERIFIED FIXED in Firefox 14

Status

()

Firefox for Android
General
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: bnicholson, Assigned: bnicholson)

Tracking

unspecified
Firefox 15
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox14 verified, firefox15 verified, blocking-fennec1.0 +)

Details

(Whiteboard: [testday-20120518])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
STR:

1) Go to some page (I use about:home)
2) Open a site that takes a few seconds to load. An easy one is http://people.mozilla.com/~bnicholson/test/loop.html (warning: will hang Firefox for 5 seconds).
3) While it's loading, push the back button.
4) Look at the page in the AwesomeScreen.

Expected result:
Page will either have no title or the correct title.

Actual result:
Page's title changed to the previous page - in this case, "Fennec Start".

I was able to reproduce this on a number of sites (Google search, Zimbra, and the link given above).
(Assignee)

Comment 1

6 years ago
Created attachment 618094 [details] [diff] [review]
patch

Following this sequence of events:
* Load about:home
* Load slow page
* Click back during load

we can apparently get a DOMContentLoaded event for the slow page *after* we receive a document start event for about:home. This patch makes sure we match titles with their correct page URLs in these cases.
Attachment #618094 - Flags: review?(mark.finkle)
Comment on attachment 618094 [details] [diff] [review]
patch

IRL we talked about not changing updateTitle and just testing in the handleTitleChanged and handleContentLoaded.

It doesn't feel right to add pass the url to updateTitle for checking internally.
Attachment #618094 - Flags: review?(mark.finkle) → review-
blocking-fennec1.0: ? → +
(Assignee)

Comment 3

6 years ago
Created attachment 618757 [details] [diff] [review]
patch v2

If we set the URL on location change, we don't have to worry about setting the tab URL too early (which means we don't need to worry about events being out of sync with the tab state).
Attachment #618094 - Attachment is obsolete: true
Attachment #618757 - Flags: review?(mark.finkle)
Attachment #618757 - Flags: review?(mark.finkle) → review+

Comment 5

6 years ago
https://hg.mozilla.org/mozilla-central/rev/5728d1210dbe
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 15
(Assignee)

Comment 6

6 years ago
Comment on attachment 618757 [details] [diff] [review]
patch v2

[Approval Request Comment]
Regression caused by (bug #): bug 746380
User impact if declined: page may be saved in history with wrong title
Testing completed (on m-c, etc.): m-c
Risk to taking this patch (and alternatives if risky): low risk
String changes made by this patch: none
Attachment #618757 - Flags: approval-mozilla-aurora?
Attachment #618757 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
status-firefox14: --- → fixed
status-firefox15: --- → fixed
I verify that this bug is fixed on beta version (v14).
Whiteboard: [testday-20120518]

Comment 9

6 years ago
The issue is not reproducible anymore on:
Nightly Fennec 15.0a1 (2012-05-22)
Aurora Fennec 14.0a2 (2012-05-22)
Device: HTC Desire Z
OS: Android 2.3.3

Using the STR from comment 0. There is no title in the AwesomeScreen.
Status: RESOLVED → VERIFIED
status-firefox14: fixed → verified
status-firefox15: fixed → verified
You need to log in before you can comment on or make changes to this bug.