Subject: [PATCH] Support file download and upload (Bug#29565)

From: Jaesup Kwak <[email-masked]>
Date: Thu, 21 Dec 2017 13:12:53 +0900

For the MIME types, which ns xwidget webkit cannot show in a view,
'xwidget-webkit-save-as-file' is called via 'response-callback' event.

Ns xwidget webkit presents file open panel to select upload files.

Tighter check for javascript availability.

* 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 the event.  And
tighter check for javascript availability.
(XwWebView::runOpenPanelWithParameters): Select upload files.
* src/xwidget.c
(store_xwidget_response_callback_event): New function.