1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00
Commit Graph

3884 Commits

Author SHA1 Message Date
witekfl
5284ea185a Anchors (all, but first) are not accessible inside <ul>. 2012-06-12 13:40:31 +02:00
witekfl
4933e26488 The last test commit. 2012-05-27 19:42:43 +02:00
witekfl
c9a9d56f07 Test commit 3. 2012-05-27 19:34:57 +02:00
witekfl
2669b71e1d Test commit. 2012-05-27 19:16:16 +02:00
witekfl
c4b10d8b39 Test commit. 2012-05-27 18:53:34 +02:00
witekfl
9313aae906 Set FD_SETSIZE 1024 2012-05-25 19:47:27 +02:00
witekfl
2ec6c54697 On Windows safe_read or safe_write return -1 and set errno = EWOULDBLOCK
for nonblocking io.
2012-05-25 19:43:10 +02:00
witekfl
a140e1d79f Set FD_SETSIZE to 1024 on Mingw32.
The default value of FD_SETSIZE on Windows is 64,
but can be bigger if set before including winsock2.h
2012-05-25 17:54:46 +02:00
witekfl
bebde69507 Compilation fixes for Mingw32.
* check if fork is available
* use set_nonblocking_fd
2012-05-25 16:13:25 +02:00
witekfl
5f9b54f594 Apply styles of html element for body element.
See test/css/css_body.html and test/css/css_html.html
2012-05-22 15:22:48 +02:00
witekfl
ce48dc5ffd test files for html { } and body { } 2012-05-22 14:15:24 +02:00
witekfl
7328bb9c9e gnutls_transport_ptr is deprecated. 2012-05-08 13:41:26 +02:00
witekfl
e58fc7e2cb Show fractions of MiBs in download progress dialogs.
It is useful especially for slow links.
2012-05-08 13:29:20 +02:00
witekfl
12803e4075 Check if hb is NULL. 2012-03-04 18:20:48 +01:00
witekfl
e86ec567f2 Compilation fixes (--enable-debug) 2012-03-04 18:11:18 +01:00
witekfl
36070d3277 The union of the color and the node_number in the struct screen_char.
The long term goal is good looking of the Python docs in ELinks, especially
background colors. Every start tag and every text node would have associated
a natural number. Those numbers would be "drawn" in the document instead
of colors. Finally, the screen driver would change numbers into colors.

This will be done in small steps. The next step is to implement this change
in the screen driver.
2012-03-03 11:27:58 +01:00
witekfl
9c0d7dde79 Do not set title for the GNU Screen, because it beeps. 2012-01-05 19:49:22 +01:00
Miciah Dashiel Butler Masters
416d7fac7d css_apply_list_style: fix compiler warning
Add a case for CSS_LIST_ORDINAL (and assert(0)) to the switch in
css_apply_list_style.  This change should eliminate a warning from the
compiler reported by Witold that CSS_LIST_ORDINAL is not handled.
2011-11-16 16:58:08 +00:00
Miciah Dashiel Butler Masters
e37caa01ec exec_later: use mem_calloc instead of calloc
Before this change, exec_later allocates memory for the struct exec_mailcap
structure using calloc.  However, the memory is freed in
exec_mailcap_command using mem_free.  Change exec_later to use mem_calloc
instead of calloc.

Unless CONFIG_FASTMEM is used, mem_free expects to find debugging metadata
that only the mem_alloc family of functions store, and thus using mem_free
on the memory allocated using calloc causes a crash.
2011-11-15 20:14:14 +00:00
Miciah Dashiel Butler Masters
c74ddb29c5 SMJS: add terminal object
Add terminal_class, which defines a JSObject wrapper for struct terminal.

Add terminal_array_class, which defines a JSObject wrapper for accessing
the "terminals" linked list of struct terminal.

Add session_array_class, which defines a JSObject wrapper for accessing the
tabs (sessions) of a terminal.

Add pointers from struct terminal to the terminal_class object and
the session_array_class object.

Add terminal_props and terminal_get_property for terminal_class.

Add terminal_finalize, which clears the pointers between a struct terminal
and the JSObject wrapper in question.

Add smjs_init_terminal_interface, which creates a terminal_array_class
instance and assigns it to  the "terminal" property on the "elinks" object.
Call smjs_init_terminal_interface from smjs_init_elinks_object.

Add smjs_get_terminal_object and smjs_get_session_array_object to get
the wrapper objects for a given struct terminal, and add
smjs_get_terminal_array_object to get a terminal_array_class object.

Add smjs_detach_terminal_object and smjs_detach_session_array_object, which
clear the pointers between a given struct terminal and its JSObject
wrappers.

Add terminal_array_get_property for terminal_array_class.

Add session_array_get_property for session_array_class.
2011-11-14 04:34:51 +00:00
Miciah Dashiel Butler Masters
cdad9adf19 SMJS: add session object
Add session_class, which defines a JSObject wrapper for struct session.

