From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.bugs Subject: bug#22465: xwidget-webkit-scroll-behaviour = image is non-functional Date: Fri, 13 May 2016 10:05:16 +0200 Message-ID: References: <572C3010.6080604@cs.ucla.edu> <572E8699.5090209@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1463422886 3420 80.91.229.3 (16 May 2016 18:21:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 May 2016 18:21:26 +0000 (UTC) Cc: 22465@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 16 20:21:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b2N8k-0003ry-70 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 May 2016 20:21:14 +0200 Original-Received: from localhost ([::1]:46379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2N8j-0005DY-D1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 May 2016 14:21:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2N8e-00057s-AY for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 14:21:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2N8Z-000098-8R for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 14:21:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2N8Y-00008m-L7 for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 14:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b2N8Y-0003R0-Gw for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 14:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: joakim@verona.se Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 May 2016 18:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22465 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22465-submit@debbugs.gnu.org id=B22465.146342282013128 (code B ref 22465); Mon, 16 May 2016 18:21:02 +0000 Original-Received: (at 22465) by debbugs.gnu.org; 16 May 2016 18:20:20 +0000 Original-Received: from localhost ([127.0.0.1]:54227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2N7r-0003Pf-R8 for submit@debbugs.gnu.org; Mon, 16 May 2016 14:20:20 -0400 Original-Received: from mx1.bahnhof.se ([213.80.101.11]:26624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2N7p-0003PX-OY for 22465@debbugs.gnu.org; Mon, 16 May 2016 14:20:18 -0400 Original-Received: from localhost (mf.bahnhof.se [213.80.101.20]) by mx1-reinject (Postfix) with ESMTP id F0CC640D3B; Fri, 13 May 2016 10:08:08 +0200 (CEST) X-Virus-Scanned: by amavisd-new using ClamAV at bahnhof.se (MF4) Original-Received: from mf4.bahnhof.se ([127.0.0.1]) by localhost (mf4.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NbPd-C2xFL4M; Fri, 13 May 2016 10:08:02 +0200 (CEST) Original-Received: from mta.verona.se (h-235-62.a149.priv.bahnhof.se [85.24.235.62]) by mf4.bahnhof.se (Postfix) with ESMTP id 35D493D7972; Fri, 13 May 2016 10:05:32 +0200 (CEST) Original-Received: from localhost (unknown [127.0.0.1]) by mta.verona.se (Postfix) with ESMTP id 84A514F1778; Fri, 13 May 2016 08:05:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at verona.se Original-Received: from mta.verona.se ([127.0.0.1]) by localhost (exodia.verona.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZLQfbLydGKEe; Fri, 13 May 2016 10:05:17 +0200 (CEST) Original-Received: from exodia.verona.se (www.verona.se [192.168.200.15]) by mta.verona.se (Postfix) with ESMTP id EAEF44F1777; Fri, 13 May 2016 10:05:16 +0200 (CEST) In-Reply-To: <572E8699.5090209@cs.ucla.edu> (Paul Eggert's message of "Sat, 7 May 2016 17:21:45 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118307 Archived-At: Paul Eggert 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 > 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