Closed Bug 1415877 Opened 2 years ago Closed 2 years ago

Merge the PlacesControllerDragHelper#onDrop and PlacesController#Paste transaction handling

Categories

(Firefox :: Bookmarks & History, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Whiteboard: [fxsearch])

Attachments

(3 files)

The onDrop and paste functions do very similar things after the initial processing of the object for drop/paste.

Bug 1410940 went part way, but I've realised that we can go further.

Doing this will help the performance optimisations that I'm working on in bug 1404909. I'm splitting this out so that there are smaller chunks to review.
Comment on attachment 8926850 [details]
Bug 1415877 - Remove unused type parameter to PlacesUIUtils#getTransactionForData.

https://reviewboard.mozilla.org/r/198096/#review204514
Attachment #8926850 - Flags: review?(mak77) → review+
Comment on attachment 8926851 [details]
Bug 1415877 - Rework PlacesControllerDragHelper#onDrop and PlacesController#paste to make the transaction handling parts similar.

https://reviewboard.mozilla.org/r/198098/#review204538

Some reindentations are quite hard to follow in patch form, but we're early in the cycle...

::: browser/components/places/content/controller.js:1706
(Diff revision 1)
> +          let spec = uri ? uri.spec : "about:blank";
> +          nodes = [{ uri: spec,
> +                     title: data.label,
> +                     type: PlacesUtils.TYPE_X_MOZ_URL}];
> +        } else
> +          throw new Error("bogus data was passed as a tab");

please brace
Attachment #8926851 - Flags: review?(mak77) → review+
Comment on attachment 8926852 [details]
Bug 1415877 - Merge transaction handling into one function for onDrop/paste.

https://reviewboard.mozilla.org/r/198100/#review204822
Attachment #8926852 - Flags: review?(mak77) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/42f62c4c5f11
Remove unused type parameter to PlacesUIUtils#getTransactionForData. r=mak
https://hg.mozilla.org/integration/autoland/rev/93e05c0da993
Rework PlacesControllerDragHelper#onDrop and PlacesController#paste to make the transaction handling parts similar. r=mak
https://hg.mozilla.org/integration/autoland/rev/ea5b48baa387
Merge transaction handling into one function for onDrop/paste. r=mak
You need to log in before you can comment on or make changes to this bug.