Add location_array_class, which defines a JSObject wrapper for struct
ses_history.  The "history" member of struct session is a struct
ses_history, which is a linked list of struct location.

Add a pointer from struct session to the session_class object and the
location_array object.

Add smjs_get_session_object to return a session_class JSObject wrapper for
a given struct session.

Add smjs_get_session_location_array_object to return a location_array_class
JSObject wrapper for a given struct session.

Add "session" property to the "elinks" object, which uses
smjs_get_session_object to get a JSObject wrapper for smjs_ses.

Add smjs_location_array_get_property, which allows indexing
a location_array object using a positive number for history forward or
a negative number for history backward.

Add session_props, session_get_property, session_set_property,
session_funcs, smjs_session_goto_url (which implements the "goto" method),
and smjs_init_session_interface for session_class.

Add session_construct, which creates a new tab and returns the JSObject
session_class wrapper.

Add session_finalize and smjs_location_array_finalize, which clear the
pointers between struct session and the JSObject wrappers in question.

Add smjs_detach_session_object, which clears the pointers between a given
struct session and the corresponding JSObject wrappers.

In destroy_session, call smjs_detach_session_object.

Add jsval_to_object helper in ecmascript/spidermonkey/util.h;
jsval_to_object is used in smjs_session_goto_url.

Modify delayed_goto_uri_frame to allow the target to be NULL.
smjs_session_goto_url needs this modification.
2011-11-14 04:34:51 +00:00
Miciah Dashiel Butler Masters
3932af9b17 SMJS: handle view_state outliving wrapping object
Currently, it is possible for the JSObject that wraps a struct view_state
to outlive the view_state.  Using the properties of the JSObject wrapper
will then cause a crash.

This patch adds a smjs_detach_view_state_object function, which is called
in destroy_vs, to dissociate the struct view_state from the JSObject
wrapper.  To this end, the patch modifies the struct view_state to point
the JSObject wrapper.  smjs_get_view_state_object will use this pointer
if it is set, and copy_vs will copy this pointer to the new view_state.
The patch also modifies view_state_get_property and
view_state_set_property to return immediately if the view_state has been
destroyed.  Finally, the patch adds a finalizer (view_state_finalize)
that clears the pointer from the struct view_state to the JSObject.
2011-11-14 04:34:51 +00:00
Miciah Dashiel Butler Masters
211c624aca smjs_get_elinks_object: drop jsobj temp variable
After recent simplifications, the jsobj variable is no longer necessary.
Instead of assigning it a value and then returning it, just return the
value that was being assigned to it.
2011-11-14 04:34:51 +00:00
Miciah Dashiel Butler Masters
54c33284fc elinks_get_property: return empty string if no URI
For the elinks.location property, if elinks_get_property fails to find
a URI, just return the empty string rather than returning an error.
2011-11-14 04:34:51 +00:00
Miciah Dashiel Butler Masters
e092b6b08b SMJS: refactor elinks object's property handlers
Add elinks_get_property and elinks_set_property functions and
a JSPropertySpec elinks_props table to handle properties rather than
defining eilnks_get_home, elinks_get_location, and elinks_set_location
and adding them individually to the class using JS_DefineProperty.
This approach will make it easier to add further properties.
2011-11-14 04:34:51 +00:00
Miciah Dashiel Butler Masters
68801b7382 elinks_object: use usrerror if there is no term
Currently, elinks_alert assumes that smjs_ses is not NULL and crashes if
it is.  Change elinks_alert to check whether smjs_term is NULL, try
get_default_terminal if so, and fall back on printing to stderr using
usrerror if no terminal is found.
2011-11-14 04:34:51 +00:00
Miciah Dashiel Butler Masters
e310843a2a smjs_load_uri: check for empty URI
In smjs_load_uri, check whether the the given URI string is empty.  If it
is, return JS_FALSE right away rather than continuing on and passing
get_uri an empty string, which triggers an assertion failure later on.
2011-11-14 04:34:51 +00:00
Miciah Dashiel Butler Masters
f8bdc3ca9e read_http_post_inline: fix assertion-failed message
read_http_post_inline decodes two hexadecimal digits into one byte at
a time, and it asserts that each hexadecimal digit is valid; however,
both assertions print the first digit when they fail.  Fix the assertion
on the second digit to print the second digit.
2011-11-14 04:34:50 +00:00
Miciah Dashiel Butler Masters
daa6f36e83 Perform the work of try_form_insert_mode in enter
Currently, the function try_form_insert_mode checks whether the current
link is a text area, insert mode is off, and the current action is enter,
and if so, it sets insert mode on.  Perform this work in enter instead,
and delete try_form_insert_mode.

