From: joakim@verona.se
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 22465@debbugs.gnu.org
Subject: bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional
Date: Fri, 13 May 2016 10:05:16 +0200 [thread overview]
Message-ID: <m3twi2mlhf.fsf@exodia.verona.se> (raw)
In-Reply-To: <572E8699.5090209@cs.ucla.edu> (Paul Eggert's message of "Sat, 7 May 2016 17:21:45 -0700")
Paul Eggert <eggert@cs.ucla.edu> writes:
> joakim@verona.se wrote:
>> Perhaps someone still prefers the 'image method though.
>
> This seems unlikely, given that it recurses infinitely whenever it scrolls left
> or right. Anyway, thanks for following up. If nobody objects I would like to
> install the attached patch to emacs-25 to remove xwidget-webkit-scroll-behavior
> and therefore fix the bug.
I agree, please install this fix.
>
> From 58b7ecc4bcba46c775a7edca209587f034185861 Mon Sep 17 00:00:00 2001
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Sat, 7 May 2016 17:17:55 -0700
> Subject: [PATCH] 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.
> ---
> lisp/xwidget.el | 43 +++++++++----------------------------------
> 1 file changed, 9 insertions(+), 34 deletions(-)
>
> diff --git a/lisp/xwidget.el b/lisp/xwidget.el
> index 19f631f..7a0ca8b 100644
> --- a/lisp/xwidget.el
> +++ b/lisp/xwidget.el
> @@ -34,13 +34,6 @@
> (require 'cl-lib)
> (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"
> (type title width height arguments &optional buffer))
> (declare-function xwidget-set-adjustment "xwidget.c"
> @@ -141,40 +134,24 @@ xwidget-webkit-mode-map
> "Keymap for `xwidget-webkit-mode'.")
>
> (defun xwidget-webkit-scroll-up ()
> - "Scroll webkit up.
> -Depending on the value of `xwidget-webkit-scroll-behavior',
> -this scrolls in `native' fashion, or like `image-mode' would."
> + "Scroll webkit up."
> (interactive)
> - (if (eq xwidget-webkit-scroll-behavior 'native)
> - (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50)
> - (image-scroll-up)))
> + (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50))
>
> (defun xwidget-webkit-scroll-down ()
> - "Scroll webkit down.
> -Depending on the value of `xwidget-webkit-scroll-behavior',
> -this scrolls in `native' fashion, or like `image-mode' would."
> + "Scroll webkit down."
> (interactive)
> - (if (eq xwidget-webkit-scroll-behavior 'native)
> - (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50)
> - (image-scroll-down)))
> + (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50))
>
> (defun xwidget-webkit-scroll-forward ()
> - "Scroll webkit forwards.
> -Depending on the value of `xwidget-webkit-scroll-behavior',
> -this scrolls in `native' fashion, or like `image-mode' would."
> + "Scroll webkit forwards."
> (interactive)
> - (if (eq xwidget-webkit-scroll-behavior 'native)
> - (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)
> - (xwidget-webkit-scroll-forward))) ; FIXME infloop!
> + (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50))
>
> (defun xwidget-webkit-scroll-backward ()
> - "Scroll webkit backwards.
> -Depending on the value of `xwidget-webkit-scroll-behavior',
> -this scrolls in `native' fashion, or like `image-mode' would."
> + "Scroll webkit backwards."
> (interactive)
> - (if (eq xwidget-webkit-scroll-behavior 'native)
> - (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)
> - (xwidget-webkit-scroll-backward))) ; FIXME infloop!
> + (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50))
>
>
> ;; The xwidget event needs to go into a higher level handler
> @@ -417,9 +394,7 @@ xwidget-webkit-adjust-size-to-content
> (defun xwidget-webkit-adjust-size-dispatch ()
> "Adjust size according to mode."
> (interactive)
> - (if (eq xwidget-webkit-scroll-behavior 'native)
> - (xwidget-webkit-adjust-size-to-window)
> - (xwidget-webkit-adjust-size-to-content))
> + (xwidget-webkit-adjust-size-to-window)
> ;; The recenter is intended to correct a visual glitch.
> ;; It errors out if the buffer isn't visible, but then we don't get
> ;; the glitch, so silence errors.
--
Joakim Verona
next prev parent reply other threads:[~2016-05-13 8:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 23:19 bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional Glenn Morris
2016-05-06 5:48 ` Paul Eggert
2016-05-06 15:42 ` Glenn Morris
2016-05-06 17:50 ` joakim
2016-05-08 0:21 ` Paul Eggert
2016-05-13 8:05 ` joakim [this message]
2016-05-13 16:53 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3twi2mlhf.fsf@exodia.verona.se \
--to=joakim@verona.se \
--cc=22465@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.