all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH v2 00/15] xwidget webkit improvements
@ 2016-10-24 16:39 Ricardo Wurmus
  0 siblings, 0 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2016-10-24 16:39 UTC (permalink / raw)
  To: emacs-devel; +Cc: Ricardo Wurmus

Hello again, readers of emacs-devel!

I was informed that my copyright assignment for Emacs is now complete,
so I revisited my patches for the xwidget feature.  This replaces my
previous patch set with Message-Id: <20160921115018.29576-1-rekado@elephly.net>.

As before, the first patch in this series adjusts the code such that
the WebKit2 API is used, which allows users to build Emacs with the
latest version of WebKit(2)Gtk.  Due to process separation in
WebKit2Gtk, scrolling the WebKit widget is achieved using JavaScript,
and JavaScript evaluation now happens asynchronously.

The remaining patches add features such as automatic resizing of the
WebKit widget, new keybindings, and zoom.

~~ Ricardo


Ricardo Wurmus (15):
  xwidget: Use WebKit2 API
  xwidget: Pass JavaScript return value to optional callback procedure
  Remove scrolled window container around WebKit widget
  xwidget: Do not use `xwidget-execute-script-rv' to insert string
  xwidget: Get title via asynchronous JavaScript.
  xwidget: Simplify functions to scroll to elements
  xwidget: Add function to find element by CSS selector
  xwidget: Get selection with asynchronous JavaScript
  xwidget: Get URL asynchronously.
  xwidget: Remove title hack.
  Let initial WebKit view fill window
  Dynamically resize WebKit widget.
  Implement zoom for WebKit widget.
  xwidget: Bind "beginning-of-buffer" and "end-of-buffer"
  xwidget: Map "previous-line" and "next-line" to scroll

 configure.ac    |   4 +-
 lisp/xwidget.el | 311 ++++++++++++++++++++++-----------------
 src/xwidget.c   | 445 ++++++++++++++++++++++++++++++++------------------------
 src/xwidget.h   |   3 -
 4 files changed, 434 insertions(+), 329 deletions(-)

-- 
2.10.1





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 00/15] xwidget webkit improvements
@ 2016-10-24 16:40 Ricardo Wurmus
  2016-10-25 15:30 ` Paul Eggert
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Wurmus @ 2016-10-24 16:40 UTC (permalink / raw)
  To: emacs-devel; +Cc: Ricardo Wurmus

Hello again, readers of emacs-devel!

I was informed that my copyright assignment for Emacs is now complete,
so I revisited my patches for the xwidget feature.  This replaces my
previous patch set with Message-Id: <20160921115018.29576-1-rekado@elephly.net>.

As before, the first patch in this series adjusts the code such that
the WebKit2 API is used, which allows users to build Emacs with the
latest version of WebKit(2)Gtk.  Due to process separation in
WebKit2Gtk, scrolling the WebKit widget is achieved using JavaScript,
and JavaScript evaluation now happens asynchronously.

The remaining patches add features such as automatic resizing of the
WebKit widget, new keybindings, and zoom.

~~ Ricardo


Ricardo Wurmus (15):
  xwidget: Use WebKit2 API
  xwidget: Pass JavaScript return value to optional callback procedure
  Remove scrolled window container around WebKit widget
  xwidget: Do not use `xwidget-execute-script-rv' to insert string
  xwidget: Get title via asynchronous JavaScript.
  xwidget: Simplify functions to scroll to elements
  xwidget: Add function to find element by CSS selector
  xwidget: Get selection with asynchronous JavaScript
  xwidget: Get URL asynchronously.
  xwidget: Remove title hack.
  Let initial WebKit view fill window
  Dynamically resize WebKit widget.
  Implement zoom for WebKit widget.
  xwidget: Bind "beginning-of-buffer" and "end-of-buffer"
  xwidget: Map "previous-line" and "next-line" to scroll

 configure.ac    |   4 +-
 lisp/xwidget.el | 311 ++++++++++++++++++++++-----------------
 src/xwidget.c   | 445 ++++++++++++++++++++++++++++++++------------------------
 src/xwidget.h   |   3 -
 4 files changed, 434 insertions(+), 329 deletions(-)

-- 
2.10.1





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 00/15] xwidget webkit improvements
  2016-10-24 16:40 Ricardo Wurmus
@ 2016-10-25 15:30 ` Paul Eggert
  2016-10-26  5:12   ` Ricardo Wurmus
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggert @ 2016-10-25 15:30 UTC (permalink / raw)
  To: Ricardo Wurmus, emacs-devel

Thanks. I tried that on Fedora 24 x86-64, and got the following 
diagnostic when using M-x xwidget-webkit-browse-url to visit 
http://cs.ucla.edu.

(emacs:22840): Gtk-WARNING **: Allocating size to GtkOffscreenWindow 
0xd5b6d0 without calling gtk_widget_get_preferred_width/height(). How 
does the code know the size to allocate?

Is this something I should worry about?

A couple of minor things. First, in patch "Dynamically resize WebKit 
widget", this commit-message line exceeds 78 chars:

(xwidget-webkit-adjust-size-to-window): Make non-interactive, add widget and window as arguments.

so "git am" rejected it here. To help prevent this sort of problem in 
the future, run "./autogen.sh git". (72 chars or less is nice, so that 
ChangeLog lines fit in 80 columns.)

Second, in the patch "xwidget: Pass JavaScript return value to optional 
callback procedure" the new function webkit_js_to_lisp should be static. 
To catch this sort of thing in the future, use the --enable-gcc-warnings 
option to 'configure'.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 00/15] xwidget webkit improvements
  2016-10-25 15:30 ` Paul Eggert
