Open Bug 907566 Opened 11 years ago Updated 2 years ago

Session Restore disables all stylesheets if the saved pageStyle doesn't match any stylesheets

Categories

(Firefox :: Session Restore, defect)

defect

Tracking

()

People

(Reporter: MattN, Unassigned)

References

(Depends on 1 open bug)

Details

untested STR:
1) Load a page with <link rel=stylesheet href="foo.css" title="Foo"/>
2) Close the browser
3) Change that page to have <link rel=stylesheet href="bar.css" title="Bar"/> instead
4) Restore the session in the browser

Expected result:
The new bar.css stylesheet is used

Actual result:
No stylesheet is used. I think all page styles are disabled.

I encountered this bug when BMO changed the default stylesheet from Dusk to Mozilla. The actual STR may have to do with having alternate stylesheets as we choose the wrong one in this case.

We loop through all stylesheets and disable them if they don't match the saved title at
http://hg.mozilla.org/mozilla-central/annotate/d136c8999d96/browser/components/sessionstore/src/SessionStore.jsm#l3457

I think we shouldn't disable stylesheets if the stylesheet with the desired title doesn't exist. i.e. we would give the default behaviour as if there is only one page style.
It seems like fixing bug 654046 will help with this.
Depends on: 654046
Steven, would you be interested in looking at this and/or bug 654046? Seems like this has been around for a while now and it would be great to get the behavior right. I honestly have no clue about the pageStyle code and have never had to touch it so far.
Assignee: nobody → smacleod
Status: NEW → ASSIGNED
Would this/bug 654046 solve Bug 905953 too (the other filed Regression against Bug 408470)?
Assignee: smacleod → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.