aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2013-06-30 15:11:41 +0200
committerLars Magne Ingebrigtsen2013-06-30 15:11:41 +0200
commit2fae38e5f99f51a8b316e12bd4607a5ec10d5f88 (patch)
tree049ae13d7695a4347b38367030cc27d735c8089c
parenta47cbd64fa3565207417a49af9f3cfe1154b2f6e (diff)
downloademacs-2fae38e5f99f51a8b316e12bd4607a5ec10d5f88.tar.gz
emacs-2fae38e5f99f51a8b316e12bd4607a5ec10d5f88.zip
Fix shr table rendering infloop
* net/shr.el (shr-make-table-1): Add a sanity check that allows progression on degenerate tables. (shr-rescale-image): ImageMagick animated images currently doesn't work.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/shr.el6
2 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4100efc4d6d..4aa4f37a323 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12013-06-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * net/shr.el (shr-make-table-1): Add a sanity check that allows
4 progression on degenerate tables.
5 (shr-rescale-image): ImageMagick animated images currently doesn't
6 work.
7
12013-06-30 Juanma Barranquero <lekktu@gmail.com> 82013-06-30 Juanma Barranquero <lekktu@gmail.com>
2 9
3 Some fixes and improvements for desktop frame restoration. 10 Some fixes and improvements for desktop frame restoration.
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 490bea40afd..bdc30bc9292 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -762,6 +762,7 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
762 "Rescale DATA, if too big, to fit the current buffer. 762 "Rescale DATA, if too big, to fit the current buffer.
763If FORCE, rescale the image anyway." 763If FORCE, rescale the image anyway."
764 (if (or (not (fboundp 'imagemagick-types)) 764 (if (or (not (fboundp 'imagemagick-types))
765 (eq (image-type-from-data data) 'gif)
765 (not (get-buffer-window (current-buffer)))) 766 (not (get-buffer-window (current-buffer))))
766 (create-image data nil t :ascent 100) 767 (create-image data nil t :ascent 100)
767 (let ((edges (window-inside-pixel-edges 768 (let ((edges (window-inside-pixel-edges
@@ -1473,7 +1474,10 @@ ones, in case fg and bg are nil."
1473 (setq width 1474 (setq width
1474 (if column 1475 (if column
1475 (aref widths width-column) 1476 (aref widths width-column)
1476 0)) 1477 10))
1478 ;; Sanity check for degenerate tables.
1479 (when (zerop width)
1480 (setq width 10))
1477 (when (and fill 1481 (when (and fill
1478 (setq colspan (cdr (assq :colspan (cdr column))))) 1482 (setq colspan (cdr (assq :colspan (cdr column)))))
1479 (setq colspan (string-to-number colspan)) 1483 (setq colspan (string-to-number colspan))