@ 2016-10-26  5:12   ` Ricardo Wurmus
  2016-10-26  6:08     ` Paul Eggert
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2016-10-26  5:12 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel


Paul Eggert <eggert@cs.ucla.edu> writes:

> Thanks. I tried that on Fedora 24 x86-64, and got the following 
> diagnostic when using M-x xwidget-webkit-browse-url to visit 
> http://cs.ucla.edu.
>
> (emacs:22840): Gtk-WARNING **: Allocating size to GtkOffscreenWindow 
> 0xd5b6d0 without calling gtk_widget_get_preferred_width/height(). How 
> does the code know the size to allocate?
>
> Is this something I should worry about?

This warning is also produced by the existing xwidget code in Emacs
25.1.  It is harmless, but I did try to remove it and haven’t been
successful yet, as I’m not very familiar with GTK.

> A couple of minor things. First, in patch "Dynamically resize WebKit 
> widget", this commit-message line exceeds 78 chars:
>
> (xwidget-webkit-adjust-size-to-window): Make non-interactive, add widget and window as arguments.
>
> so "git am" rejected it here. To help prevent this sort of problem in 
> the future, run "./autogen.sh git". (72 chars or less is nice, so that 
> ChangeLog lines fit in 80 columns.)
>
> Second, in the patch "xwidget: Pass JavaScript return value to optional 
> callback procedure" the new function webkit_js_to_lisp should be static. 
> To catch this sort of thing in the future, use the --enable-gcc-warnings 
> option to 'configure'.

Thanks for the hints!  I’ll wait for additional feedback before sending
updated patches.

~~ Ricardo




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 00/15] xwidget webkit improvements
  2016-10-26  5:12   ` Ricardo Wurmus
@ 2016-10-26  6:08     ` Paul Eggert
  2016-10-26  9:18       ` joakim
  2016-10-26  9:19       ` joakim
  2016-10-26  8:08     ` Live System User
  2016-10-26  8:14     ` Live System User
  2 siblings, 2 replies; 9+ messages in thread
From: Paul Eggert @ 2016-10-26  6:08 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: emacs-devel

Ricardo Wurmus wrote:

> This warning is also produced by the existing xwidget code in Emacs
> 25.1.  It is harmless, but I did try to remove it and haven’t been
> successful yet, as I’m not very familiar with GTK.

OK, thanks for explaining.

> I’ll wait for additional feedback before sending updated patches.

The patches look OK for a feature that is experimental anyway, so I took the 
liberty of installing them into master, with fixes for the two minor things. 
Thanks again.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 00/15] xwidget webkit improvements
  2016-10-26  5:12   ` Ricardo Wurmus
  2016-10-26  6:08     ` Paul Eggert
@ 2016-10-26  8:08     ` Live System User
  2016-10-26  8:14     ` Live System User
  2 siblings, 0 replies; 9+ messages in thread
From: Live System User @ 2016-10-26  8:08 UTC (permalink / raw)
  To: emacs-devel; +Cc: Paul Eggert, emacs-devel

Ricardo Wurmus <rekado@elephly.net> writes:

