Subject: bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional

From: Paul Eggert <[email-masked]>
Date: Thu, 5 May 2016 22:48:00 -0700

Attached is a proposed patch for this bug. It is not fancy, but it works for me.
From 879895ad058294eb49d8372ef5dbf053973e45b9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Thu, 5 May 2016 22:44:16 -0700
Subject: [PATCH] Fix xwidget-webkit-scroll-forward infloop
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/xwidget.el (xwidget-webkit-scroll-forward)
(xwidget-webkit-scroll-backward): Don’t loop if
xwidget-webkit-scroll-behavior’s value is ‘image’ (Bug#22465).
---
 lisp/xwidget.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index 19f631f..d64237a 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -165,7 +165,7 @@ xwidget-webkit-scroll-forward
   (interactive)
   (if (eq xwidget-webkit-scroll-behavior 'native)
       (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)
-    (xwidget-webkit-scroll-forward)))   ; FIXME infloop!
+    (image-forward-hscroll 5)))
 
 (defun xwidget-webkit-scroll-backward ()
   "Scroll webkit backwards.
@@ -174,7 +174,7 @@ xwidget-webkit-scroll-backward
   (interactive)
   (if (eq xwidget-webkit-scroll-behavior 'native)
       (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)
-    (xwidget-webkit-scroll-backward))) ; FIXME infloop!
+    (image-backward-hscroll 5)))

 ;; The xwidget event needs to go into a higher level handler
-- 
2.7.4