1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
From: Milan Crha <mcrha@redhat.com>
Date: Fri, 29 Aug 2025 07:42:10 +0200
Subject: I#3124 - JavaScript: Correct dictionary objects creation (WebKitGTK
2.49.4)
The arrays do not have named indexes, though it worked only by a chance
with the previous WebKitGTK versions. Correct how the objects are created
to follow the standard.
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/3124
(cherry picked from commit 811a6df1f990855e49ecc0ba7b1a7f7a5ec251e6)
---
data/webkit/e-editor.js | 8 ++++----
data/webkit/e-web-view.js | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/data/webkit/e-editor.js b/data/webkit/e-editor.js
index fb7d483..189816e 100644
--- a/data/webkit/e-editor.js
+++ b/data/webkit/e-editor.js
@@ -4252,7 +4252,7 @@ EvoEditor.LinkGetProperties = function()
var res = null, anchor = EvoEditor.getParentElement("A", null, false);
if (anchor) {
- res = [];
+ res = {};
res["href"] = anchor.href;
res["text"] = anchor.innerText;
} else if (!document.getSelection().isCollapsed && document.getSelection().rangeCount > 0) {
@@ -4261,7 +4261,7 @@ EvoEditor.LinkGetProperties = function()
range = document.getSelection().getRangeAt(0);
if (range) {
- res = [];
+ res = {};
res["text"] = range.toString();
}
}
@@ -5333,7 +5333,7 @@ EvoEditor.InsertSignature = function(content, isHTML, canRepositionCaret, uid, f
EvoUndoRedo.StopRecord(EvoUndoRedo.RECORD_KIND_GROUP, "InsertSignature");
}
- var res = [];
+ var res = {};
res["fromMessage"] = fromMessage;
res["checkChanged"] = checkChanged;
@@ -6484,7 +6484,7 @@ EvoEditor.onContextMenu = function(event)
if (document.getSelection().isCollapsed)
nodeFlags |= EvoEditor.E_CONTENT_EDITOR_NODE_IS_TEXT_COLLAPSED;
- res = [];
+ res = {};
res["nodeFlags"] = nodeFlags;
res["caretWord"] = EvoEditor.GetCaretWord();
diff --git a/data/webkit/e-web-view.js b/data/webkit/e-web-view.js
index 78f7dc3..10dfece 100644
--- a/data/webkit/e-web-view.js
+++ b/data/webkit/e-web-view.js
@@ -400,7 +400,7 @@ Evo.elementClicked = function(elem)
dom_window = parent_dom_window;
}
- var res = [];
+ var res = {};
res["iframe-id"] = parent_iframe_id;
res["elem-id"] = elem.id;
@@ -618,7 +618,7 @@ Evo.GetElementFromPoint = function(xx, yy)
if (!elem)
return null;
- var res = [], iframe;
+ var res = {}, iframe;
iframe = elem.ownerDocument.defaultView.frameElement;
|