The old code works as follows: send_kbd_event → send_to_frame
→ frame_ev → frame_ev_kbd → try_form_insert_mode.  The new code works
as follows: send_kbd_event → do_action → enter.
2011-11-14 04:34:50 +00:00
Miciah Dashiel Butler Masters
a3918d8c30 cache_entry_get_property: fix assertion failure
In cache_entry_get_property, don't assert the return value from
get_cache_fragment; instead, just return JS_FALSE if the value is NULL.
2011-11-14 04:34:50 +00:00
Miciah Dashiel Butler Masters
da209c6b6f smjs_load_uri: return if there is an external handler
Currently, using smjs_load_uri on javascript: URIs cause an assertion
failure in run_connection because smjs_load_uri uses
get_protocol_handler to find the handler and asserts that the returned
handler is not NULL, but get_protocol_handler returns NULL for
javascript: URIs.

In smjs_load_uri, if the given URI has a protocol for which some
external handler is defined, immediately return JS_FALSE because
smjs_load_uri implements an asynchronous operation, and we cannot
reasonably carry out the operation and callback with an external
handler.
2011-11-14 04:34:50 +00:00
Miciah Dashiel Butler Masters
bdeace4811 keymap_set_property: xulrunner-2.0 fix
In keymap_set_property, convert the jsid value into a jsval value before
calling JS_ValueToString on it.
2011-11-14 04:34:50 +00:00
Miciah Dashiel Butler Masters
0189b6bfc9 Add support & test for the CSS list-style property
Recognise the list-style property and apply it by setting the
appropriate flag on the element's parattr based on the property's value.

Add test/list-style.html with an example of each possible list-style
value (many are unsupported by the HTML engine).
2011-11-14 04:34:50 +00:00
Miciah Dashiel Butler Masters
4eb7827fe5 Call follow-url hook on redirects
In redirect_cache, call the follow-url hook so that scripts can modify
URIs in redirects.
2011-11-14 04:34:50 +00:00
Miciah Dashiel Butler Masters
56f1b5d834 follow_url: do not pass POST requests to scripts
In follow_url, do not call the follow-url hook if the URI encodes a POST
request.  If scripts try to change such a URI, they can corrupt it and
cause problems later on.

This change can be reverted later when the URI structure is changed not
to store the POST data in the URI string.
2011-11-14 04:34:50 +00:00
witekfl
3d4fe9c4d2 Always do reload after submitting forms.
In fact, it does reload after pressing any button, but it should not
hurt. To remember to press 'x' for submitting forms was too hard.
2011-11-12 15:17:53 +01:00
witekfl
d06cccffd6 Show the URI in the title bar even if document title is set.
ECMAcript's window.title overrides this.
2011-10-18 20:57:32 +02:00
witekfl
c656c5c929 Pass -Wno-uninitialized for the gettext compilation.
The compilation --with-debug failed on the plural.c.
2011-10-08 12:07:02 +02:00
witekfl
0e5822edae Memorize the auth form only when the "document.browse.forms.show_formhist" is on. 2011-10-06 10:54:11 +02:00
witekfl
ddc0d8d7be Use formhist for 401 Unauthorized and others. 2011-10-05 22:42:41 +02:00
Petr Baudis
9a001f051a Remove variables that were set but not used
Required to make new gcc with default warning settings happy.
2011-09-24 02:25:51 +02:00
Petr Baudis
69a226eba1 find_clonable_bittorrent_peer_request(): Remove likely wrong inner clone declaration 2011-09-24 02:21:59 +02:00
Petr Baudis
b9fb1d3c7d menu_keys(): Do not compare different enums 2011-09-24 02:10:54 +02:00
Kalle Olavi Niemitalo
30c485af4c 1024: Add to NEWS 2011-07-28 17:23:52 +03:00
Kalle Olavi Niemitalo
0c3f3e09a7 1024: Verify server certificate hostname with OpenSSL
Not tested with nss-compat-ossl.
2011-07-28 17:23:51 +03:00
Kalle Olavi Niemitalo
7c40e03421 1024: Always disable TLS1.1 with GnuTLS
Using the RFC 3546 server_name TLS extension with TLS 1.1 made
https://bugzilla.novell.com/ never respond to negotiation.
Disable TLS 1.1 with GnuTLS, like it has already been disabled with
OpenSSL.  And if an SSL error is detected, disable TLS 1.2 as well.
2011-07-28 17:23:51 +03:00
Kalle Olavi Niemitalo
6c84978cf5 1024: Use RFC 3546 server_name TLS extension
For both GnuTLS and OpenSSL.  Not tested with nss-compat-openssl.
2011-07-28 17:23:51 +03:00
Kalle Olavi Niemitalo
5d0e4e2452 1024: Reject OpenPGP certificates 2011-07-28 17:23:51 +03:00
Witold Filipczyk
a15216863f 1024: Verify hostname and expiration time of the certificate.
GnuTLS only.

[ From bug 1024 attachment 483.  Resolved conflicts with 0.13.GIT.  --KON ]
2011-07-28 17:23:51 +03:00
witekfl
eb4e5d7e0d Revert "Do not try to use gpm in X11."
This reverts commit 8183aecd90.
2011-07-06 13:41:41 +02:00