import evolution-3.28.5-6.el8
This commit is contained in:
commit
3404a82a6b
1
.evolution.metadata
Normal file
1
.evolution.metadata
Normal file
@ -0,0 +1 @@
|
||||
4e88744b1ae02e2d49c220b2e981007eae701bb0 SOURCES/evolution-3.28.5.tar.xz
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/evolution-3.28.5.tar.xz
|
37
SOURCES/evolution-3.28.5-config-lookup-crash.patch
Normal file
37
SOURCES/evolution-3.28.5-config-lookup-crash.patch
Normal file
@ -0,0 +1,37 @@
|
||||
diff --git a/src/e-util/e-collection-account-wizard.c b/src/e-util/e-collection-account-wizard.c
|
||||
index 49b1ac4a96..84ccd3fd53 100644
|
||||
--- a/src/e-util/e-collection-account-wizard.c
|
||||
+++ b/src/e-util/e-collection-account-wizard.c
|
||||
@@ -1858,8 +1858,6 @@ collection_account_wizard_dispose (GObject *object)
|
||||
wizard->priv->store_passwords = NULL;
|
||||
}
|
||||
|
||||
- g_warn_if_fail (wizard->priv->running_result == NULL);
|
||||
-
|
||||
if (wizard->priv->running_result) {
|
||||
e_simple_async_result_complete_idle (wizard->priv->running_result);
|
||||
g_clear_object (&wizard->priv->running_result);
|
||||
diff --git a/src/e-util/e-config-lookup.c b/src/e-util/e-config-lookup.c
|
||||
index d0eff38ef2..3b68fa6876 100644
|
||||
--- a/src/e-util/e-config-lookup.c
|
||||
+++ b/src/e-util/e-config-lookup.c
|
||||
@@ -277,6 +277,11 @@ config_lookup_dispose (GObject *object)
|
||||
|
||||
e_config_lookup_cancel_all (config_lookup);
|
||||
|
||||
+ if (config_lookup->priv->pool) {
|
||||
+ g_thread_pool_free (config_lookup->priv->pool, TRUE, TRUE);
|
||||
+ config_lookup->priv->pool = NULL;
|
||||
+ }
|
||||
+
|
||||
g_mutex_lock (&config_lookup->priv->property_lock);
|
||||
|
||||
g_clear_object (&config_lookup->priv->run_cancellable);
|
||||
@@ -305,7 +310,6 @@ config_lookup_finalize (GObject *object)
|
||||
EConfigLookup *config_lookup = E_CONFIG_LOOKUP (object);
|
||||
|
||||
g_slist_free_full (config_lookup->priv->results, g_object_unref);
|
||||
- g_thread_pool_free (config_lookup->priv->pool, TRUE, FALSE);
|
||||
g_mutex_clear (&config_lookup->priv->property_lock);
|
||||
|
||||
/* Chain up to parent's method. */
|
46
SOURCES/evolution-3.28.5-deselect-task-memo-list.patch
Normal file
46
SOURCES/evolution-3.28.5-deselect-task-memo-list.patch
Normal file
@ -0,0 +1,46 @@
|
||||
diff -up evolution-3.28.5/src/modules/calendar/e-cal-base-shell-sidebar.c.deselect-task-memo-list evolution-3.28.5/src/modules/calendar/e-cal-base-shell-sidebar.c
|
||||
--- evolution-3.28.5/src/modules/calendar/e-cal-base-shell-sidebar.c.deselect-task-memo-list 2018-07-30 15:37:05.000000000 +0200
|
||||
+++ evolution-3.28.5/src/modules/calendar/e-cal-base-shell-sidebar.c 2018-10-01 12:20:09.864492453 +0200
|
||||
@@ -296,6 +296,7 @@ typedef struct _OpenClientData {
|
||||
ECalBaseShellSidebar *sidebar;
|
||||
ESource *source;
|
||||
EClient *client;
|
||||
+ gboolean was_cancelled;
|
||||
} OpenClientData;
|
||||
|
||||
static void
|
||||
@@ -304,9 +305,14 @@ open_client_data_free (gpointer pdata)
|
||||
OpenClientData *data = pdata;
|
||||
|
||||
if (data) {
|
||||
+ /* To free the cancellable in the 'value' pair, which is useless now */
|
||||
+ g_hash_table_insert (data->sidebar->priv->selected_uids,
|
||||
+ g_strdup (e_source_get_uid (data->source)),
|
||||
+ NULL);
|
||||
+
|
||||
if (data->client) {
|
||||
g_signal_emit (data->sidebar, signals[CLIENT_OPENED], 0, data->client);
|
||||
- } else {
|
||||
+ } else if (!data->was_cancelled) {
|
||||
ESourceSelector *selector = e_cal_base_shell_sidebar_get_selector (data->sidebar);
|
||||
e_source_selector_unselect_source (selector, data->source);
|
||||
}
|
||||
@@ -333,6 +339,7 @@ e_cal_base_shell_sidebar_open_client_thr
|
||||
selector = E_CLIENT_SELECTOR (e_cal_base_shell_sidebar_get_selector (data->sidebar));
|
||||
data->client = e_client_selector_get_client_sync (
|
||||
selector, data->source, TRUE, (guint32) -1, cancellable, &local_error);
|
||||
+ data->was_cancelled = g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
|
||||
|
||||
e_util_propagate_open_source_job_error (job_data, data->extension_name, local_error, error);
|
||||
}
|
||||
@@ -350,6 +357,10 @@ e_cal_base_shell_sidebar_ensure_source_o
|
||||
g_return_if_fail (E_IS_CAL_BASE_SHELL_SIDEBAR (sidebar));
|
||||
g_return_if_fail (E_IS_SOURCE (source));
|
||||
|
||||
+ /* Skip it when it's already opening or opened */
|
||||
+ if (g_hash_table_contains (sidebar->priv->selected_uids, e_source_get_uid (source)))
|
||||
+ return;
|
||||
+
|
||||
shell_view = e_shell_sidebar_get_shell_view (E_SHELL_SIDEBAR (sidebar));
|
||||
|
||||
switch (e_cal_base_shell_view_get_source_type (shell_view)) {
|
66
SOURCES/evolution-3.28.5-extra-new-line-before-url.patch
Normal file
66
SOURCES/evolution-3.28.5-extra-new-line-before-url.patch
Normal file
@ -0,0 +1,66 @@
|
||||
diff -up evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c.extra-new-line-before-url evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c
|
||||
--- evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c.extra-new-line-before-url 2018-09-03 15:40:14.491506323 +0200
|
||||
+++ evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c 2018-09-03 15:40:14.494506323 +0200
|
||||
@@ -1319,6 +1319,44 @@ test_issue_86 (TestFixture *fixture)
|
||||
g_free (converted);
|
||||
}
|
||||
|
||||
+static void
|
||||
+test_issue_103 (TestFixture *fixture)
|
||||
+{
|
||||
+ #define LONG_URL "https://www.example.com/123456789012345678901234567890123456789012345678901234567890"
|
||||
+ #define SHORTER_URL "https://www.example.com/1234567890123456789012345678901234567890"
|
||||
+ #define SHORT_URL "https://www.example.com/"
|
||||
+
|
||||
+ if (!test_utils_run_simple_test (fixture,
|
||||
+ "mode:plain\n"
|
||||
+ "type:before\\n"
|
||||
+ LONG_URL "\\n"
|
||||
+ "after\\n"
|
||||
+ "prefix text " SHORTER_URL " suffix\\n"
|
||||
+ "prefix " SHORT_URL " suffix\\n"
|
||||
+ "end\n",
|
||||
+ HTML_PREFIX "<div style=\"width: 71ch;\">before</div>"
|
||||
+ "<div style=\"width: 71ch;\"><a href=\"" LONG_URL "\">" LONG_URL "</a></div>"
|
||||
+ "<div style=\"width: 71ch;\">after</div>"
|
||||
+ "<div style=\"width: 71ch;\">prefix text <a href=\"" SHORTER_URL "\">" SHORTER_URL "</a> suffix</div>"
|
||||
+ "<div style=\"width: 71ch;\">prefix <a href=\"" SHORT_URL "\">" SHORT_URL "</a> suffix</div>"
|
||||
+ "<div style=\"width: 71ch;\">end</div>"
|
||||
+ HTML_SUFFIX,
|
||||
+ "before\n"
|
||||
+ LONG_URL "\n"
|
||||
+ "after\n"
|
||||
+ "prefix text \n"
|
||||
+ SHORTER_URL " suffix\n"
|
||||
+ "prefix " SHORT_URL " suffix\n"
|
||||
+ "end")) {
|
||||
+ g_test_fail ();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ #undef SHORT_URL
|
||||
+ #undef SHORTER_URL
|
||||
+ #undef LONG_URL
|
||||
+}
|
||||
+
|
||||
void
|
||||
test_add_html_editor_bug_tests (void)
|
||||
{
|
||||
@@ -1349,4 +1387,5 @@ test_add_html_editor_bug_tests (void)
|
||||
test_utils_add_test ("/bug/788829", test_bug_788829);
|
||||
test_utils_add_test ("/bug/750636", test_bug_750636);
|
||||
test_utils_add_test ("/issue/86", test_issue_86);
|
||||
+ test_utils_add_test ("/issue/103", test_issue_103);
|
||||
}
|
||||
diff -up evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c.extra-new-line-before-url evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
|
||||
--- evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c.extra-new-line-before-url 2018-09-03 15:40:14.493506323 +0200
|
||||
+++ evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 2018-09-03 15:40:14.496506323 +0200
|
||||
@@ -14089,7 +14089,7 @@ wrap_lines (EEditorPage *editor_page,
|
||||
|
||||
next_sibling = webkit_dom_node_get_next_sibling (node);
|
||||
/* If the anchor doesn't fit on the line, add it to a separate line. */
|
||||
- if ((line_length + anchor_length) > length_to_wrap) {
|
||||
+ if (line_length > 0 && (line_length + anchor_length) > length_to_wrap) {
|
||||
/* Put <BR> before the anchor, thus it starts on a new line */
|
||||
element = webkit_dom_document_create_element (document, "BR", NULL);
|
||||
element_add_class (element, "-x-evo-wrap-br");
|
338
SOURCES/evolution-3.28.5-mangled-deeper-html-quotes.patch
Normal file
338
SOURCES/evolution-3.28.5-mangled-deeper-html-quotes.patch
Normal file
@ -0,0 +1,338 @@
|
||||
diff -up evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c.mangled-deeper-html-quotes evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c
|
||||
--- evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c.mangled-deeper-html-quotes 2018-07-30 15:37:05.000000000 +0200
|
||||
+++ evolution-3.28.5/src/e-util/test-html-editor-units-bugs.c 2018-09-03 15:31:08.028513879 +0200
|
||||
@@ -1205,6 +1205,120 @@ test_bug_750636 (TestFixture *fixture)
|
||||
g_test_fail ();
|
||||
}
|
||||
|
||||
+static void
|
||||
+test_issue_86 (TestFixture *fixture)
|
||||
+{
|
||||
+ const gchar *source_text =
|
||||
+ "normal text\n"
|
||||
+ "\n"
|
||||
+ "> level 1\n"
|
||||
+ "> level 1\n"
|
||||
+ "> > level 2\n"
|
||||
+ "> > level 2\n"
|
||||
+ "> >\n"
|
||||
+ "> > level 2\n"
|
||||
+ ">\n"
|
||||
+ "> level 1\n"
|
||||
+ "> level 1\n"
|
||||
+ ">\n"
|
||||
+ "> > > level 3\n"
|
||||
+ "> > > level 3\n"
|
||||
+ ">\n"
|
||||
+ "> > level 2\n"
|
||||
+ "> > level 2\n"
|
||||
+ ">\n"
|
||||
+ "> level 1\n"
|
||||
+ "\n"
|
||||
+ "back normal text\n";
|
||||
+ gchar *converted, *to_insert;
|
||||
+
|
||||
+ if (!test_utils_process_commands (fixture,
|
||||
+ "mode:html\n")) {
|
||||
+ g_test_fail ();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ converted = camel_text_to_html (source_text,
|
||||
+ CAMEL_MIME_FILTER_TOHTML_PRE |
|
||||
+ CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS |
|
||||
+ CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES |
|
||||
+ CAMEL_MIME_FILTER_TOHTML_QUOTE_CITATION,
|
||||
+ 0xDDDDDD);
|
||||
+
|
||||
+ g_return_if_fail (converted != NULL);
|
||||
+
|
||||
+ to_insert = g_strconcat (converted,
|
||||
+ "<span class=\"-x-evo-to-body\" data-credits=\"On Today, User wrote:\"></span>"
|
||||
+ "<span class=\"-x-evo-cite-body\"></span>",
|
||||
+ NULL);
|
||||
+
|
||||
+ test_utils_insert_content (fixture, to_insert,
|
||||
+ E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
|
||||
+
|
||||
+ if (!test_utils_run_simple_test (fixture,
|
||||
+ "",
|
||||
+ HTML_PREFIX "<div>On Today, User wrote:</div>"
|
||||
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
|
||||
+ "<pre>normal text</pre>"
|
||||
+ "<pre><br></pre>"
|
||||
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
|
||||
+ "<pre>level 1</pre>"
|
||||
+ "<pre>level 1</pre>"
|
||||
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
|
||||
+ "<pre>level 2</pre>"
|
||||
+ "<pre>level 2</pre>"
|
||||
+ "<pre><br></pre>"
|
||||
+ "<pre>level 2</pre>"
|
||||
+ "</blockquote>"
|
||||
+ "<pre><br></pre>"
|
||||
+ "<pre>level 1</pre>"
|
||||
+ "<pre>level 1</pre>"
|
||||
+ "<pre><br></pre>"
|
||||
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
|
||||
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
|
||||
+ "<pre>level 3</pre>"
|
||||
+ "<pre>level 3</pre>"
|
||||
+ "</blockquote>"
|
||||
+ "</blockquote>"
|
||||
+ "<pre><br></pre>"
|
||||
+ "<blockquote type=\"cite\" " BLOCKQUOTE_STYLE ">"
|
||||
+ "<pre>level 2</pre>"
|
||||
+ "<pre>level 2</pre>"
|
||||
+ "</blockquote>"
|
||||
+ "<pre><br></pre>"
|
||||
+ "<pre>level 1</pre>"
|
||||
+ "</blockquote>"
|
||||
+ "<pre><br></pre>"
|
||||
+ "<pre>back normal text</pre>"
|
||||
+ "</blockquote>" HTML_SUFFIX,
|
||||
+ "On Today, User wrote:\n"
|
||||
+ "> normal text\n"
|
||||
+ "> \n"
|
||||
+ "> > level 1\n"
|
||||
+ "> > level 1\n"
|
||||
+ "> > > level 2\n"
|
||||
+ "> > > level 2\n"
|
||||
+ "> > > \n"
|
||||
+ "> > > level 2\n"
|
||||
+ "> > \n"
|
||||
+ "> > level 1\n"
|
||||
+ "> > level 1\n"
|
||||
+ "> > \n"
|
||||
+ "> > > > level 3\n"
|
||||
+ "> > > > level 3\n"
|
||||
+ "> > \n"
|
||||
+ "> > > level 2\n"
|
||||
+ "> > > level 2\n"
|
||||
+ "> > \n"
|
||||
+ "> > level 1\n"
|
||||
+ "> \n"
|
||||
+ "> back normal text"))
|
||||
+ g_test_fail ();
|
||||
+
|
||||
+ g_free (to_insert);
|
||||
+ g_free (converted);
|
||||
+}
|
||||
+
|
||||
void
|
||||
test_add_html_editor_bug_tests (void)
|
||||
{
|
||||
@@ -1234,4 +1348,5 @@ test_add_html_editor_bug_tests (void)
|
||||
test_utils_add_test ("/bug/780088", test_bug_780088);
|
||||
test_utils_add_test ("/bug/788829", test_bug_788829);
|
||||
test_utils_add_test ("/bug/750636", test_bug_750636);
|
||||
+ test_utils_add_test ("/issue/86", test_issue_86);
|
||||
}
|
||||
diff -up evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c.mangled-deeper-html-quotes evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
|
||||
--- evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c.mangled-deeper-html-quotes 2018-07-30 15:37:05.000000000 +0200
|
||||
+++ evolution-3.28.5/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 2018-09-03 15:32:41.220512591 +0200
|
||||
@@ -6230,7 +6230,6 @@ e_editor_dom_convert_content (EEditorPag
|
||||
WEBKIT_DOM_NODE (content_wrapper),
|
||||
WEBKIT_DOM_NODE (e_editor_dom_prepare_paragraph (editor_page, FALSE)),
|
||||
NULL);
|
||||
-
|
||||
if (!cite_body) {
|
||||
if (!empty) {
|
||||
WebKitDOMNode *child;
|
||||
@@ -8754,6 +8753,133 @@ adapt_to_editor_dom_changes (WebKitDOMDo
|
||||
g_clear_object (&collection);
|
||||
}
|
||||
|
||||
+static void
|
||||
+traverse_nodes_to_split_pre (WebKitDOMDocument *document,
|
||||
+ WebKitDOMNode *node,
|
||||
+ WebKitDOMNode *new_parent, /* can be NULL, then prepend to out_new_nodes */
|
||||
+ gboolean is_in_pre,
|
||||
+ GSList **out_new_nodes) /* WebKitDOMNode * */
|
||||
+{
|
||||
+ if (is_in_pre && WEBKIT_DOM_IS_TEXT (node)) {
|
||||
+ gchar *text;
|
||||
+
|
||||
+ text = webkit_dom_text_get_whole_text (WEBKIT_DOM_TEXT (node));
|
||||
+ if (text) {
|
||||
+ WebKitDOMElement *pre;
|
||||
+ gint ii;
|
||||
+ gchar **strv;
|
||||
+
|
||||
+ strv = g_strsplit (text, "\n", -1);
|
||||
+
|
||||
+ for (ii = 0; strv && strv[ii]; ii++) {
|
||||
+ if (*(strv[ii])) {
|
||||
+ gint len = strlen (strv[ii]);
|
||||
+
|
||||
+ if (strv[ii][len - 1] == '\r') {
|
||||
+ strv[ii][len - 1] = '\0';
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* <pre> is shown as a block, thus adding a new line at the end behaves like two <br>-s */
|
||||
+ if (!*(strv[ii]) && !strv[ii + 1])
|
||||
+ break;
|
||||
+
|
||||
+ pre = webkit_dom_document_create_element (document, "pre", NULL);
|
||||
+
|
||||
+ if (*(strv[ii])) {
|
||||
+ webkit_dom_html_element_set_inner_text (WEBKIT_DOM_HTML_ELEMENT (pre), strv[ii], NULL);
|
||||
+ } else {
|
||||
+ WebKitDOMElement *br;
|
||||
+
|
||||
+ br = webkit_dom_document_create_element (document, "br", NULL);
|
||||
+ webkit_dom_node_append_child (WEBKIT_DOM_NODE (pre), WEBKIT_DOM_NODE (br), NULL);
|
||||
+ }
|
||||
+
|
||||
+ if (new_parent)
|
||||
+ webkit_dom_node_append_child (new_parent, WEBKIT_DOM_NODE (pre), NULL);
|
||||
+ else
|
||||
+ *out_new_nodes = g_slist_prepend (*out_new_nodes, pre);
|
||||
+ }
|
||||
+
|
||||
+ g_strfreev (strv);
|
||||
+ }
|
||||
+
|
||||
+ g_free (text);
|
||||
+ } else if (WEBKIT_DOM_IS_HTML_PRE_ELEMENT (node)) {
|
||||
+ is_in_pre = TRUE;
|
||||
+ } else {
|
||||
+ WebKitDOMNode *nd;
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ nd = webkit_dom_node_clone_node_with_error (node, FALSE, &error);
|
||||
+ if (nd) {
|
||||
+ if (new_parent)
|
||||
+ webkit_dom_node_append_child (new_parent, nd, NULL);
|
||||
+ else
|
||||
+ *out_new_nodes = g_slist_prepend (*out_new_nodes, nd);
|
||||
+
|
||||
+ new_parent = nd;
|
||||
+ } else {
|
||||
+ g_warning ("%s: Failed to clone node %s: %s\n", G_STRFUNC, G_OBJECT_TYPE_NAME (node), error ? error->message : "Unknown error");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (node = webkit_dom_node_get_first_child (node);
|
||||
+ node;
|
||||
+ node = webkit_dom_node_get_next_sibling (node)) {
|
||||
+ traverse_nodes_to_split_pre (document, node, new_parent, is_in_pre, out_new_nodes);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+maybe_split_pre_paragraphs (WebKitDOMDocument *document)
|
||||
+{
|
||||
+ WebKitDOMHTMLElement *body;
|
||||
+ WebKitDOMNodeList *list;
|
||||
+
|
||||
+ body = webkit_dom_document_get_body (document);
|
||||
+ if (!body)
|
||||
+ return;
|
||||
+
|
||||
+ list = webkit_dom_document_query_selector_all (document, "pre", NULL);
|
||||
+ if (webkit_dom_node_list_get_length (list)) {
|
||||
+ WebKitDOMNode *body_node, *node, *current;
|
||||
+ GSList *new_nodes = NULL, *to_remove = NULL, *link;
|
||||
+
|
||||
+ g_clear_object (&list);
|
||||
+
|
||||
+ body_node = WEBKIT_DOM_NODE (body);
|
||||
+ webkit_dom_node_normalize (body_node);
|
||||
+
|
||||
+ for (current = webkit_dom_node_get_first_child (body_node);
|
||||
+ current;
|
||||
+ current = webkit_dom_node_get_next_sibling (current)) {
|
||||
+ traverse_nodes_to_split_pre (document, current, NULL, FALSE, &new_nodes);
|
||||
+ to_remove = g_slist_prepend (to_remove, current);
|
||||
+ }
|
||||
+
|
||||
+ for (link = to_remove; link; link = g_slist_next (link)) {
|
||||
+ node = link->data;
|
||||
+
|
||||
+ webkit_dom_node_remove_child (body_node, node, NULL);
|
||||
+ }
|
||||
+
|
||||
+ /* They are in reverse order, thus reverse it */
|
||||
+ new_nodes = g_slist_reverse (new_nodes);
|
||||
+
|
||||
+ for (link = new_nodes; link; link = g_slist_next (link)) {
|
||||
+ node = link->data;
|
||||
+
|
||||
+ webkit_dom_node_append_child (body_node, node, NULL);
|
||||
+ }
|
||||
+
|
||||
+ g_slist_free (to_remove);
|
||||
+ g_slist_free (new_nodes);
|
||||
+ }
|
||||
+
|
||||
+ g_clear_object (&list);
|
||||
+}
|
||||
+
|
||||
void
|
||||
e_editor_dom_process_content_after_load (EEditorPage *editor_page)
|
||||
{
|
||||
@@ -8803,60 +8929,8 @@ e_editor_dom_process_content_after_load
|
||||
}
|
||||
|
||||
goto out;
|
||||
- } else {
|
||||
- WebKitDOMNodeList *list;
|
||||
- gulong ii;
|
||||
-
|
||||
- list = webkit_dom_document_query_selector_all (document, "pre", NULL);
|
||||
- for (ii = webkit_dom_node_list_get_length (list); ii--;) {
|
||||
- WebKitDOMNode *node = webkit_dom_node_list_item (list, ii), *parent;
|
||||
- WebKitDOMElement *element;
|
||||
- gchar *inner_html;
|
||||
-
|
||||
- element = WEBKIT_DOM_ELEMENT (node);
|
||||
- parent = webkit_dom_node_get_parent_node (node);
|
||||
- inner_html = webkit_dom_element_get_inner_html (element);
|
||||
-
|
||||
- if (inner_html && *inner_html) {
|
||||
- gchar **strv;
|
||||
-
|
||||
- strv = g_strsplit (inner_html, "\n", -1);
|
||||
- if (strv && strv[0] && strv[1]) {
|
||||
- WebKitDOMElement *pre;
|
||||
- gint jj;
|
||||
-
|
||||
- for (jj = 0; strv[jj]; jj++) {
|
||||
- pre = webkit_dom_document_create_element (document, "pre", NULL);
|
||||
- if (*(strv[jj])) {
|
||||
- gint len = strlen (strv[jj]);
|
||||
-
|
||||
- if (strv[jj][len - 1] == '\r') {
|
||||
- strv[jj][len - 1] = '\0';
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (*(strv[jj])) {
|
||||
- webkit_dom_html_element_set_inner_html (WEBKIT_DOM_HTML_ELEMENT (pre), strv[jj], NULL);
|
||||
- } else {
|
||||
- WebKitDOMElement *br;
|
||||
-
|
||||
- br = webkit_dom_document_create_element (document, "br", NULL);
|
||||
- webkit_dom_node_append_child (WEBKIT_DOM_NODE (pre), WEBKIT_DOM_NODE (br), NULL);
|
||||
- }
|
||||
-
|
||||
- webkit_dom_node_insert_before (parent, WEBKIT_DOM_NODE (pre), node, NULL);
|
||||
- }
|
||||
-
|
||||
- remove_node (node);
|
||||
- }
|
||||
-
|
||||
- g_strfreev (strv);
|
||||
- }
|
||||
-
|
||||
- g_free (inner_html);
|
||||
- }
|
||||
-
|
||||
- g_clear_object (&list);
|
||||
+ } else if (!webkit_dom_element_has_attribute (WEBKIT_DOM_ELEMENT (body), "data-evo-draft")) {
|
||||
+ maybe_split_pre_paragraphs (document);
|
||||
}
|
||||
|
||||
adapt_to_editor_dom_changes (document);
|
3298
SPECS/evolution.spec
Normal file
3298
SPECS/evolution.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user