Add patch to fix JavaScript dictionary objects creation
This commit is contained in:
parent
74f6ae9eda
commit
f68015d7fa
2 changed files with 102 additions and 1 deletions
95
0001-Fix-JavaScript-code-for-WebKitGTK-2.49.4.patch
Normal file
95
0001-Fix-JavaScript-code-for-WebKitGTK-2.49.4.patch
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
From 811a6df1f990855e49ecc0ba7b1a7f7a5ec251e6 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
|
||||
diff --git a/data/webkit/e-editor.js b/data/webkit/e-editor.js
|
||||
index c4e643d9ea..340ff54643 100644
|
||||
--- a/data/webkit/e-editor.js
|
||||
+++ b/data/webkit/e-editor.js
|
||||
@@ -4409,7 +4409,7 @@ EvoEditor.LinkGetProperties = function()
|
||||
var res = null, anchor = EvoEditor.getParentElement("A", null, false);
|
||||
|
||||
if (anchor) {
|
||||
- res = [];
|
||||
+ res = {};
|
||||
res["href"] = anchor.hasAttribute("href") ? anchor.getAttribute("href") : "";
|
||||
res["text"] = anchor.innerText;
|
||||
res["name"] = anchor.name;
|
||||
@@ -4419,7 +4419,7 @@ EvoEditor.LinkGetProperties = function()
|
||||
range = document.getSelection().getRangeAt(0);
|
||||
|
||||
if (range) {
|
||||
- res = [];
|
||||
+ res = {};
|
||||
res["text"] = range.toString();
|
||||
}
|
||||
}
|
||||
@@ -5513,7 +5513,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;
|
||||
@@ -6722,7 +6722,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();
|
||||
@@ -6743,7 +6743,7 @@ document.onselectionchange = function() {
|
||||
EvoEditor.maybeUpdateFormattingState(EvoEditor.forceFormatStateUpdate ? EvoEditor.FORCE_YES : EvoEditor.FORCE_MAYBE);
|
||||
EvoEditor.forceFormatStateUpdate = false;
|
||||
|
||||
- var sel = document.getSelection(), args = [];
|
||||
+ var sel = document.getSelection(), args = {};
|
||||
|
||||
args["isCollapsed"] = sel.isCollapsed;
|
||||
|
||||
diff --git a/data/webkit/e-web-view.js b/data/webkit/e-web-view.js
|
||||
index 591ee4f20e..b83899ba32 100644
|
||||
--- a/data/webkit/e-web-view.js
|
||||
+++ b/data/webkit/e-web-view.js
|
||||
@@ -399,7 +399,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;
|
||||
@@ -617,7 +617,7 @@ Evo.GetElementFromPoint = function(xx, yy)
|
||||
if (!elem)
|
||||
return null;
|
||||
|
||||
- var res = [], iframe;
|
||||
+ var res = {}, iframe;
|
||||
|
||||
iframe = elem.ownerDocument.defaultView.frameElement;
|
||||
|
||||
diff --git a/src/e-util/test-web-view-jsc.c b/src/e-util/test-web-view-jsc.c
|
||||
index e765161925..7a877b62e7 100644
|
||||
--- a/src/e-util/test-web-view-jsc.c
|
||||
+++ b/src/e-util/test-web-view-jsc.c
|
||||
@@ -531,7 +531,7 @@ test_jsc_object_properties (TestFixture *fixture)
|
||||
str = e_web_view_jsc_printf_script (
|
||||
"test_obj_props = function()\n"
|
||||
"{\n"
|
||||
- " var arrobj = [];\n"
|
||||
+ " var arrobj = {};\n"
|
||||
" arrobj[\"btrue\"] = true;\n"
|
||||
" arrobj[\"bfalse\"] = false;\n"
|
||||
" arrobj[\"i2\"] = 2;\n"
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
Name: evolution
|
||||
Version: 3.54.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Mail and calendar client for GNOME
|
||||
License: GPL-2.0-or-later AND GFDL-1.3-or-later
|
||||
URL: https://gitlab.gnome.org/GNOME/evolution/-/wikis/home
|
||||
|
|
@ -54,6 +54,9 @@ Source2: flatpak-evolution-wrapper.sh.in
|
|||
|
||||
# 0-99: General patches
|
||||
|
||||
# https://gitlab.gnome.org/GNOME/evolution/-/issues/3124
|
||||
Patch01: 0001-Fix-JavaScript-code-for-WebKitGTK-2.49.4.patch
|
||||
|
||||
# 100-199: Flatpak-specific patches
|
||||
# https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/144
|
||||
Patch100: configurable-dbus-prefix.patch
|
||||
|
|
@ -593,6 +596,9 @@ grep -v "%{_datadir}/locale" evolution.lang > help.lang
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Aug 29 2025 Milan Crha <mcrha@redhat.com> - 3.54.3-2
|
||||
- Add patch to fix JavaScript dictionary objects creation
|
||||
|
||||
* Tue Jan 07 2025 Milan Crha <mcrha@redhat.com> - 3.54.3-1
|
||||
- Update to 3.54.3
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue