diff options
| author | Paul Eggert | 2016-05-13 09:51:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-13 09:52:43 -0700 |
| commit | edae7d93ed509aa8a7db3952c70550cf3353d169 (patch) | |
| tree | 73bc3d8aa30b657f7ca201c99bae92209967f86c | |
| parent | 9c2a1a264cf418fcf187b95b49fe986b32ceabef (diff) | |
| download | emacs-edae7d93ed509aa8a7db3952c70550cf3353d169.tar.gz emacs-edae7d93ed509aa8a7db3952c70550cf3353d169.zip | |
Remove buggy non-native image scrolling
This never worked, and could cause infinite recursion.
Problem reported by Glenn Morris (Bug#22465).
* lisp/xwidget.el (xwidget-webkit-scroll-behavior): Remove.
All uses removed.
| -rw-r--r-- | lisp/xwidget.el | 43 |
1 files changed, 9 insertions, 34 deletions
diff --git a/lisp/xwidget.el b/lisp/xwidget.el index 19f631f17f3..7a0ca8bd551 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el | |||
| @@ -34,13 +34,6 @@ | |||
| 34 | (require 'cl-lib) | 34 | (require 'cl-lib) |
| 35 | (require 'bookmark) | 35 | (require 'bookmark) |
| 36 | 36 | ||
| 37 | (defcustom xwidget-webkit-scroll-behavior 'native | ||
| 38 | "Scrolling behavior of the webkit instance. | ||
| 39 | The possible values are: `native' or `image'." | ||
| 40 | :version "25.1" | ||
| 41 | :group 'frames ; TODO add xwidgets group if more options are added | ||
| 42 | :type '(choice (const native) (const image))) | ||
| 43 | |||
| 44 | (declare-function make-xwidget "xwidget.c" | 37 | (declare-function make-xwidget "xwidget.c" |
| 45 | (type title width height arguments &optional buffer)) | 38 | (type title width height arguments &optional buffer)) |
| 46 | (declare-function xwidget-set-adjustment "xwidget.c" | 39 | (declare-function xwidget-set-adjustment "xwidget.c" |
| @@ -141,40 +134,24 @@ Interactively, URL defaults to the string looking like a url around point." | |||
| 141 | "Keymap for `xwidget-webkit-mode'.") | 134 | "Keymap for `xwidget-webkit-mode'.") |
| 142 | 135 | ||
| 143 | (defun xwidget-webkit-scroll-up () | 136 | (defun xwidget-webkit-scroll-up () |
| 144 | "Scroll webkit up. | 137 | "Scroll webkit up." |
| 145 | Depending on the value of `xwidget-webkit-scroll-behavior', | ||
| 146 | this scrolls in `native' fashion, or like `image-mode' would." | ||
| 147 | (interactive) | 138 | (interactive) |
| 148 | (if (eq xwidget-webkit-scroll-behavior 'native) | 139 | (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50)) |
| 149 | (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50) | ||
| 150 | (image-scroll-up))) | ||
| 151 | 140 | ||
| 152 | (defun xwidget-webkit-scroll-down () | 141 | (defun xwidget-webkit-scroll-down () |
| 153 | "Scroll webkit down. | 142 | "Scroll webkit down." |
| 154 | Depending on the value of `xwidget-webkit-scroll-behavior', | ||
| 155 | this scrolls in `native' fashion, or like `image-mode' would." | ||
| 156 | (interactive) | 143 | (interactive) |
| 157 | (if (eq xwidget-webkit-scroll-behavior 'native) | 144 | (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50)) |
| 158 | (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50) | ||
| 159 | (image-scroll-down))) | ||
| 160 | 145 | ||
| 161 | (defun xwidget-webkit-scroll-forward () | 146 | (defun xwidget-webkit-scroll-forward () |
| 162 | "Scroll webkit forwards. | 147 | "Scroll webkit forwards." |
| 163 | Depending on the value of `xwidget-webkit-scroll-behavior', | ||
| 164 | this scrolls in `native' fashion, or like `image-mode' would." | ||
| 165 | (interactive) | 148 | (interactive) |
| 166 | (if (eq xwidget-webkit-scroll-behavior 'native) | 149 | (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)) |
| 167 | (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) | ||
| 168 | (xwidget-webkit-scroll-forward))) ; FIXME infloop! | ||
| 169 | 150 | ||
| 170 | (defun xwidget-webkit-scroll-backward () | 151 | (defun xwidget-webkit-scroll-backward () |
| 171 | "Scroll webkit backwards. | 152 | "Scroll webkit backwards." |
| 172 | Depending on the value of `xwidget-webkit-scroll-behavior', | ||
| 173 | this scrolls in `native' fashion, or like `image-mode' would." | ||
| 174 | (interactive) | 153 | (interactive) |
| 175 | (if (eq xwidget-webkit-scroll-behavior 'native) | 154 | (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)) |
| 176 | (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) | ||
| 177 | (xwidget-webkit-scroll-backward))) ; FIXME infloop! | ||
| 178 | 155 | ||
| 179 | 156 | ||
| 180 | ;; The xwidget event needs to go into a higher level handler | 157 | ;; The xwidget event needs to go into a higher level handler |
| @@ -417,9 +394,7 @@ For example, use this to display an anchor." | |||
| 417 | (defun xwidget-webkit-adjust-size-dispatch () | 394 | (defun xwidget-webkit-adjust-size-dispatch () |
| 418 | "Adjust size according to mode." | 395 | "Adjust size according to mode." |
| 419 | (interactive) | 396 | (interactive) |
| 420 | (if (eq xwidget-webkit-scroll-behavior 'native) | 397 | (xwidget-webkit-adjust-size-to-window) |
| 421 | (xwidget-webkit-adjust-size-to-window) | ||
| 422 | (xwidget-webkit-adjust-size-to-content)) | ||
| 423 | ;; The recenter is intended to correct a visual glitch. | 398 | ;; The recenter is intended to correct a visual glitch. |
| 424 | ;; It errors out if the buffer isn't visible, but then we don't get | 399 | ;; It errors out if the buffer isn't visible, but then we don't get |
| 425 | ;; the glitch, so silence errors. | 400 | ;; the glitch, so silence errors. |