Closed
Bug 134441
Opened 23 years ago
Closed 23 years ago
Scripts & Windows pref panel loses checkmarks the second time viewing it
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: nallen, Assigned: caillon)
References
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
|
3.00 KB,
patch
|
hewitt
:
review+
bugs
:
superreview+
jesup
:
approval+
|
Details | Diff | Splinter Review |
Build 2002032916 Win2k.
Go to Edit -> Prefs -> Advanced -> Scripts & Windows
Under "Allow webpages to" make sure at least one box is checked (I have Change
Images, Create or Change Cookies, and Read Cookies checked).
Click on one of the other categories (such as Cache).
Click on Scripts & Windows.
Under "Allow webpages to" all boxes are unchecked.
If a permission was disabled, leaving it checked or unchecked works correctly.
If a permission was enabled, leaving it checked or unchecked both leave the
permission enabled. Once this problem occurs, you have to close the prefs
dialog and reopen to remove these permissions.
| Reporter | ||
Comment 1•23 years ago
|
||
Marking regression as this works in 0322. Tree conversion fallout?
Keywords: regression
Comment 2•23 years ago
|
||
ack. Can you check if the js console has any errors?
Comment 3•23 years ago
|
||
I'm seeing this on linux trunk build #2002033015. confirming.
os -> all
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Comment 4•23 years ago
|
||
nothing on js console.
| Reporter | ||
Comment 5•23 years ago
|
||
Nothing on js console.
Telling Venkman to stop on errors gets no hits.
Telling Venkman to stop on exceptions doing the above sequence of steps gives:
Exception [XPComponent] [class: XPCWrappedNative_NoHelper] {0} thrown from
function anonymous(aPrefType=string:"bool",
aPrefString=string:"pref.browser.homepage.disable_button.current_page",
aDefaultFlag=void:void) in <chrome://communicator/content/pref/nsPrefWindow.js>
line 137.
Stopped for thrown exception.
$[0] = [XPComponent] [class: XPCWrappedNative_NoHelper] {0}
function anonymous(aPrefType=string:"bool",
aPrefString=string:"pref.browser.homepage.disable_button.current_page",
aDefaultFlag=void:void) in <chrome://communicator/content/pref/nsPrefWindow.js>
line 137
135: {
136: case "bool":
137: return !aDefaultFlag ? pref.GetBoolPref( aPrefString ) :
pref.GetDefaultBoolPref( aPrefString );
138: case "int":
139: return !aDefaultFlag ? pref.GetIntPref( aPrefString ) :
pref.GetDefaultIntPref( aPrefString );
Continuing from thrown exception.
Exception [XPComponent] [class: XPCWrappedNative_NoHelper] {0} thrown from
function anonymous(aPrefType=string:"bool",
aPrefString=string:"pref.browser.homepage.disable_button.select_file",
aDefaultFlag=void:void) in <chrome://communicator/content/pref/nsPrefWindow.js>
line 137.
Stopped for thrown exception.
$[0] = [XPComponent] [class: XPCWrappedNative_NoHelper] {0}
function anonymous(aPrefType=string:"bool",
aPrefString=string:"pref.browser.homepage.disable_button.select_file",
aDefaultFlag=void:void) in <chrome://communicator/content/pref/nsPrefWindow.js>
line 137
135: {
136: case "bool":
137: return !aDefaultFlag ? pref.GetBoolPref( aPrefString ) :
pref.GetDefaultBoolPref( aPrefString );
138: case "int":
139: return !aDefaultFlag ? pref.GetIntPref( aPrefString ) :
pref.GetDefaultIntPref( aPrefString );
Continuing from thrown exception.
Exception [XPComponent] [class: XPCWrappedNative_NoHelper] {0} thrown from
function getPrefValueForCheckbox
(prefName=string:"capability.policy.default.HTMLImageElement.src") in
<chrome://communicator/content/pref/pref-scripts.js> line 74.
Stopped for thrown exception.
$[0] = [XPComponent] [class: XPCWrappedNative_NoHelper] {0}
function getPrefValueForCheckbox
(prefName=string:"capability.policy.default.HTMLImageElement.src") in
<chrome://communicator/content/pref/pref-scripts.js> line 74
072:
073: try {
074: prefValue = pref.GetCharPref(prefName);
075:
076: if(prefValue != "allAccess" && prefValue != "sameOrigin"){
Continuing from thrown exception.
Exception [XPComponent] [class: XPCWrappedNative_NoHelper] {0} thrown from
function getPrefValueForCheckbox
(prefName=string:"capability.policy.default.HTMLDocument.cookie.get") in
<chrome://communicator/content/pref/pref-scripts.js> line 74.
Stopped for thrown exception.
$[0] = [XPComponent] [class: XPCWrappedNative_NoHelper] {0}
function getPrefValueForCheckbox
(prefName=string:"capability.policy.default.HTMLDocument.cookie.get") in
<chrome://communicator/content/pref/pref-scripts.js> line 74
072:
073: try {
074: prefValue = pref.GetCharPref(prefName);
075:
076: if(prefValue != "allAccess" && prefValue != "sameOrigin"){
Continuing from thrown exception.
Exception [XPComponent] [class: XPCWrappedNative_NoHelper] {0} thrown from
function getPrefValueForCheckbox
(prefName=string:"capability.policy.default.HTMLDocument.cookie.set") in
<chrome://communicator/content/pref/pref-scripts.js> line 74.
Stopped for thrown exception.
$[0] = [XPComponent] [class: XPCWrappedNative_NoHelper] {0}
function getPrefValueForCheckbox
(prefName=string:"capability.policy.default.HTMLDocument.cookie.set") in
<chrome://communicator/content/pref/pref-scripts.js> line 74
072:
073: try {
074: prefValue = pref.GetCharPref(prefName);
075:
076: if(prefValue != "allAccess" && prefValue != "sameOrigin"){
Continuing from thrown exception.
Exception [XPComponent] [class: XPCWrappedNative_NoHelper] {0} thrown from
function anonymous(aPrefType=string:"bool",
aPrefString=string:"pref.advanced.cache.disable_button.clear_memory",
aDefaultFlag=void:void) in <chrome://communicator/content/pref/nsPrefWindow.js>
line 137.
Stopped for thrown exception.
$[0] = [XPComponent] [class: XPCWrappedNative_NoHelper] {0}
function anonymous(aPrefType=string:"bool",
aPrefString=string:"pref.advanced.cache.disable_button.clear_memory",
aDefaultFlag=void:void) in <chrome://communicator/content/pref/nsPrefWindow.js>
line 137
135: {
136: case "bool":
137: return !aDefaultFlag ? pref.GetBoolPref( aPrefString ) :
pref.GetDefaultBoolPref( aPrefString );
138: case "int":
139: return !aDefaultFlag ? pref.GetIntPref( aPrefString ) :
pref.GetDefaultIntPref( aPrefString );
Continuing from thrown exception.
Exception [XPComponent] [class: XPCWrappedNative_NoHelper] {0} thrown from
function anonymous(aPrefType=string:"bool",
aPrefString=string:"pref.advanced.cache.disable_button.clear_disk",
aDefaultFlag=void:void) in <chrome://communicator/content/pref/nsPrefWindow.js>
line 137.
Stopped for thrown exception.
$[0] = [XPComponent] [class: XPCWrappedNative_NoHelper] {0}
function anonymous(aPrefType=string:"bool",
aPrefString=string:"pref.advanced.cache.disable_button.clear_disk",
aDefaultFlag=void:void) in <chrome://communicator/content/pref/nsPrefWindow.js>
line 137
135: {
136: case "bool":
137: return !aDefaultFlag ? pref.GetBoolPref( aPrefString ) :
pref.GetDefaultBoolPref( aPrefString );
138: case "int":
139: return !aDefaultFlag ? pref.GetIntPref( aPrefString ) :
pref.GetDefaultIntPref( aPrefString );
Continuing from thrown exception.
In particular, no exceptions are thrown when going back to the Scripts &
Windows display the second time.
Comment 6•23 years ago
|
||
-> hewitt, nsbeta1
Assignee: jaggernaut → hewitt
Keywords: mozilla1.0,
nsbeta1
Comment 7•23 years ago
|
||
can you check other panels to see if this happens as well?
| Reporter | ||
Comment 8•23 years ago
|
||
I couldn't find any other pref panels that were losing their settings.
Comment 9•23 years ago
|
||
*** Bug 134981 has been marked as a duplicate of this bug. ***
Comment 11•23 years ago
|
||
If Netscape is shipping this panel (which I'm told is true) then this panel
should work correctly. As it stands right now, if a user switches away from the
panel and returns, they are (erroneously) told that they have disabled all of
the options to allow windows to open/resize windows, use cookies, etc.
Comment 12•23 years ago
|
||
in order to fix this, its not skin related as modern theme has same issue, so I
think this rules out the css code, and Advanced > System panel has the same
exact checkboxes, and looks like it repaints just fine.. so we need to look at
the code that is attached to that and compare it with the scripts & windows
code. Which should give us a clue here why it is funky. It appears that there
is no dataloss going on here.
Comment 13•23 years ago
|
||
*** Bug 135969 has been marked as a duplicate of this bug. ***
Comment 14•23 years ago
|
||
To Clarify for non-windows users,
The panel Dennis is talking about is where you can associate mozilla with
various extentions under windows.
Comment 15•23 years ago
|
||
*** Bug 136377 has been marked as a duplicate of this bug. ***
Comment 16•23 years ago
|
||
nsbeta1- per Nav triage team. helpwanted, ->1.0.1
Target Milestone: --- → mozilla1.0.1
| Assignee | ||
Comment 17•23 years ago
|
||
*** Bug 137214 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 18•23 years ago
|
||
Taking bug. I'm working on a fix.
Assignee: hewitt → caillon
Keywords: helpwanted
| Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Hardware: PC → All
Target Milestone: mozilla1.0.1 → mozilla1.0
| Assignee | ||
Comment 19•23 years ago
|
||
Okay there were a few problems here. We were setting the checked state
depending on whether the checkbox has changed state since we first loaded the
panel. The problem there is that we didn't cache the initial state, so we
would uncheck all items which were not changed since first load and checking
all items which did change.
Of course, we didn't even get that far because we were looking at the wrong
thing. So in the end, we were setting our checked states to a null variable,
which translates to false (not checked).
This patch fixes all that, plus some highly annoying nits I had in the file,
including opening braces on the same line as the function declaration (yuck).
| Assignee | ||
Comment 20•23 years ago
|
||
Oops, remember to save next time before diffing.
Attachment #79054 -
Attachment is obsolete: true
Comment 21•23 years ago
|
||
Comment on attachment 79056 [details] [diff] [review]
Patch v1.0.1
Needs some work:
- function getCheckboxValue(name){
- if ("onCheckboxCheck" in window)
- return document.getElementById(name).checked;
-
- return data[name].checked;
+ function getPrefValueFromCheckbox(name)
+ {
+ return !document.getElementById(name).checked;
}
First, you should add a comment about the negating
Second, and more important, your new function, getPrefValueFromCheckbox(), does
not check if the loaded panel is the scripts panel. If it isn't (user changes
values, goes to another panel, then presses OK), you'll get a js error. See
the function you removed for how I solved that.
Other than that, everything looks fine
Attachment #79056 -
Flags: needs-work+
| Assignee | ||
Comment 22•23 years ago
|
||
Better version of a patch. It seems we were getting the right thing, just that
when we changed from a <checkbox> to a <listitem type="checkbox"> the wsm was
not picking up the .checked property on the data object and that made it appear
as if we were getting the wrong thing.
Attachment #79056 -
Attachment is obsolete: true
Comment 23•23 years ago
|
||
*** Bug 137492 has been marked as a duplicate of this bug. ***
Comment 24•23 years ago
|
||
Comment on attachment 79208 [details] [diff] [review]
Patch v2.0
r=hewitt
Attachment #79208 -
Flags: review+
Comment 25•23 years ago
|
||
Comment on attachment 79208 [details] [diff] [review]
Patch v2.0
r=hewitt
Comment 26•23 years ago
|
||
*** Bug 137774 has been marked as a duplicate of this bug. ***
Comment 27•23 years ago
|
||
Attachment #79208 -
Flags: superreview+
| Assignee | ||
Updated•23 years ago
|
Summary: Scripts & Windows prefs incorrectly repainted → Scripts & Windows pref panel loses checkmarks the second time viewing it
Comment 28•23 years ago
|
||
Attachment #79208 -
Flags: approval+
| Assignee | ||
Comment 29•23 years ago
|
||
Checked in on trunk and branch. Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 30•23 years ago
|
||
It's not totally fixed yet! I'm still seeing a cosmetic problem on Build
2002-04-16 (1.0 branch) on WinNT. The checkmarks disappear but are not saved as
"unchecked", i.e. if you press OK, then go back, they're still checkmarked.
Comment 31•23 years ago
|
||
It was checked in today and you're using a build from yesterday.
Think about it :)
Comment 32•23 years ago
|
||
adding fixed1.0.0 keyword (branch resolution). This bug has comments saying it
was fixed on the 1.0 branch and a bonsai checkin comment that agrees. To verify
the bug has been fixed on the 1.0 branch please replace the fixed1.0.0 keyword
with verified1.0.0.
Keywords: fixed1.0.0
Comment 33•23 years ago
|
||
*** Bug 134651 has been marked as a duplicate of this bug. ***
Comment 34•23 years ago
|
||
verified1.0.0 on branch build 2002050306.
Keywords: fixed1.0.0 → verified1.0.0
You need to log in
before you can comment on or make changes to this bug.
Description
•