Closed
Bug 251431
Opened 21 years ago
Closed 14 years ago
about:config doesn't show new prefs while filter is applied
Categories
(Toolkit :: Preferences, defect)
Toolkit
Preferences
Tracking
()
RESOLVED
FIXED
mozilla2.0b5
People
(Reporter: schapel, Assigned: mmm)
References
Details
Attachments
(3 files, 5 obsolete files)
3.37 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
575 bytes,
patch
|
Details | Diff | Splinter Review | |
592 bytes,
patch
|
Gavin
:
approval2.0+
|
Details | Diff | Splinter Review |
Reproducibility: Always
Steps to Reproduce:
1. Go to about:config
2. Type in any string for the Filter (e.g. test)
3. Add a new pref that matches that filter (e.g. http.test)
Expected Results:
The newly added pref immediately shows up because it matches the filter.
Actual Results:
The newly added pref is at first not visible. You must press Enter in the Filter
field to get it to appear.
First noticed in Mozilla 1.7. Reproduced in Mozilla trunk build 2004071108.
Dup/related with bug 243737?
Comment 3•21 years ago
|
||
*** Bug 243737 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 4•20 years ago
|
||
Fix this bug by calling FilterPrefs() which calls gotoPref() instead of only
calling gotoPref(). Tested with Seamonkey and FF.
Assignee: prefs → Stefan.Borggraefe
Status: NEW → ASSIGNED
Attachment #173126 -
Flags: review?(mconnor)
Comment 5•20 years ago
|
||
I see this patch only works for prefs added by NewPref...
You could improve on your prefCol assignment by testing if (!prefCol &&
view.selection.currentIndex > 0)
Also see if you can spot the coding error in FilterPrefs().
Comment 6•20 years ago
|
||
This also happens in firefox.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050502
Firefox/1.0+
Comment 7•20 years ago
|
||
Comment on attachment 173126 [details] [diff] [review]
Patch
r=me, with neil's comments addressed. This doesn't completely fix the bug
either, but that's a bit harder.
Attachment #173126 -
Flags: review?(mconnor) → review+
Comment 8•20 years ago
|
||
This bug also doesn't display the correct value when a pref is changed twice
while a filter is used.
1. Use text "http" as filter
2. Switch network.http.pipelining pref: change is displayed.
3. Switch network.http.pipelining pref again: change is NOT displayed
4. When applying the filter again the new value is visible for 3.
It works correct when no filter is used.
Reporter | ||
Comment 9•20 years ago
|
||
(In reply to comment #8)
> This bug also doesn't display the correct value when a pref is changed twice
> while a filter is used.
WFM with Mozilla trunk build 2005052005, using both Toggle and Reset to set
network.http.pipelining to false while the http filter is in effect. What build
were you using?
Comment 10•20 years ago
|
||
Hmm, it seems to happen at random here. Can't reproduct it myself anymore at
this moment, weird. Will try to trigger it again.
My build is:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050519
Firefox/1.0+
Comment 11•20 years ago
|
||
*** Bug 298007 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Comment 12•20 years ago
|
||
This already had r=mconnor, asking for approval.
Attachment #186592 -
Flags: review+
Attachment #186592 -
Flags: approval-aviary1.1a2?
Comment 13•20 years ago
|
||
Comment on attachment 186592 [details] [diff] [review]
Toolkit-only patch
a=shaver
Attachment #186592 -
Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
Comment 14•20 years ago
|
||
Wait a minute, the movement of the assignment to prefCol is incorrect...
Comment 15•20 years ago
|
||
Comment on attachment 186592 [details] [diff] [review]
Toolkit-only patch
(In reply to comment #14)
> Wait a minute, the movement of the assignment to prefCol is incorrect...
Sorry, I hadn't noticed the reviews comments. New patch coming up.
Attachment #186592 -
Attachment is obsolete: true
Attachment #186592 -
Flags: approval-aviary1.1a2+
Comment 16•20 years ago
|
||
(In reply to comment #15)
>Sorry, I hadn't noticed the reviews comments. New patch coming up.
Actually my comment 14 may refer to a new issue that my comment 5 missed.
Updated•19 years ago
|
Attachment #186592 -
Flags: review+
Comment 17•18 years ago
|
||
*** Bug 360083 has been marked as a duplicate of this bug. ***
Comment 19•17 years ago
|
||
What about this one? (from bug 399713)
Updated•17 years ago
|
Assignee: Stefan.Borggraefe → nobody
Status: ASSIGNED → NEW
QA Contact: prefs
Updated•15 years ago
|
Product: SeaMonkey → Toolkit
QA Contact: preferences → preferences
Assignee | ||
Comment 21•15 years ago
|
||
This patch applies a big hammer to the problem and redraws the view when a preference is changed and a filter is being applied.
This is better than the previous patches as it will even update the view when a preference is changed by an outside source but:
This is worse as it is really is a big hammer. We can make this faster by only changing certain parts of the view as needed. Furthermore, if the filter being applied is tiny (for example, the letter 'a'), the time to redraw could be large.
Best solution I think would be:
Refactor the code so that the current filter (if any) is stored as a regex for any method to access, when a new preference is added or changed, run the preference against the regex and redraw appropriately.
I have not taken an indepth look at this code though and am not sure if there are some big pitfalls I'm missing.
Attachment #454964 -
Flags: feedback?(gavin.sharp)
Assignee | ||
Comment 22•14 years ago
|
||
Comment on attachment 454964 [details] [diff] [review]
Fast patch that seems to fix this bug without any of the problems of the other patches.
adding dolske for feedback to offset load from gavin.
Attachment #454964 -
Flags: feedback?(dolske)
Assignee | ||
Comment 23•14 years ago
|
||
Comment on attachment 454964 [details] [diff] [review]
Fast patch that seems to fix this bug without any of the problems of the other patches.
moving this bad boy to review, as per shawn's advice.
Attachment #454964 -
Flags: feedback?(dolske) → review?(dolske)
Comment 24•14 years ago
|
||
Comment on attachment 454964 [details] [diff] [review]
Fast patch that seems to fix this bug without any of the problems of the other patches.
> if (prefName in gPrefHash) {
> index = getViewIndexOfPref(gPrefHash[prefName]);
> fetchPref(prefName, getIndexOfPref(gPrefHash[prefName]));
...
> } else {
> fetchPref(prefName, index);
> if (index == gFastIndex) {
> // Keep the array sorted by reinserting the pref object
> var pref = gPrefArray.pop();
> index = getNearestIndexOfPref(pref);
> gPrefArray.splice(index, 0, pref);
> gFastIndex = gPrefArray.length;
> }
> if (gPrefView == gPrefArray)
> view.treebox.rowCountChanged(index, 1);
> }
>+
>+ var textbox = document.getElementById("textbox");
>+ if (textbox.value)
>+ FilterPrefs();
Actually we can do better than this, for instance modifying an existing pref already works. Hint: look at where the code adds the row to the tree in the case of adding a pref to an unfiltered view.
Assignee | ||
Comment 25•14 years ago
|
||
(In reply to comment #24)
> Actually we can do better than this, for instance modifying an existing pref
> already works. Hint: look at where the code adds the row to the tree in the
> case of adding a pref to an unfiltered view.
Yeah, I stated that in comment 21. Handling the filtered case nicely would require refactoring the FilterPrefs method.
If we changed how how this adds preferences, we wouldn't handle the use case of an outside method adding a preference (such as an extension might).
Comment 26•14 years ago
|
||
(In reply to comment #25)
> (In reply to comment #24)
> > Actually we can do better than this, for instance modifying an existing pref
> > already works. Hint: look at where the code adds the row to the tree in the
> > case of adding a pref to an unfiltered view.
> Yeah, I stated that in comment 21. Handling the filtered case nicely would
> require refactoring the FilterPrefs method.
I was commenting on the code that I specifically quoted, rather than trying to suggest that only God's algorithm was acceptable.
Assignee | ||
Comment 27•14 years ago
|
||
(In reply to comment #26)
> I was commenting on the code that I specifically quoted, rather than trying to
> suggest that only God's algorithm was acceptable.
Sorry, I misunderstood your earlier comment :P
I changed the context where the FilterPrefs is run to a different execution path that still seems to exhaust the case we want to fix.
Attachment #454964 -
Attachment is obsolete: true
Attachment #466080 -
Flags: review?(dolske)
Attachment #454964 -
Flags: review?(dolske)
Attachment #454964 -
Flags: feedback?(gavin.sharp)
Comment 28•14 years ago
|
||
I think Neil should review this.
Comment 29•14 years ago
|
||
Comment on attachment 466080 [details] [diff] [review]
Changed situation when added code is executed for less redundant paths.
>- if (gPrefView == gPrefArray)
>+ if (gPrefView == gPrefArray) {
> view.treebox.rowCountChanged(index, 1);
>+ }
>+ else {
>+ var textbox = document.getElementById("textbox");
>+ if (textbox.value)
>+ FilterPrefs();
So close, and yet so far ;-)
If the textbox has no value, then gPrefView == gPrefArray, and we update the view the fast way. So in the else case we know the value must exist.
Also file style is not to wrap single lines in braces.
Assignee | ||
Comment 30•14 years ago
|
||
As per Gavin's comments I moved to Neil as a reviewer, I'm sure dolske won't mind with a lighter load :P
Neil: tell me what you think. I tested this out and it seems to work fine.
Attachment #466080 -
Attachment is obsolete: true
Attachment #466160 -
Flags: review?(neil)
Attachment #466080 -
Flags: review?(dolske)
Assignee | ||
Comment 31•14 years ago
|
||
Comment on attachment 466160 [details] [diff] [review]
Fixed as per neil's comments.
Sorry for the spam, put the wrong Neil up for review.
Attachment #466160 -
Flags: review?(neil) → review?(neil)
Comment 32•14 years ago
|
||
Comment on attachment 466160 [details] [diff] [review]
Fixed as per neil's comments.
It's not as if there's much left for me to be able to complain about ;-)
Attachment #466160 -
Flags: review?(neil) → review+
Updated•14 years ago
|
Assignee: nobody → mmulani
Status: NEW → ASSIGNED
Updated•14 years ago
|
Attachment #466160 -
Flags: approval2.0?
Updated•14 years ago
|
Attachment #466160 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 33•14 years ago
|
||
Attachment #466160 -
Attachment is obsolete: true
Assignee | ||
Comment 34•14 years ago
|
||
Attachment #468341 -
Attachment is obsolete: true
Updated•14 years ago
|
Attachment #468353 -
Flags: approval2.0+
Updated•14 years ago
|
Keywords: checkin-needed
Comment 35•14 years ago
|
||
Landed, but was this really approved without a test!
http://hg.mozilla.org/mozilla-central/rev/c7966f640a46
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b5
Updated•14 years ago
|
Keywords: checkin-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•