Closed Bug 92589 Opened 23 years ago Closed 23 years ago

View Use Stylesheet doesn't work on frames

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

References

Details

(Keywords: polish)

Attachments

(1 file, 2 obsolete files)

Attached patch Proposed Patch (obsolete) (deleted) — Splinter Review
Keywords: patch, polish, review, ui
OS: Windows 95 → All
Hardware: PC → All
neil, can you explain a little more about the specifics of this problem and the solution you've attached? Thanks. pchen, can you take a look at this and if it's sound please add your r= and help us find an sr? Thanks. blake, if this looks good and pchen can r= can you sr= or help us find an sr=? Thank.
The problem is that the stylesheet menu only gets/sets the alternate stylesheets for the top window. This is next to useless when it is a frameset document. My code attempts to do two things: 1. Enumerate all frames and subframes for alternate stylesheets 2. Enable and disable alternate stylesheets in those frames that define them This means that if two frames define the same stylesheet names then they will be enabled/disabled together, but if they define independent stylesheets names then they will have separate control.
cc-ing hyatt. Dave, what do you think about this?
->jaggernaut
Assignee: pchen → jaggernaut
Comment on attachment 43786 [details] [diff] [review] Proposed Patch >Index: navigator.js >=================================================================== >RCS file: /cvsroot/mozilla/xpfe/browser/resources/content/navigator.js,v >retrieving revision 1.355 >diff -u -r1.355 navigator.js >--- navigator.js 2001/07/24 06:58:13 1.355 >+++ navigator.js 2001/07/27 16:55:22 >@@ -1225,10 +1246,21 @@ > itemNoOptStyles.setAttribute("checked", noOptionalStyles); > } > >-function stylesheetSwitch(forDocument, title) >-{ >- var docStyleSheets = forDocument.styleSheets; >+function stylesheetInFrame(frame, title) { >+ var docStyleSheets = frame.document.styleSheets; > >+ for (i = 0; i < docStyleSheets.length; ++i) { This should probably be |for (var i = 0; ...| r=jag if you fix that.
Attachment #43786 - Flags: review+
Attached patch Cleaned Up Patch (obsolete) (deleted) — Splinter Review
Included fastnav.js in patch. Removed unused attributes. Fixed JS warnings.
Attachment #43786 - Attachment is obsolete: true
Comment on attachment 60478 [details] [diff] [review] Cleaned Up Patch >Index: navigator.js >=================================================================== >RCS file: /cvsroot/mozilla/xpfe/browser/resources/content/navigator.js,v >retrieving revision 1.409 >diff -u -r1.409 navigator.js >--- navigator.js 2001/12/04 22:38:29 1.409 >+++ navigator.js 2001/12/05 12:15:03 >+function getAllStyleSheets(frameset) >+{ >+ var styleSheetsArray = getStyleSheetArray(frameset); >+ dump(styleSheetsArray.length + ' stylesheets'); I'm sure you meant to take that out :-) Nice optimizations by moving the oncommand up and cloning the None item. r=jag if you remove that dump.
Attachment #60478 - Flags: review+
Comment on attachment 60478 [details] [diff] [review] Cleaned Up Patch >Index: navigator.js >=================================================================== >RCS file: /cvsroot/mozilla/xpfe/browser/resources/content/navigator.js,v >retrieving revision 1.409 >diff -u -r1.409 navigator.js >--- navigator.js 2001/12/04 22:38:29 1.409 >+++ navigator.js 2001/12/05 12:15:03 >+function getAllStyleSheets(frameset) >+{ >+ var styleSheetsArray = getStyleSheetArray(frameset); >+ dump(styleSheetsArray.length + ' stylesheets'); I'm sure you meant to take that out :-) Nice optimizations by moving the oncommand up and cloning the None item. r=jag if you remove that dump.
Attached patch Removed dump (deleted) — Splinter Review
Two out of three isn't bad :-)
Attachment #60478 - Attachment is obsolete: true
CCing alecf for sr=.
Comment on attachment 60481 [details] [diff] [review] Removed dump r=jag
Attachment #60481 - Flags: review+
Neil, can you check this in or should I?
-> Neil
Assignee: jaggernaut → neil
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: sairuh → ian
Blocks: altss
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: