mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 452805, rearrange so that flavours are ordered in same order as getSupportedFlavours returns, r=neil
This commit is contained in:
parent
4647bc5c99
commit
f3e1336106
@ -471,14 +471,13 @@ var nsDragAndDrop = {
|
||||
var count = dt.mozItemCount;
|
||||
for (var i = 0; i < count; ++i) {
|
||||
var types = dt.mozTypesAt(i);
|
||||
for (var j = 0; j < types.length; ++j) {
|
||||
var type = types[j];
|
||||
for (var j = 0; j < flavourSet.flavours.length; j++) {
|
||||
var type = flavourSet.flavours[j].contentType;
|
||||
// dataTransfer uses text/plain but older code used text/unicode, so
|
||||
// switch this for compatibility
|
||||
if (type == "text/plain")
|
||||
type = "text/unicode";
|
||||
if (type in flavourSet.flavourTable) {
|
||||
var data = dt.mozGetDataAt(type, i);
|
||||
var modtype = (type == "text/unicode") ? "text/plain" : type;
|
||||
if (Array.indexOf(types, modtype) >= 0) {
|
||||
var data = dt.mozGetDataAt(modtype, i);
|
||||
if (data) {
|
||||
var length = (typeof data == "string") ? data.length : kNonStringDataLength;
|
||||
dataArray[i] = FlavourToXfer(data, length, flavourSet.flavourTable[type]);
|
||||
|
Loading…
Reference in New Issue
Block a user