Open Bug 510809 Opened 15 years ago Updated 2 years ago

Setting XUL document.title won't update the base window the second time

Categories

(Core :: XUL, defect, P5)

defect

Tracking

()

People

(Reporter: neil, Unassigned)

References

Details

(Keywords: regression)

Steps to reproduce the problem:
1. Set document.title to change the title
2. Change the title via the base window (e.g. via contenttitlesetting)
3. Try to set the title back again via document.title

Expected result: title changes back again

Actual result: title does not change

This is a regression from bug 118704 because it caused the XUL document title change notification to be mediated through an attribute change.
Here's some javascript you can evaluate in the Error Console to demonstrate the regression:
var Ci = Components.interfaces; top.document.title = 'Original title'; var ifreq = window.QueryInterface(Ci.nsIInterfaceRequestor); var nav = ifreq.getInterface(Ci.nsIWebNavigation); var owner = nav.QueryInterface(Ci.nsIDocShellTreeItem).treeOwner; owner.QueryInterface(Components.interfaces.nsIBaseWindow).title = 'Changed title'; top.document.title = 'Original title';
Slightly shorter JavaScript:
var Ci = Components.interfaces; top.document.title = 'Original title'; var ifreq = top.QueryInterface(Ci.nsIInterfaceRequestor); var nav = ifreq.getInterface(Ci.nsIWebNavigation); nav.QueryInterface(Ci.nsIBaseWindow).title = 'Changed title'; top.document.title = 'Original title';
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM: Core & HTML → XUL
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.