Closed
Bug 168916
Opened 23 years ago
Closed 23 years ago
Removing unecessary redundancy in nsContextMenu.js
Categories
(SeaMonkey :: UI Design, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: fv8l1rxj1, Assigned: bugzilla)
Details
(Keywords: perf)
Attachments
(1 file, 2 obsolete files)
|
4.02 KB,
patch
|
choess
:
review+
jag+mozilla
:
superreview+
sspitzer
:
approval1.4b+
asa
:
approval1.4+
|
Details | Diff | Splinter Review |
I know that this is trivial, but wouldn't it be better coding to remove
reduntant checks from the nsContextMenu.js file? I mean why performing the same
operation multiple times instead of performing it just once and saving the
result to a temp variable?
Why using
this.showItem( "context-back", !( this.isTextSelected || this.onLink ||
this.onImage || this.onTextInput ) );
this.showItem( "context-forward", !( this.isTextSelected || this.onLink ||
this.onImage || this.onTextInput ) );
instead of
var showNav = !( this.isTextSelected || this.onLink || this.onImage ||
this.onTextInput );
this.showItem( "context-back", showNav );
this.showItem( "context-forward", showNav );
???
The attached nsContextMenu performs 2 and-operations, 7 not-operations and 35
or-operations less than the currently used one and that every time the context
menu is opened. But there is no difference in functionality.
Comment 2•23 years ago
|
||
Could you please attach this as a patch against the current nsContextMenu.js? If
you don't use CVS, but are just working with chrome, I believe you can generate
it with Patch Maker. <URL:http://www.gerv.net/software/patch-maker/> Thanks.
Assignee: asa → blaker
Status: UNCONFIRMED → NEW
Component: Browser-General → XP Apps: GUI Features
Ever confirmed: true
QA Contact: asa → paw
> Could you please attach this as a patch against the current nsContextMenu.js? If
> you don't use CVS, but are just working with chrome, I believe you can generate
> it with Patch Maker. <URL:http://www.gerv.net/software/patch-maker/> Thanks.
Can't run Patch Maker, have no Perl interpreter installed and CVS is kinda an
overkill for me to run (I have only a CVS tool in my Java IDE, which I never
used so far). However, what you want me to generate is a file one can use
together with the Linux/UNIX tool "patch", isn't it? Can't I generate such a
file using the "diff" command? As I have this command available on Windows
(thansk to Cygwin) and I could attach the output here as file if you like.
Comment 4•23 years ago
|
||
A "diff -u" would be great, yes.
Here's the "diff -u" output that shows the changes which have been made.
Attachment #99346 -
Attachment is obsolete: true
Comment 6•23 years ago
|
||
The old patch bitrotted -- here's an updated patch.
Attachment #99524 -
Attachment is obsolete: true
Updated•23 years ago
|
Attachment #119829 -
Flags: review?(blaker)
Updated•23 years ago
|
Attachment #119829 -
Flags: review?(blaker) → review?(choess)
Comment 7•23 years ago
|
||
Comment on attachment 119829 [details] [diff] [review]
new fix
r=choess
Attachment #119829 -
Flags: review?(choess) → review+
Updated•23 years ago
|
Attachment #119829 -
Flags: superreview?(jaggernaut)
Comment 8•23 years ago
|
||
Comment on attachment 119829 [details] [diff] [review]
new fix
sr=jag
Attachment #119829 -
Flags: superreview?(jaggernaut) → superreview+
Updated•23 years ago
|
Attachment #119829 -
Flags: approval1.4b?
Comment 9•23 years ago
|
||
Comment on attachment 119829 [details] [diff] [review]
new fix
a=sspitzer
Attachment #119829 -
Flags: approval1.4b? → approval1.4b+
Updated•23 years ago
|
Attachment #119829 -
Flags: approval1.4?
Comment 10•23 years ago
|
||
what happened here? did this have r/sr/a for 1.4 beta, but never checked in?
Comment 11•23 years ago
|
||
probably (I don't have checkin privs, and neither does Steve AFAIK)
Comment 12•23 years ago
|
||
Comment on attachment 119829 [details] [diff] [review]
new fix
a=asa (on behalf of drivers) for checkin to 1.4.
Attachment #119829 -
Flags: approval1.4? → approval1.4+
Comment 13•23 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•