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.
This commit is contained in:
parent
9c2a1a264c
commit
edae7d93ed
1 changed files with 9 additions and 34 deletions
|
@ -34,13 +34,6 @@
|
||||||
(require 'cl-lib)
|
(require 'cl-lib)
|
||||||
(require 'bookmark)
|
(require 'bookmark)
|
||||||
|
|
||||||
(defcustom xwidget-webkit-scroll-behavior 'native
|
|
||||||
"Scrolling behavior of the webkit instance.
|
|
||||||
The possible values are: `native' or `image'."
|
|
||||||
:version "25.1"
|
|
||||||
:group 'frames ; TODO add xwidgets group if more options are added
|
|
||||||
:type '(choice (const native) (const image)))
|
|
||||||
|
|
||||||
(declare-function make-xwidget "xwidget.c"
|
(declare-function make-xwidget "xwidget.c"
|
||||||
(type title width height arguments &optional buffer))
|
(type title width height arguments &optional buffer))
|
||||||
(declare-function xwidget-set-adjustment "xwidget.c"
|
(declare-function xwidget-set-adjustment "xwidget.c"
|
||||||
|
@ -141,40 +134,24 @@ Interactively, URL defaults to the string looking like a url around point."
|
||||||
"Keymap for `xwidget-webkit-mode'.")
|
"Keymap for `xwidget-webkit-mode'.")
|
||||||
|
|
||||||
(defun xwidget-webkit-scroll-up ()
|
(defun xwidget-webkit-scroll-up ()
|
||||||
"Scroll webkit up.
|
"Scroll webkit up."
|
||||||
Depending on the value of `xwidget-webkit-scroll-behavior',
|
|
||||||
this scrolls in `native' fashion, or like `image-mode' would."
|
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
(xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50))
|
||||||
(xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50)
|
|
||||||
(image-scroll-up)))
|
|
||||||
|
|
||||||
(defun xwidget-webkit-scroll-down ()
|
(defun xwidget-webkit-scroll-down ()
|
||||||
"Scroll webkit down.
|
"Scroll webkit down."
|
||||||
Depending on the value of `xwidget-webkit-scroll-behavior',
|
|
||||||
this scrolls in `native' fashion, or like `image-mode' would."
|
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
(xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50))
|
||||||
(xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50)
|
|
||||||
(image-scroll-down)))
|
|
||||||
|
|
||||||
(defun xwidget-webkit-scroll-forward ()
|
(defun xwidget-webkit-scroll-forward ()
|
||||||
"Scroll webkit forwards.
|
"Scroll webkit forwards."
|
||||||
Depending on the value of `xwidget-webkit-scroll-behavior',
|
|
||||||
this scrolls in `native' fashion, or like `image-mode' would."
|
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
(xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50))
|
||||||
(xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)
|
|
||||||
(xwidget-webkit-scroll-forward))) ; FIXME infloop!
|
|
||||||
|
|
||||||
(defun xwidget-webkit-scroll-backward ()
|
(defun xwidget-webkit-scroll-backward ()
|
||||||
"Scroll webkit backwards.
|
"Scroll webkit backwards."
|
||||||
Depending on the value of `xwidget-webkit-scroll-behavior',
|
|
||||||
this scrolls in `native' fashion, or like `image-mode' would."
|
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
(xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50))
|
||||||
(xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)
|
|
||||||
(xwidget-webkit-scroll-backward))) ; FIXME infloop!
|
|
||||||
|
|
||||||
|
|
||||||
;; The xwidget event needs to go into a higher level handler
|
;; The xwidget event needs to go into a higher level handler
|
||||||
|
@ -417,9 +394,7 @@ For example, use this to display an anchor."
|
||||||
(defun xwidget-webkit-adjust-size-dispatch ()
|
(defun xwidget-webkit-adjust-size-dispatch ()
|
||||||
"Adjust size according to mode."
|
"Adjust size according to mode."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (eq xwidget-webkit-scroll-behavior 'native)
|
(xwidget-webkit-adjust-size-to-window)
|
||||||
(xwidget-webkit-adjust-size-to-window)
|
|
||||||
(xwidget-webkit-adjust-size-to-content))
|
|
||||||
;; The recenter is intended to correct a visual glitch.
|
;; The recenter is intended to correct a visual glitch.
|
||||||
;; It errors out if the buffer isn't visible, but then we don't get
|
;; It errors out if the buffer isn't visible, but then we don't get
|
||||||
;; the glitch, so silence errors.
|
;; the glitch, so silence errors.
|
||||||
|
|
Loading…
Add table
Reference in a new issue