* lisp/xwdget.el (xwidget-webkit-download-dir)
(xwidget-webkit-save-as-file): Set version to 28.1 because the patch
was introduced in Emacs 28.0.50.
* src/nsxwidget.m: Fix typo.
This reverts commit de4f347901.
read-file-name already displays a long path when given a default
(like INITIAL in many other prompting functions), so using
format-prompt here is superfluous.
Co-authored-by: Jaesup Kwak <veshboo@gmail.com>
* lisp/xwidget.el (xwidget-webkit-callback): Add case for
'response-callback' event.
(xwidget-webkit-download-dir): New variable.
(xwidget-webkit-save-as-file): New function.
* src/nsxwidget.m (XwWebView::decidePolicyForNavigationResponse):
Store download event.
* src/xwidget.c src/xwidget.h (store_xwidget_download_callback_event):
New function.
Co-authored-by: Jaesup Kwak <veshboo@gmail.com>
* etc/NEWS: Announce new functions and options.
* lisp/xwidget.el (xwidget): New defgroup.
(xwidget-webkit-mode-map): Add new keybindings.
(xwidget-webkit-scroll-up, xwidget-webkit-scroll-down)
(xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward):
Add optional argument to specify specific amounts to scroll down.
(xwidget-webkit-scroll-up-line, xwidget-webkit-scroll-down-line): New
functions.
(xwidget-webkit-scroll-bottom): Fix function to scroll to the bottom
of the document.
(xwidget-webkit-callback): Use new function to update buffer title
even when Javascript is disabled.
(xwidget-webkit-bookmark-jump-new-session): New variable.
(xwidget-webkit-bookmark-make-record): Modify to use xwidget-webkit to
open bookmark that is created in xwidget-webkit.
(xwidget-webkit-insert-string): Fix Javascript snippet to not throw
Javsscript exceptions.
(xwidget-webkit-inside-pixel-width)
(xwidget-window-inside-pixel-height): New functions.
(xwidget-webkit-adjust-size-to-window): Use new functions.
(xwidget-webkit-new-session): Insert invisible URL instead of an empty
string to achieve better default behavior.
(xwidget-webkit-back, xwidget-webkit-forward, xwidget-webkit-reload)
(xwidget-webkit-current-url): Use new functions to enable scrolling
even when Javascript is disabled.
(xwidget-webkit-copy-selection-as-kill): Remove unnecessary lambda.
* src/nsxwidget.h src/nsxwidget.m (nsxwidget_webkit_uri)
(nsxwidget_webkit_title, nsxwidget_webkit_goto_history): Add new
functions.
* src/xwidget.c (Fxwidget_webkit_uri, Fxwidget_webkit_title)
(Fxwidget_webkit_goto_history): Add new functions.
(syms_of_xwidget): Define new functions.
Co-authored-by: Jaesup Kwak <veshboo@gmail.com>
* configure.ac: Allow '--with-xwidgets' for "${NS_IMPL_COCOA}".
* etc/NEWS: Mention new feature.
* etc/TODO: Remove done TODO to implement xwidget in NeXTstep port.
* lisp/xwidget.el (xwidget-webkit-clone-and-split-below)
(xwidget-webkit-clone-and-split-right): New procedures.
(xwidget-webkit-callback): Remove call to
'xwidget-webkit-adjust-size-to-window' as adjusting xwidget size is
handled in 'x_draw_xwidget_glyph_string'.
(xwidget-webkit-enable-plugins): New variable.
* nextstep/templates/Info.plist.in: Add 'NSAppTransportSecurity'.
* src/Makefile.in: Add nsxwidget.o for compilation.
* src/emacs.c (main): Move conditional call to 'syms_of_xwidget'.
* src/nsterm.m (ns_draw_glyph_string): Add case for 'XWIDGET_GLYPH'.
(note_mouse_movement mouseMoved): Make it easy to resize window by
dragging mode-line or vertical separator adjacent to large glyph.
* src/nsxwidget.h src/nsxwidget.m: Newly added files, xwidget webkit
backend for macOS Cocoa.
* src/xwidget.c (Fmake_xwidget, xwidget_init_view)
(x_draw_xwidget_glyph_string, xwidget_is_web_view)
(Fxwidget_webkit_goto_uri, Fxwidget_webkit_zoom, Fxwidget_resize)
(Fxwidget_size_request, Fdelete_xwidget_view, xwidget_end_redisplay)
(kill_buffer_xwidgets): Add macOS Cocoa specific functions and code
with 'NS_IMPL_COCOA' and guard GTK specific functions and code with
'USE_GTK'.
(x_draw_xwidget_glyph_string): Handle adjusting xwidget size.
* src/xwidget.h (xwidget, xwidget_view): Add macOS Cocoa specific
fields with 'NS_IMPL_COCOA' and guard GTK specific fields with
USE_GTK.
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
* lisp/xwidget.el: Rebind "beginning-of-buffer" and "end-of-buffer" to
"xwidget-webkit-scroll-top" and "xwidget-webkit-scroll-bottom",
respectively.
(xwidget-webkit-scroll-top,
xwidget-webkit-scroll-bottom): New procedures.
* src/xwidget.c (xwidget-webkit-zoom): New procedure.
* lisp/xwidget.el: Bind "+" and "-" to zoom in and out, respectively.
(xwidget-webkit-zoom): Declare procedure.
(xwidget-webkit-zoom-in, xwidget-webkit-zoom-out): New procedures.
* lisp/xwidget.el (xwidget-webkit-auto-adjust-size,
xwidget-webkit-adjust-size-in-frame): New procedures.
(xwidget-webkit-new-session): Remove hint to resize widget with `a'.
(xwidget-webkit-adjust-size-dispatch): Resize current webkit widget.
(xwidget-webkit-adjust-size-to-window): Make non-interactive,
add widget and window as arguments.
(xwidget-webkit-callback): Use xwidget-webkit-adjust-size-to-window.
* lisp/xwidget.el (xwidget-webkit-get-selection): Add PROC argument to
process selection.
(xwidget-webkit-copy-selection-as-kill): Kill selection in callback.
The WebKit widget can scroll on its own and does not need to wrapped
with a scrolled window container.
* src/xwidget.h: Remove struct member widgetscrolledwindow_osr.
* src/xwidget.c: Remove widgetscrolledwindow_osr.
(xwidget-set-adjustment): Remove.
(xwidget-resize): Resize Webkit widget last.
* lisp/xwidget.el (xwidget-set-adjustment): Remove.
(xwidget-webkit-scroll-up, xwidget-webkit-scroll-down,
xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward):
Implement scrolling via JavaScript.
* configure.ac: Check for webkit2gtk-4.0.
* src/xwidget.c: Adjust to use WebKit2 API.
* lisp/xwidget.el (xwidget-webkit-callback): Adjust matches for
`xwidget-event-type'.
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.
The arguments BEG and END were unused, and are now removed.
* display.texi (Xwidgets): Document the change
* xwidget.el (make-xwidget, xwidget-insert)
(xwidget-webkit-new-session): Reflect changed arguments
* xwidget.c (Fmake_xwidget, syms_of_xwidget): Reflect changed arguments