Bug 381255 ? Drag and Drop to Bookmarks result in an Assertion failed (for mak77@supereva.it, r=mano)

This commit is contained in:
dietrich@mozilla.com 2008-03-07 10:25:01 -08:00
Родитель f374e39dcd
Коммит 7e9ef3a40f
1 изменённых файлов: 2 добавлений и 8 удалений

Просмотреть файл

@ -753,12 +753,8 @@ var BookmarksMenuDropHandler = {
* @returns a FlavourSet object per nsDragAndDrop parlance.
*/
getSupportedFlavours: function BMDH_getSupportedFlavours() {
var flavorSet = new FlavourSet();
var view = document.getElementById("bookmarksMenuPopup");
var types = PlacesUtils.GENERIC_VIEW_DROP_TYPES
for (var i = 0; i < types.length; ++i)
flavorSet.appendFlavour(types[i]);
return flavorSet;
return view.getSupportedFlavours();
},
/**
@ -784,11 +780,9 @@ var BookmarksMenuDropHandler = {
* The active DragSession
*/
onDrop: function BMDH_onDrop(event, data, session) {
var view = document.getElementById("bookmarksMenuPopup");
// Put the item at the end of bookmark menu
var ip = new InsertionPoint(PlacesUtils.bookmarksMenuFolderId, -1);
PlacesControllerDragHelper.onDrop(ip);
view._rebuild();
}
};