Closed
Bug 545066
Opened 14 years ago
Closed 8 years ago
Clean up nsClipboard.cpp/h
Categories
(Core :: Widget: Win32, defect, P5)
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: khuey, Assigned: jeanluc.bonnafoux, Mentored)
Details
(Whiteboard: [good first bug][lang=c++][tpi:+])
Attachments
(1 file, 5 obsolete files)
16.47 KB,
patch
|
jeanluc.bonnafoux
:
review+
|
Details | Diff | Splinter Review |
There's some cruft living in nsClipboard that can be removed (DisplayErr, odd commenting style, etc).
Reporter | ||
Updated•13 years ago
|
Assignee: khuey → nobody
Status: ASSIGNED → NEW
Comment 1•13 years ago
|
||
> DisplayErr
For this do you mean to move the "static void DisplayErrCode(HRESULT hres)" into some debug file or...?
Updated•13 years ago
|
Assignee: nobody → netzen
Updated•12 years ago
|
Assignee: netzen → nobody
Updated•10 years ago
|
Mentor: jmathies, tabraldes, netzen
Whiteboard: [good first bug][lang=c++]
:jimm Yeah sorry for that. I'd like to work on this bug if you could assign it to me.
Comment 7•10 years ago
|
||
(In reply to Aman Alam from comment #6) > Could you guide on how to go about it. Thanks Sure, we have coding standards outlined here - https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style Generally if you look around at other c++ source files you'll find some obvious differences in the clipboard code.
Assignee: nobody → aman_alam
Comment 8•10 years ago
|
||
Hi, I would like to work on this bug. Please tell me how to proceed. I am a newbie to Mozilla.
Comment 9•10 years ago
|
||
I have changed the comparison condition in if blocks as per the given coding style of Mozilla. I could not get any idea about DisplayErr. Please review my patch and also tell me how to proceed with "DisplayErr" thing.
Attachment #8519467 -
Flags: review?(jmathies)
Comment 10•10 years ago
|
||
Comment on attachment 8519467 [details] [diff] [review] Changed the styles of comparing conditions in if() Review of attachment 8519467 [details] [diff] [review]: ----------------------------------------------------------------- There are a bunch of file changes here that look unrelated - please remove them. generally this is a step in the right direction, lets try and finish up the rest of these nits. ::: widget/windows/nsClipboard.cpp @@ +92,4 @@ > { > UINT format; > > + if (!strcmp(aMimeStr, kTextMime)) nit - on all of these can we add parens for the blocks please. @@ +183,5 @@ > FORMATETC textFE; > SET_FORMATETC(textFE, CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL); > dObj->AddDataFlavor(kTextMime, &textFE); > } > + else if ( !strcmp(flavorStr, kHTMLMime) ) { nit - white space, you can check for this by posting your patch and looking at it under Review. There's also random white space in this file unrelated to your changes, can you seek those out as well and clean them up? @@ +219,4 @@ > SET_FORMATETC(imageFE, CF_DIB, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL) > dObj->AddDataFlavor(flavorStr, &imageFE); > } > + else if ( !strcmp(flavorStr, kFilePromiseMime) ) { nit - no spaces here and below. if (!strcmp(...)) { }
Attachment #8519467 -
Flags: review?(jmathies) → review-
Comment 11•10 years ago
|
||
Thanks for your review Jim Mathies. I had been busy with my exams, projects for past few weeks. Now, I will work on this. Regarding the nit on the line #92, Do you want me to add parens to if-else blocks?
Comment 12•9 years ago
|
||
Hello Jim! I'm Neil, and still looking for my first bug to solve! If Rohan isn't working on it anymore, could I
Comment 13•9 years ago
|
||
Sorry about that, Hello Jim! I'm Neil, and still looking for my first bug to solve! If Rohan isn't working on it anymore, could I start working on this? I need to work on the paren blocks as well as white space, right?
Comment 14•9 years ago
|
||
Hey Jim How to merge changes from a patch into an local mozilla repository?
Comment 15•8 years ago
|
||
(In reply to Rohan Jaswal from comment #11) > Thanks for your review Jim Mathies. > I had been busy with my exams, projects for past few weeks. > Now, I will work on this. > > Regarding the nit on the line #92, > Do you want me to add parens to if-else blocks? Mozilla coding style must use { } for 'if' event if one line. So you must write the fix like the following. if (!strcmp(aMimeStr, kTextMime)) { ... } else if (!strcmp(aMimeStr, kUnicodeMime)) { ... } After fixing comment #10, please attach new fix.
Updated•8 years ago
|
Priority: -- → P5
Whiteboard: [good first bug][lang=c++] → [good first bug][lang=c++][tpi:+]
Comment 16•8 years ago
|
||
I would like to work on this bug its my first bug can you give some tips
Assignee | ||
Comment 17•8 years ago
|
||
Change to add braces for if / else statement in nsClipboard.cpp
Attachment #8816873 -
Flags: review?(jmathies)
Assignee | ||
Comment 18•8 years ago
|
||
Hello, I have proposed a patched attached to this bugzilla case. This is my first contribution tentative. Happy to discuss about the proposed changes. Thanks,
Comment 19•8 years ago
|
||
Comment on attachment 8816873 [details] [diff] [review] Amendinf if else statements to include braces Review of attachment 8816873 [details] [diff] [review]: ----------------------------------------------------------------- Please do not use tabs.
Assignee | ||
Comment 20•8 years ago
|
||
Hello, Thanks for reviewing the submitted patch. I will amend the code to avoid the use of tabs and attach a new patch to this bugzilla case. Thanks,
Assignee | ||
Comment 21•8 years ago
|
||
removed use of tabs
Attachment #8817012 -
Flags: review?(jmathies)
Assignee | ||
Comment 22•8 years ago
|
||
Assignee | ||
Comment 23•8 years ago
|
||
Apologies, i have submitted the same patch twice.
Assignee | ||
Comment 24•8 years ago
|
||
Hello, Could you please assign this issue to me ? Thanks,
Updated•8 years ago
|
Assignee: aman_alam → jeanluc.bonnafoux
Attachment #8817235 -
Flags: review?(jmathies)
Comment 25•8 years ago
|
||
Comment on attachment 8817235 [details] [diff] [review] adding braces for if else Review of attachment 8817235 [details] [diff] [review]: ----------------------------------------------------------------- Please obsolete old patches when you attach a new patch (now you should be possible because you are assignee). ::: widget/windows/nsClipboard.cpp @@ +64,5 @@ > // to the OS clipboard. > nsCOMPtr<nsIObserverService> observerService = > do_GetService("@mozilla.org/observer-service;1"); > + if (observerService) { > + observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE); Our coding style uses 2-space indent, not 4. (Same for all your changes.)
Assignee | ||
Comment 26•8 years ago
|
||
Attachment #8816873 -
Attachment is obsolete: true
Attachment #8817012 -
Attachment is obsolete: true
Attachment #8817235 -
Attachment is obsolete: true
Attachment #8816873 -
Flags: review?(jmathies)
Attachment #8817012 -
Flags: review?(jmathies)
Attachment #8817235 -
Flags: review?(jmathies)
Attachment #8817865 -
Flags: review?(VYV03354)
Attachment #8817865 -
Flags: review?(VYV03354) → review?(jmathies)
Assignee | ||
Comment 27•8 years ago
|
||
Hello, i have made old patches proposal obsolete as required. I have attached a new patch proposal for enforcing 2 spaces indent. Thanks,
Assignee | ||
Comment 28•8 years ago
|
||
Hello, Is the latest patch proposal Ok ? Thanks,
Updated•8 years ago
|
Attachment #8817865 -
Flags: review?(jmathies) → review+
Updated•8 years ago
|
Attachment #8519467 -
Attachment is obsolete: true
Comment 29•8 years ago
|
||
To land this: 1) update the check-in comment to include reviewer info, something like: "Bug 545066 - Code cleanup in widget/windows/nsClipboard: add braces to if else, removed tabs, ident fix. r=jimm" and post it to this bug. Obsolete the old patches. 2) add 'checkin-needed' to the keywords so drivers will land it. If you don't have bugzilla perms to add thit, needinfo me. Thanks for the contribution!
Assignee | ||
Comment 31•8 years ago
|
||
Hello, Quick question on item 1, should i submit a new patch (with same code changes) but only with a different comment ? My first guess was to update the comment of the current attachment but this does not look possible in bugzilla. Thanks for your help,
Comment 32•8 years ago
|
||
(In reply to jbonnafo from comment #31) > Hello, > > Quick question on item 1, should i submit a new patch (with same code > changes) but only with a different comment ? Yes, thanks!
Assignee | ||
Comment 33•8 years ago
|
||
Bug 545066 - Code cleanup in widget/windows/nsClipboard: add braces to if else, removed tabs, ident fix.
Attachment #8817865 -
Attachment is obsolete: true
Attachment #8818610 -
Flags: review+
Assignee | ||
Comment 34•8 years ago
|
||
Hello, I have added new patch with comment as requested by :jimm. I have set the flag to 'checkin-needed'. Thanks,
Updated•8 years ago
|
Target Milestone: mozilla1.9.3a2 → ---
Comment 35•8 years ago
|
||
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/7ca01cd5d229 Clean up nsClipboard.cpp - braces added for if..else, no tabs, ident fix. r=jimm
Keywords: checkin-needed
Assignee | ||
Comment 36•8 years ago
|
||
Hello, There are some other files in widget/windows directory that would require some code clean-up. Should i raise a new bugzilla ticket for this ? Thanks,
Comment 37•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7ca01cd5d229
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•