> Paul Eggert <eggert@cs.ucla.edu> writes:
>
>> Thanks. I tried that on Fedora 24 x86-64, and got the following 
>> diagnostic when using M-x xwidget-webkit-browse-url to visit 
>> http://cs.ucla.edu.
>>
>> (emacs:22840): Gtk-WARNING **: Allocating size to GtkOffscreenWindow 
>> 0xd5b6d0 without calling gtk_widget_get_preferred_width/height(). How 
>> does the code know the size to allocate?
>>
>> Is this something I should worry about?
>
> This warning is also produced by the existing xwidget code in Emacs
> 25.1.  It is harmless, but I did try to remove it and haven’t been
> successful yet, as I’m not very familiar with GTK.

  Yes, this error message was reported with a very simple recipe as
  Bug#24343.

  Perhaps someone like Martin could figure out a fix?

  Thanks.

[...]




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 00/15] xwidget webkit improvements
  2016-10-26  5:12   ` Ricardo Wurmus
  2016-10-26  6:08     ` Paul Eggert
  2016-10-26  8:08     ` Live System User
@ 2016-10-26  8:14     ` Live System User
  2 siblings, 0 replies; 9+ messages in thread
From: Live System User @ 2016-10-26  8:14 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Paul Eggert, emacs-devel

Ricardo Wurmus <rekado@elephly.net> writes:

> Paul Eggert <eggert@cs.ucla.edu> writes:
>
>> Thanks. I tried that on Fedora 24 x86-64, and got the following 
>> diagnostic when using M-x xwidget-webkit-browse-url to visit 
>> http://cs.ucla.edu.
>>
>> (emacs:22840): Gtk-WARNING **: Allocating size to GtkOffscreenWindow 
>> 0xd5b6d0 without calling gtk_widget_get_preferred_width/height(). How 
>> does the code know the size to allocate?
>>
>> Is this something I should worry about?
>
> This warning is also produced by the existing xwidget code in Emacs
> 25.1.  It is harmless, but I did try to remove it and haven’t been
> successful yet, as I’m not very familiar with GTK.

  Yes, this error message was reported with a very simple recipe as
  Bug#24343.

  Perhaps someone like Martin could figure out a fix?

  Thanks.

[...]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 00/15] xwidget webkit improvements
  2016-10-26  6:08     ` Paul Eggert
@ 2016-10-26  9:18       ` joakim
  2016-10-26  9:19       ` joakim
  1 sibling, 0 replies; 9+ messages in thread
From: joakim @ 2016-10-26  9:18 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Ricardo Wurmus, emacs-devel

Paul Eggert <eggert@cs.ucla.edu> writes:

> Ricardo Wurmus wrote:
>
>> This warning is also produced by the existing xwidget code in Emacs
>> 25.1.  It is harmless, but I did try to remove it and haven’t been
>> successful yet, as I’m not very familiar with GTK.
>
> OK, thanks for explaining.

I think the reason for the warning is that the xwidget code works a
little bit differently layout-wise than the expected use case for gtk
widgets. 

>
>> I’ll wait for additional feedback before sending updated patches.
>
> The patches look OK for a feature that is experimental anyway, so I
> took the liberty of installing them into master, with fixes for the
> two minor things. Thanks again.
>
-- 
Joakim Verona
joakim@verona.se




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 00/15] xwidget webkit improvements
  2016-10-26  6:08     ` Paul Eggert
  2016-10-26  9:18       ` joakim
@ 2016-10-26  9:19       ` joakim
  1 sibling, 0 replies; 9+ messages in thread
From: joakim @ 2016-10-26  9:19 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Ricardo Wurmus, emacs-devel

Paul Eggert <eggert@cs.ucla.edu> writes:

> Ricardo Wurmus wrote:
>
>> This warning is also produced by the existing xwidget code in Emacs
>> 25.1.  It is harmless, but I did try to remove it and haven’t been
>> successful yet, as I’m not very familiar with GTK.
>
> OK, thanks for explaining.
>
>> I’ll wait for additional feedback before sending updated patches.
>
> The patches look OK for a feature that is experimental anyway, so I
> took the liberty of installing them into master, with fixes for the
> two minor things. Thanks again.
>

Thanks for working on these patches, I'm looking forward to trying them out!
-- 
Joakim Verona
joakim@verona.se




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-10-26  9:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-24 16:39 [PATCH v2 00/15] xwidget webkit improvements Ricardo Wurmus
  -- strict thread matches above, loose matches on Subject: below --
2016-10-24 16:40 Ricardo Wurmus
2016-10-25 15:30 ` Paul Eggert
2016-10-26  5:12   ` Ricardo Wurmus
2016-10-26  6:08     ` Paul Eggert
2016-10-26  9:18       ` joakim
2016-10-26  9:19       ` joakim
2016-10-26  8:08     ` Live System User
2016-10-26  8:14     ` Live System User

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.