[geary/geary-0.11] Fix 0px elements being rendered as 1px boxes.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/geary-0.11] Fix 0px elements being rendered as 1px boxes.
- Date: Sun, 14 Aug 2016 07:26:07 +0000 (UTC)
commit c5b1c5efd57ff892488a371727055ed859b5a607
Author: Michael James Gratton <mike vee net>
Date: Sun Aug 14 13:38:26 2016 +1000
Fix 0px elements being rendered as 1px boxes.
.../conversation-viewer/conversation-viewer.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala
b/src/client/conversation-viewer/conversation-viewer.vala
index 6605478..1659f3b 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -1495,7 +1495,11 @@ public class ConversationViewer : Gtk.Box {
continue;
string src = element.get_attribute("src");
- if (!web_view.is_always_loaded(src)) {
+ // Don't prefix empty src strings since it will
+ // cause e.g. 0px images (commonly found in
+ // commercial mailouts) to be rendered as broken
+ // images instead of empty elements.
+ if (src.length > 0 && !web_view.is_always_loaded(src)) {
// Workaround a WebKitGTK+ 2.4.10 crash. See Bug 763933
element.remove_attribute("src");
element.set_attribute("src", web_view.allow_prefix + src);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]