Another simple ownership case.
Some checks failed
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
Some checks failed
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
This commit is contained in:
10
src/form.cc
10
src/form.cc
@ -89,7 +89,7 @@ public: //BUG: for now everything is public
|
|||||||
DilloHtmlMethod method;
|
DilloHtmlMethod method;
|
||||||
DilloHtmlMethod get_method() const override { return method; }
|
DilloHtmlMethod get_method() const override { return method; }
|
||||||
|
|
||||||
DilloUrl *action;
|
std::unique_ptr< DilloUrl > action;
|
||||||
DilloHtmlEnc content_type;
|
DilloHtmlEnc content_type;
|
||||||
DilloHtmlEnc get_content_type() const override { return content_type; }
|
DilloHtmlEnc get_content_type() const override { return content_type; }
|
||||||
char *submit_charset;
|
char *submit_charset;
|
||||||
@ -127,7 +127,6 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DilloHtmlReceiver (DilloHtmlFormImpl* form2) { form = form2; }
|
DilloHtmlReceiver (DilloHtmlFormImpl* form2) { form = form2; }
|
||||||
~DilloHtmlReceiver () { }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void activate (Resource *resource);
|
void activate (Resource *resource);
|
||||||
@ -971,7 +970,7 @@ DilloHtmlFormImpl::DilloHtmlFormImpl (DilloHtml *html2,
|
|||||||
{
|
{
|
||||||
html = html2;
|
html = html2;
|
||||||
method = method2;
|
method = method2;
|
||||||
action = a_Url_dup(action2).release();
|
action = a_Url_dup(action2);
|
||||||
content_type = content_type2;
|
content_type = content_type2;
|
||||||
submit_charset = dStrdup(charset);
|
submit_charset = dStrdup(charset);
|
||||||
num_entry_fields = 0;
|
num_entry_fields = 0;
|
||||||
@ -985,7 +984,6 @@ DilloHtmlFormImpl::DilloHtmlFormImpl (DilloHtml *html2,
|
|||||||
*/
|
*/
|
||||||
DilloHtmlFormImpl::~DilloHtmlFormImpl ()
|
DilloHtmlFormImpl::~DilloHtmlFormImpl ()
|
||||||
{
|
{
|
||||||
delete action;
|
|
||||||
dFree(submit_charset);
|
dFree(submit_charset);
|
||||||
inputs.clear();
|
inputs.clear();
|
||||||
}
|
}
|
||||||
@ -1064,7 +1062,7 @@ std::unique_ptr< DilloUrl > DilloHtmlFormImpl::buildQueryUrl(DilloHtmlInput *act
|
|||||||
if (queryStr.has_value()) {
|
if (queryStr.has_value()) {
|
||||||
auto DataStr= queryStr.value();
|
auto DataStr= queryStr.value();
|
||||||
/* action was previously resolved against base URL */
|
/* action was previously resolved against base URL */
|
||||||
char *action_str = dStrdup(URL_STR(action));
|
char *action_str = dStrdup(URL_STR(action.get()));
|
||||||
|
|
||||||
if (method == DILLO_HTML_METHOD_POST) {
|
if (method == DILLO_HTML_METHOD_POST) {
|
||||||
new_url = a_Url_new(action_str, NULL);
|
new_url = a_Url_new(action_str, NULL);
|
||||||
@ -1594,7 +1592,7 @@ void DilloHtmlReceiver::enter (Resource *resource)
|
|||||||
((input->type == DILLO_HTML_INPUT_PASSWORD) ||
|
((input->type == DILLO_HTML_INPUT_PASSWORD) ||
|
||||||
(input->type == DILLO_HTML_INPUT_TEXT)))) {
|
(input->type == DILLO_HTML_INPUT_TEXT)))) {
|
||||||
/* The control can submit form. Show action URL. */
|
/* The control can submit form. Show action URL. */
|
||||||
msg = URL_STR(form->action);
|
msg = URL_STR(form->action.get());
|
||||||
}
|
}
|
||||||
a_UIcmd_set_msg(html->bw, "%s", msg);
|
a_UIcmd_set_msg(html->bw, "%s", msg);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user