Closed Bug 1167952 Opened 5 years ago Closed 4 years ago

Remove unused document argument in uses of nsIClipboardHelper.{copyString|copyStringToClipboard}

Categories

(SeaMonkey :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.45

People

(Reporter: philip.chee, Assigned: gulm2, Mentored)

References

Details

(Whiteboard: [good first bug][lang=js][mentor=Philip.Chee(Ratty)])

Attachments

(2 files)

See Core Bug 1166840 (Remove the document argument from the clipboard helper APIs)

(From Bug 1166840 comment #0)
> This is no longer necessary after bug 815952 was fixed.  (See bug 965199
> comment 14.)
I will work on it.

If I understand it correctly, I should remove "aContext" parameter from "nsITransferable.init" method, and removes all of its usages in both C++ and JS. Right?

Will you assign the bug to me? Thanks (:
I refactored the C++ code. I wasn't start the JS part yet.
But, I faced a problem that I couldn't solve. Can you please give me a hand?

* I did these changes:

"aContext" parameter removed from "init" method of nsITransferable:
https://dxr.mozilla.org/mozilla-central/source/widget/nsITransferable.idl?offset=0#113

I also removed "GetIsPrivateData" and "SetIsPrivateData" from "nsITransferable":
https://dxr.mozilla.org/mozilla-central/source/obj-x86_64-unknown-linux-gnu/dist/include/nsITransferable.h#372

* The problem:

Here, this method used "GetIsPrivateData" to get "isPrivate" flag. Can it get this flag from somewhere else?
https://dxr.mozilla.org/mozilla-central/source/dom/base/nsContentAreaDragDrop.cpp#241

Thanks in advanced.
Flags: needinfo?(philip.chee)
Hi! Sorry for the delay. Since this is a SeaMonkey bug you should only touch files in comm-central/suite/

comm-central repository is here: http://hg.mozilla.org/comm-central/

MXR Query for possible lines to change:
http://mxr.mozilla.org/comm-central/search?string=nsIClipboardHelper&find=%2Fsuite%2F&findi=&filter=^[^\0]*%24&hitlimit=&tree=comm-central
Flags: needinfo?(philip.chee)
Hi (: No problem.

Oh! I was reading other bugs linked here, and didn't noticed that it's not a Firefox bug like those.
I'll give up on this one, because I only know "mozilla-central" for now.

Really really sorry for wasting your time and messing up this bug comments.
https://dxr.mozilla.org/comm-central/search?q=nsiclipboardhelper&redirect=false&case=false does not appear to include any uses of copyString that have a document argument. What is the goal of this bug?
Attachment #8696156 - Flags: review?(philip.chee)
Can this bug be assigned to me?
Assignee: nobody → gulm2
Status: NEW → ASSIGNED
Comment on attachment 8696156 [details] [diff] [review]
18686.patch - Bug 1167952

> # Node ID 7253db6281fdd1c1f8b3595552a366fac1d43c11
> # Parent  725ae1aad7d0900e34dbd06359a1a41279e25873
> Remove unused document argument
Please reference the bug number in the commit message. And describe what the patch does.

>    gLocSvc.clipboard.copyString(password, document);
You missed one instance in dataman.js

Please submit a new patch with these corrected.

Thank you
Flags: needinfo?(gulm2)
Attachment #8696156 - Flags: review?(philip.chee) → review-
(In reply to Josh Matthews [:jdm] from comment #5)
> https://dxr.mozilla.org/comm-central/
> search?q=nsiclipboardhelper&redirect=false&case=false does not appear to
> include any uses of copyString that have a document argument. What is the
> goal of this bug?
You used the wrong search. Try this instead:

https://dxr.mozilla.org/comm-central/search?q=copyString+path%3Asuite&redirect=false&case=false
Flags: needinfo?(josh)
Attachment #8697423 - Flags: review?(philip.chee)
Flags: needinfo?(josh)
Comment on attachment 8697423 [details] [diff] [review]
Patch 2 Removed unused document argument in uses of nsIClipboardHelper.{copyString|copyStringToClipboard}

r=me Thanks very much for the patch. Apologies for the very long delay
Attachment #8697423 - Flags: review?(philip.chee) → review+
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/253f1ba3ff33
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.45
You need to log in before you can comment on or make changes to this bug.