Closed Bug 408470 Opened 18 years ago Closed 17 years ago

Page Style (e.g. "No Style") does not persist across sessions

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3.1b1

People

(Reporter: hwaara, Assigned: zeniko)

References

(Depends on 2 open bugs, Blocks 1 open bug)

Details

Attachments

(1 file, 3 obsolete files)

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b2pre) Gecko/2007121321 Minefield/3.0b3pre Page style does not persist across sessions. STR: 1. Go to any web page with CSS 2. Change the View > Page Style to "No Style" 3. Restart your browser Actual result: The web page is restored, but with all the CSS, and not with the style you set. Expected result: The web page should be restored with "No Style" on still
OS: Mac OS X → All
Hardware: PC → All
Attached patch fix (obsolete) — Splinter Review
This patch saves the one information bit that's used by the View -> Page Style menu (the title of the currently enabled, named stylesheet(s)).
Attachment #332796 - Flags: review?(mano)
Attached patch alternative fix (obsolete) — Splinter Review
This alternative patch just saves the URLs of all disabled stylesheets and in addition to that the state of authorStyleDisabled (for "No Style"). This does however not necessarily restore the state as it can be set through View -> Page Style, as style sheets can be activated through JavaScript in ways the menu can't. Not sure which solution is better though...
Attachment #332796 - Flags: review?(dietrich)
Attachment #332796 - Flags: review?(dietrich) → review+
Comment on attachment 332796 [details] [diff] [review] fix i prefer option #1, since it's broader, taking into account script actions as you mentioned, as well as pages that have changed since between restores. it provides a higher likelihood that the restored page will match the user's expectations.
Attachment #332796 - Flags: review?(mano)
Attached patch unbitrotted and with tests (obsolete) — Splinter Review
This is pretty much the same patch as you've already reviewed with two differences: * we now ignore style sheets with a non-screen media type (e.g. for print) * there's a bunch of tests included
Assignee: nobody → zeniko
Attachment #332796 - Attachment is obsolete: true
Attachment #332799 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #337111 - Flags: review?(dietrich)
Blocks: 426045
Comment on attachment 337111 [details] [diff] [review] unbitrotted and with tests >+ >+ /** >+ * determine the title of the currently enabled style sheet (if any) >+ * and recurse through the frameset if necessary >+ * @param aContent is a frame reference >+ */ >+ _getSelectedPageStyle: function sss_getSelectedPageStyle(aContent) { add @return doc please r=me
Attachment #337111 - Flags: review?(dietrich) → review+
Attachment #337111 - Attachment is obsolete: true
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.1b1
Flags: in-testsuite+
Depends on: 905953
Depends on: 907566
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: