1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-20 01:46:15 -04:00
Commit Graph

5361 Commits

Author SHA1 Message Date
Witold Filipczyk
8b1fa5e1ff [mujs] Code related to document "similar" to quickjs and spidermonkey
Also added prototypes for endsWith and startsWith.
2024-05-19 21:08:35 +02:00
Witold Filipczyk
4d79093742 [quickjs] JS_DupValue in some places. 2024-05-19 16:32:51 +02:00
Witold Filipczyk
1dad777d14 [quickjs] document rewritten a bit 2024-05-19 15:42:02 +02:00
Witold Filipczyk
888f06c74c [spidermoneky] dom_node_ref
There was error in element_finalize.
2024-05-19 13:37:16 +02:00
Witold Filipczyk
cb8a1c5698 [spidermonkey] Typo 2024-05-18 21:11:59 +02:00
Witold Filipczyk
c152c4aeae [spidermonkey] Added initDocument function 2024-05-18 21:09:14 +02:00
Witold Filipczyk
7885fb0797 [libdom] debug_dump_xhtml
Helper function which print current state of document, called
after modification of DOM tree.
2024-05-17 22:05:25 +02:00
Witold Filipczyk
5c92b4ee96 [libdom] Free keyboard and dom related strings 2024-05-12 18:52:27 +02:00
Witold Filipczyk
8a2e85b73f [dom] keyCodes like in Firefox
KeyboardEvent.keyCode returns 0 in Firefox for test case.
I won't change the test, because elinks relies on libdom API.
2024-05-12 16:51:04 +02:00
Witold Filipczyk
2b4dd0f7ba [mujs] Typo, but still not ok 2024-05-12 13:53:53 +02:00
Witold Filipczyk
ffcbc08d12 [mujs] KeyboardEvent.keyCode (ENTER only)
Something is broken.
2024-05-12 13:48:31 +02:00
Witold Filipczyk
e44821367c [quickjs] KeyboardEvent.keyCode (ENTER only) 2024-05-12 13:30:57 +02:00
Witold Filipczyk
20ab63c1d1 [spidermonkey] KeyboardEvent.keyCode (Enter only)
Only Enter is handled. Strings are not "finalized".
2024-05-12 13:17:15 +02:00
Witold Filipczyk
4439f4e976 [spidermonkey] convert keyCode to dom_string 2024-05-12 12:11:26 +02:00
Witold Filipczyk
c45fa86605 [mujs] KeyboardEvent (libdom) 2024-05-11 14:24:27 +02:00
Witold Filipczyk
3e416135f1 [quickjs] KeyboardEvent (libdom) 2024-05-11 13:55:46 +02:00
Witold Filipczyk
078edf0966 [spideronkey] keyboardEvent.keyCode -> keyboardEvent.code 2024-05-11 13:45:18 +02:00
Witold Filipczyk
348bc937c0 [spidermonkey] KeyboardEvent (libdom)
It passes test, but there is a regression.
It will be addressed later.
2024-05-11 13:04:36 +02:00
Witold Filipczyk
6b053637b3 [ecmascript] Explicit comparison with NULL. Refs #303 2024-05-10 14:44:16 +02:00
Witold Filipczyk
d529265f02 [mujs] CustomEvent (libdom) 2024-05-09 21:22:06 +02:00
Witold Filipczyk
fec5bd561d [quickjs] CustomEvent (libdom) 2024-05-09 20:50:01 +02:00
Witold Filipczyk
4932a689c8 [spidermonkey] CustomEvent (libdom) 2024-05-09 19:19:00 +02:00
Witold Filipczyk
b9d266c52c [mujs] dom_string_unref 2024-05-09 17:32:46 +02:00
Witold Filipczyk
5779cd170b [mujs] Event (libdom) 2024-05-09 16:36:26 +02:00
Witold Filipczyk
1fc9cc8803 [quickjs] Event
libdom
2024-05-09 16:10:23 +02:00
Witold Filipczyk
ccf9fc2fed [spidermonkey] Event
This time libdom code.
2024-05-09 15:51:01 +02:00
Witold Filipczyk
16cbdc2501 [mujs] element.outerHTML setter 2024-05-08 18:57:11 +02:00
Witold Filipczyk
58bf489719 [quickjs] element.outerHTML setter 2024-05-08 18:47:21 +02:00
Witold Filipczyk
46a213ae49 [spidermonkey] element.outerHTML 2024-05-08 18:32:59 +02:00
Witold Filipczyk
ea2dbb05e2 [ecmascript] More add_lowercase_to_string 2024-05-08 15:37:00 +02:00
Witold Filipczyk
abc307e86b [libdom] Added add_lowercase_to_string
Replace uppercase with lowercase in tag names in html "rewrites"
2024-05-08 15:27:48 +02:00
Witold Filipczyk
a9ae51ae9f [mujs] nodelist.forEach passes test case 2024-05-07 19:33:34 +02:00
Witold Filipczyk
7748eb5ab9 [quickjs] Fix in url.c 2024-05-07 17:39:30 +02:00
Witold Filipczyk
948c22ea79 [quickjs] Do not FreeValue 2024-05-07 17:32:46 +02:00
Witold Filipczyk
786469da5f [quickjs] nodelist.forEach 2024-05-07 17:24:13 +02:00
Witold Filipczyk
3d92071eba [mujs] element.querySelectorAll 2024-05-07 16:51:29 +02:00
Witold Filipczyk
57202954bb [mujs] document.querySelectorAll 2024-05-07 16:45:43 +02:00
Witold Filipczyk
4da6e1f85a [mujs] element.closest 2024-05-07 16:41:30 +02:00
Witold Filipczyk
786cbf9500 [mujs] element.matches 2024-05-07 16:36:02 +02:00
Witold Filipczyk
1b954141eb [mujs] element.querySelector 2024-05-07 16:09:30 +02:00
Witold Filipczyk
6f64f8e9db [mujs] document.querySelector 2024-05-07 16:03:41 +02:00
Witold Filipczyk
ff3b231e42 [mujs] URL 2024-05-07 15:54:43 +02:00
Witold Filipczyk
bd7f271b0a [ecmascript] Removed debug fprintfs 2024-05-07 15:03:14 +02:00
Witold Filipczyk
0e42cf7d63 [quickjs] element.querySelectorAll 2024-05-06 21:49:03 +02:00
Witold Filipczyk
6deeb720b9 [quickjs] document.querySelectorAll 2024-05-06 21:41:02 +02:00
Witold Filipczyk
3c81545b81 [quickjs] element.closest 2024-05-06 21:22:16 +02:00
Witold Filipczyk
3406220379 [quickjs] element.matches
TODO forEach
2024-05-06 21:07:27 +02:00
Witold Filipczyk
7c9c3f83bf [quickjs] element.querySelector 2024-05-06 21:01:04 +02:00
Witold Filipczyk
42d2da4be5 [quickjs] document.querySelector 2024-05-06 20:52:29 +02:00
Witold Filipczyk
a6d368d2ab [quickjs] URL 2024-05-06 20:41:55 +02:00
Witold Filipczyk
8bba9f8c4e [spidermonkey] forEach and other Array methods for nodelist 2024-05-06 18:40:02 +02:00
Witold Filipczyk
15ac18c04f [spidermonkey] element.querySelectorAll 2024-05-06 16:32:15 +02:00
Witold Filipczyk
bbe14cddc3 [spidermonkey] document.querySelectorAll 2024-05-06 16:22:18 +02:00
Witold Filipczyk
610eb4b450 [spidermonkey] Fixes for closest 2024-05-05 21:52:07 +02:00
Witold Filipczyk
09447c7812 [spidermonkey] element.closest
There is invalid free when selector is not matched.
2024-05-05 21:02:36 +02:00
Witold Filipczyk
10555292b4 [interlink] trigger was unitialized 2024-05-05 20:46:48 +02:00
Witold Filipczyk
face74fd38 [spidermonkey] element.matches 2024-05-05 19:54:12 +02:00
Witold Filipczyk
667167bd90 [spidermonkey] element.querySelector 2024-05-05 19:36:41 +02:00
Witold Filipczyk
4a6b920586 [ecmascript] walk_tree_query moved to ecmascript-c.c 2024-05-05 19:29:52 +02:00
Witold Filipczyk
cc718c30b5 [spidermonkey] document.querySelector
It passes test case.
2024-05-05 16:58:10 +02:00
Witold Filipczyk
f2fbde2de7 [dos] fallback to __dpmi_get_free_memory_information 2024-05-02 20:47:01 +02:00
Witold Filipczyk
af85de2535 [win32] Get free memory info 2024-05-02 19:58:16 +02:00
Witold Filipczyk
f8d08d1db3 [osdep] os_get_free_mem_in_mib
DOS and Linux implementation. Called in bfu/leds.c
2024-05-02 14:31:27 +02:00
Witold Filipczyk
f48cec877e [spidermonkey] URL
A few getters passed tests.
2024-04-29 19:44:31 +02:00
Witold Filipczyk
1c9c30ad75 [types] %ld is for long 2024-04-26 22:41:39 +02:00
Witold Filipczyk
110cdef5c2 [anonymous] about:config was available in anonymous mode 2024-04-25 17:29:39 +02:00
Witold Filipczyk
23c5c8b866 [status] Boolean option ui.show_mem
Display available memory from /proc/meminfo.
2024-04-25 16:44:39 +02:00
Witold Filipczyk
0f1e056875 [options] Minor optimisation. Store value of "test" option in variable 2024-04-23 16:07:35 +02:00
Witold Filipczyk
af20c0e7e8 [css] execute old css code, when libcss is disabled, but compiled-in 2024-04-22 20:59:30 +02:00
Witold Filipczyk
d86ce27523 [css] Add to the end of list. Refs #301
It needs more testing.
2024-04-20 20:06:45 +02:00
Witold Filipczyk
e136d663c9 [idn2] This else does not make sense 2024-04-18 20:33:52 +02:00
Witold Filipczyk
ac7292ef82 [idn] one variable less 2024-04-18 19:31:48 +02:00
Witold Filipczyk
4d7e94c5e4 [idn2] Warnings when built with -Didn=false . Spotted by jon 2024-04-18 19:08:23 +02:00
Witold Filipczyk
cdf02f5e0c [libcss] Removed unused function 2024-04-18 17:12:27 +02:00
Witold Filipczyk
9ee4ebfa46 [bfu] clang's warning 2024-04-18 17:09:11 +02:00
Witold Filipczyk
77addf7277 [scripting] silence warning 2024-04-18 09:15:10 +02:00
Witold Filipczyk
ebe3672e10 [select] unused function 2024-04-18 08:57:52 +02:00
Witold Filipczyk
324bd02aa9 [encoding] compilation fix (unsigned int bitfields) 2024-04-18 08:51:56 +02:00
Witold Filipczyk
98e82717ea [curl] Option protocol.ftp.curl_tls13_ciphers
ciphers for ftpes.
2024-04-16 12:41:18 +02:00
Witold Filipczyk
f17f2d75ad [curl] option protocol.https.curl_tls13_ciphers
It is a colon separated list of ciphers. Mainly for testing.
See https://curl.se/docs/ssl-ciphers.html
2024-04-16 12:30:56 +02:00
Witold Filipczyk
141ad11ad5 [curl] Added bandwith limit for ftp and http.
protocol.ftp.curl_max_recv_speed
protocol.ftp.curl_max_send_speed
protocol.http.curl_max_recv_speed
protocol.http.curl_max_send_speed

Unit is byte per second. 0 - unlimited.
2024-04-15 19:52:23 +02:00
Witold Filipczyk
ea9d93d44b [test] Make compilable test mailcap-cache. Refs #298 2024-04-15 08:34:08 +02:00
Witold Filipczyk
26815e829a Merge branch 'assert' 2024-04-13 13:56:54 +02:00
Scott Mcdermott
3d1f020a3b [interlink] speed up first elinks, and use pipe trigger for fork_on_start
When the first elinks session starts (whether fork_on_start or not), it
tries to connect on AF_UNIX socket, to see if an existing master is
present.  The current code implements a retry loop with linear-increase
retry backoff, 50ms *= attempts, with 3 attempts, total delay 300ms,
before concluding master is not present.

After forking for fork_on_start, we do have to wait for the new master
to finish setup, so we can connect to it.  This is the case where retry
loop might be useful.  However in fork_on_start=0 case, there should be
no reason to ever wait: if we get ECONNREFUSED or ENOENT, the master
simply is not there, we can go on about our business as the master.

With fork_on_start=1 however, we will race with the child (that will
become the new master), which has to complete its socket/bind/listen
sequence.  Therefore we typically have to wait another 50ms (first
attempt delay), for a total of 350ms delay.

In both cases, there does not seem to be a purpose to the initial
connection attempt retry.  Conclusion after connect() failure should be
authoritative: there is no master.  We do not race with anyone.

If we have done fork_on_start and have to wait, we can instead open a
pipe before forking, and wait for the "new" master (its child) to send
us a byte over the pipe.  Thus, we do not need to poll, but can simply
block until we get the trigger, to indicate that AF_UNIX socket setup
has completed.

This speeds up the first start of elinks by 300ms for fork_on_start=0,
and between 300-350ms for fork_on_start=1 (or possibly more, if the
machine is loaded and child did not finish AF_UNIX setup in first 50ms).
2024-04-12 22:51:01 -07:00
Scott Mcdermott
b482b9e069 [interlink] do not nest retries for connect_to_af_unix(), it has already
Not sure why a retry loop using MAX_BIND_TRIES / BIND_TRIES_DELAY
surrounds connect_to_af_unix(), since bind() is done elsewhere in the
code, and connect_to_af_unix() already has its own retry loop inside the
function, with its own set of defines for retries, i.e. MAX_CONNECT_TRIES
/ CONNECT_TRIES_DELAY, surrounding the connect().  No need to have two
levels of retry; if it's not successful within connect_to_af_unix() it
will never be.
2024-04-12 20:05:53 -07:00
Witold Filipczyk
3f9af02ff6 [ecmascript] Do not rewrite html when testing 2024-04-12 16:17:41 +02:00
Witold Filipczyk
86b621966e [mujs] console.exit 2024-04-11 19:17:10 +02:00
Witold Filipczyk
58515c8df4 [quickjs] console.exit 2024-04-11 19:10:41 +02:00
Witold Filipczyk
6adca27072 [test] Added command line option --test
If --test 1, then elinks is headless. Display is /dev/null.
console.exit(0); or console.exit(1);
terminates elinks session.

console.exit is implemented for spidermonkey only.
2024-04-11 18:58:07 +02:00
Witold Filipczyk
e9ad5b4d70 [mujs] console.assert 2024-04-11 17:52:29 +02:00
Witold Filipczyk
43fb1e84bc [quickjs] console.assert 2024-04-11 17:38:49 +02:00
Witold Filipczyk
4190613ed2 [spidermonkey] console.assert 2024-04-11 17:27:15 +02:00
Witold Filipczyk
7545b8093d [getpid] Removed check for HAVE_GETPID
It is assumed that every supported system has getpid().
2024-04-11 11:17:30 +02:00
Witold Filipczyk
1489e4002a [style] shorter 2024-04-11 08:07:48 +02:00
Scott Mcdermott
b2556aa953 [fg] track master proc for suspend via pids, not term fds, for fork_on_start
When ui.sessions.fork_on_start, we fork a process that has a different
fdout than get_output_handle() (which has hardcoded fdout of 1), so it
will never be considered term->master, yet this is the process we want
to wake up in SIGTSTP handler.

Since we cannot rely on term->master to determine if we are the master
process, we instead move master_pid to be set explicitly at the places
where we have information about whether our process is a master or a
slave: first on start, then once the interlink determination has been
made.

master_pid has to be set in both parent and child, because both will get
suspended and need to know which one needs to resume in background with
SIGCONT (the master).  We can't inherit from the parent because it's
unknown at the time of fork.

Previously, master_pid worked correctly with fork_on_start=0,
-no-connect or -dump, but not with fork_on_start=1.

See #287 for background.
2024-04-10 15:14:23 -07:00
Witold Filipczyk
5886cad776 [curl] Once again disable FOLLOWLOCATION
The issue with curl is that it does not work with rememberred passwords.
2024-04-09 20:27:30 +02:00
Witold Filipczyk
e183bc7bab [style] perl-like {} 2024-04-08 15:01:58 +02:00
Scott Mcdermott
dbdd49718d [mailcap] allow to run 'mailcap-cache' test with --display=0/1 or yes/no
the tests do not allow ever matching the entries with DISPLAY=:0 test,
since it's hardcoded to force $DISPLAY unset

leave default unchanged, (forced unset), but just add a command line
flag if user wants to match the entry with $DISPLAY set in mailcap
2024-04-08 02:22:43 -07:00
Scott Mcdermott
afc5ac5deb [mailcap] silence compiler warning about get_mailcap_path() const qualifier
it's declared "const char *path" in "struct option_init", but we're
using it as char *, so cast it
2024-04-08 02:14:19 -07:00
Scott Mcdermott
d1621e7230 [mailcap] make a meson 'test-mailcap' option that only builds mailcap tests
Not all 'test' compiled, and only needed to test mailcap, so separated
it out.  It will still be built with 'test' option like before.
2024-04-08 01:55:25 -07:00
Witold Filipczyk
4c3d7ecbc4 [win32] Check if cmdline_options is not NULL 2024-04-07 19:57:59 +02:00
Witold Filipczyk
a1b438a140 [types] get rid of longptr_T 2024-04-07 19:55:02 +02:00
Witold Filipczyk
699531f541 [options] intptr_t instead of longptr_T
longptr_T was not long enough on Windows
2024-04-07 19:50:11 +02:00
Witold Filipczyk
d09f8060ee [types] Define OFFT_MAX somehow 2024-04-04 15:30:09 +02:00
Witold Filipczyk
41724fb217 [config] Compilation fix 2024-04-04 15:27:56 +02:00
Witold Filipczyk
3ca409f53f [curl] Send Accept-Language 2024-03-29 19:13:53 +01:00
Witold Filipczyk
674fa3c907 [curl] duplicate 2024-03-29 18:52:51 +01:00
Witold Filipczyk
085c87edbc [curl] Reset string with headers
When following urls, headers were added to previous values.
2024-03-29 13:38:32 +01:00
Witold Filipczyk
d10108751f [curl] FOLLOWLOCATION 1
It does not execute follow-url-hook, but works.
2024-03-29 11:50:04 +01:00
Witold Filipczyk
d12dacf6ab [config] mkdir_with_parents for config directory
Based on glib2 code
2024-03-27 15:47:32 +01:00
Witold Filipczyk
f2690c3e21 [loop] check_bottom_halves after starting libevent and curl
dump with curl enabled did not work
2024-03-18 18:19:12 +01:00
Witold Filipczyk
88de3ca754 [perl] ses can be NULL for pre_format_html_hook. Refs #291 2024-03-18 12:44:02 +01:00
Witold Filipczyk
e47a482590 [signals] Removed code related to SIGALRM
links does not have such code.
2024-03-17 17:05:22 +01:00
Witold Filipczyk
6684f4bdef [select] Always compile-in select's version of curl functions
For -no-libevent 1
2024-03-17 17:00:13 +01:00
Witold Filipczyk
5410019b88 [select] Add suffix _select for curl's select related functions 2024-03-17 16:54:54 +01:00
Witold Filipczyk
c1d4d7d9bc [signals] EINTRLOOP for consistence 2024-03-17 11:03:48 +01:00
Witold Filipczyk
5db5d33911 [libdom] Check charset in document only when it was not present in headers 2024-03-12 21:41:06 +01:00
Witold Filipczyk
415cd4d261 [mujs] CustomEvent 2024-03-12 18:33:45 +01:00
Witold Filipczyk
87c492680c [quickjs] CustomEvent 2024-03-12 17:56:47 +01:00
Witold Filipczyk
072acebcc8 [spidermonkey] CustomEvent 2024-03-12 17:38:31 +01:00
Witold Filipczyk
909f8bac07 [mujs] More properties for MessageEvent 2024-03-11 18:07:51 +01:00
Witold Filipczyk
a46524f579 [quickjs] More properties for MessageEvent (copied from Event) 2024-03-11 17:44:04 +01:00
Witold Filipczyk
c7c494fc2b [spidermonkey] More properties for MessageEvent 2024-03-11 17:24:44 +01:00
Witold Filipczyk
65ce0cdd20 [mujs] Copy properties Event -> KeyboardEvent 2024-03-11 16:39:42 +01:00
Witold Filipczyk
f6ca5b8ce8 [quikcjs] Copied props from Event to KeyboardEvent 2024-03-11 16:14:19 +01:00
Witold Filipczyk
1ad7db0e63 [spidermonkey] copied properties and code from Event to KeyboardEvent 2024-03-11 15:54:26 +01:00
Witold Filipczyk
dd40377e71 [mujs] 2nd param for Event constructor 2024-03-10 19:08:31 +01:00
Witold Filipczyk
d0e80bbe83 [quickjs] second param for Event constructor 2024-03-10 18:55:03 +01:00
Witold Filipczyk
48c5e80b31 [spidermonkey] handle second argument for Event constructor 2024-03-10 18:43:32 +01:00
Witold Filipczyk
0d28694b45 [mujs] event.preventDefault 2024-03-10 18:11:44 +01:00
Witold Filipczyk
da7a525c99 [quickjs] event.preventDefault() 2024-03-10 18:06:56 +01:00
Witold Filipczyk
3ccb7e664b [spidermonkey] event.preventDefault 2024-03-10 18:00:51 +01:00
Witold Filipczyk
0da45fcfd0 [mujs] event.cancelable 2024-03-10 17:46:50 +01:00
Witold Filipczyk
86bf551d54 [quickjs] event.cancelable getter 2024-03-10 17:39:06 +01:00
Witold Filipczyk
1ede76820c [spidermonkey] event.{bubbles,cancelable,composed,defaultPrevented}
Non-changable yet.
2024-03-10 17:18:00 +01:00
Witold Filipczyk
cc0d93cfba [mujs] event placeholder 2024-03-10 16:49:26 +01:00
Witold Filipczyk
00b108f200 [quickjs] event placeholder 2024-03-10 16:30:26 +01:00
Witold Filipczyk
d58fffce47 [spdermonkey] placeholder for Event implementation
Event.type is implemented.
2024-03-10 16:02:33 +01:00
Witold Filipczyk
b53bcce570 [libevent] copied related to signals code from links2
I don't know how it works, but CTRL-Z suspends without additional
keystrokes when libevent is enabled.
2024-03-08 21:14:17 +01:00
Witold Filipczyk
ce13ef6f97 [event] Do not mix libev headers with libevent 2024-03-08 13:33:58 +01:00
Witold Filipczyk
8167173954 Revert "[libevent] These lines seem not needed"
This reverts commit 419ead8604.
2024-03-07 19:22:52 +01:00
Witold Filipczyk
419ead8604 [libevent] These lines seem not needed 2024-03-07 19:15:51 +01:00
Witold Filipczyk
432771ac82 [fg] master_pid is 0 for slave terminals, so no need to comapare with pid 2024-03-07 13:47:30 +01:00
Witold Filipczyk
b102addf9f [fg] Try to send CONT signal only from the master instance. Refs #287 2024-03-07 11:44:42 +01:00
Witold Filipczyk
9c04585e84 [terminal] Add cell_height and cell_width to structs unconditionally. Refs #288 2024-03-07 08:22:57 +01:00
Witold Filipczyk
0acfd90225 [fg] Resize terminal after CTRL-Z and fg. Refs #287 2024-03-06 11:06:39 +01:00
Witold Filipczyk
f807c611fa [quickjs] document.addEventListener 2024-03-04 21:47:34 +01:00
Witold Filipczyk
8e8d9df4d6 [spdermonkey] init list of listeners in document 2024-03-04 21:24:28 +01:00
Witold Filipczyk
b5b09f1ba1 [mujs] document.addEventListener 2024-03-04 21:21:31 +01:00
Witold Filipczyk
c231b31ac0 [spidermonkey] document.addEventListener 2024-03-03 21:37:51 +01:00
Witold Filipczyk
f762775b9d [ecmascript] Commented out clientHeight and similar properties
Code is not ready yet.
2024-03-02 19:13:45 +01:00
Witold Filipczyk
862dfcc672 [document] parse meta also when there are headers 2024-02-28 20:37:24 +01:00
Witold Filipczyk
010deec2dc [ecmascript] free_document 2024-02-02 19:44:18 +01:00
Witold Filipczyk
3c5a61b524 [ecmascript] parse document after document.write in onload 2024-02-02 19:33:20 +01:00
Witold Filipczyk
4ee7b050a4 [spidermonkey] localstorage -> localStorage 2024-02-02 19:13:00 +01:00
Witold Filipczyk
9516ca43ff [ecmascript] Always reparse document 2024-01-31 11:32:53 +01:00
Witold Filipczyk
e7562a3120 [spdermonkey] xhr -> XMLHttpRequest 2024-01-31 11:12:32 +01:00
Witold Filipczyk
404e93c773 [spidermonkey] unref dom_node once in finalizer 2024-01-30 20:29:08 +01:00
Witold Filipczyk
379a8edbc9 [quickjs] style.cssText 2024-01-30 17:49:16 +01:00
Witold Filipczyk
64b0898b8c [mujs] style.cssText 2024-01-30 17:36:03 +01:00
Witold Filipczyk
8c58bdfb99 [spidermonkey] style.cssText
For getter just copy style attribute.
For setter more complicated.
2024-01-29 18:57:13 +01:00
Witold Filipczyk
4b7756f74c [spidermonkey] Code special for shellinabox
pre#cursor is width of one cell.
pre#console full width
2024-01-28 18:01:32 +01:00
Witold Filipczyk
2da397a44e [quickjs] offsetWidth and offsetHeight call clientWidth and clientHeight
For <body>, <html> full height.
For <body>, <html> and <div> full width.
2024-01-28 16:47:52 +01:00
Witold Filipczyk
5841cd5c94 [mujs] for <body>, <html> or <div> clientWidth returns full width of window 2024-01-28 16:38:20 +01:00
Witold Filipczyk
84c0b4886b [spidermonkey] full width also for DIV element 2024-01-28 16:29:57 +01:00
Witold Filipczyk
4a94b6150e [spidermonkey] clientHeight and offsetHeight the same function
For <body> and <html> return height or width of screen.
2024-01-28 16:22:15 +01:00
Witold Filipczyk
330bfb7d29 [quickjs] window.innerWidth and innerHeight 2024-01-28 15:24:47 +01:00
Witold Filipczyk
3456d27b22 [mujs] window.innerHeight and innerWidth 2024-01-28 15:20:10 +01:00
Witold Filipczyk
c0a3bce766 [spidermonkey] window.{innerHeight,innerWidth} 2024-01-28 15:14:48 +01:00
Witold Filipczyk
7b3c450293 [quickjs] style.{height,left,top} 2024-01-28 14:27:55 +01:00
Witold Filipczyk
e66f142b7a [mujs] style.{height,left,top} 2024-01-28 14:22:07 +01:00
Witold Filipczyk
0c571b7a3c [spidermonkey] style.top 2024-01-27 21:00:39 +01:00
Witold Filipczyk
3c7b41894e [spidermonkey] style.left 2024-01-27 20:57:16 +01:00
Witold Filipczyk
2c8ffe31f9 [spidermonkey] style.height 2024-01-27 20:53:19 +01:00
Witold Filipczyk
73e507737a [spidermonkey] Return width or height of a single cell for not found elements
For clientHeight and similar.
2024-01-27 20:25:56 +01:00
Witold Filipczyk
1742e87854 [quickjs] offsetHeight and offsetWidth 2024-01-27 16:04:08 +01:00
Witold Filipczyk
8b35062e10 [mujs] offsetWidth and offsetHeight 2024-01-27 15:59:49 +01:00
Witold Filipczyk
8b3ece5b82 [spidermonkey] element.offsetHeight and element.offsetWidth
The same code as clientHeight and clientWidth accordingly.
2024-01-27 15:54:52 +01:00
Witold Filipczyk
224c198781 [quickjs] element.offsetTop 2024-01-27 15:31:39 +01:00
Witold Filipczyk
7c72d49f0c [mujs] element.offsetTop 2024-01-27 15:26:09 +01:00
Witold Filipczyk
317737fa34 [spidermonkey] element.offsetTop 2024-01-27 15:23:09 +01:00
Witold Filipczyk
7bccb89efb [spidermonkey] element.offsetLeft 2024-01-27 15:19:24 +01:00
Witold Filipczyk
8d597b1148 [quickjs] element.offsetLeft 2024-01-27 15:11:38 +01:00
Witold Filipczyk
21187f88c8 [mujs] element.offsetLeft 2024-01-27 15:04:30 +01:00
Witold Filipczyk
8ec6ca70fe [spidermonkey] element.offsetParent (parentNode) 2024-01-27 14:49:54 +01:00
Witold Filipczyk
b61c51ed43 [quickjs] element.offsetParent 2024-01-27 14:45:23 +01:00
Witold Filipczyk
62d21a222e [mujs] element.offsetParent
For now the same as parentNode.
2024-01-27 14:41:54 +01:00
Witold Filipczyk
8238393479 [spidermonkey] element.clientWidth 2024-01-27 14:20:29 +01:00
Witold Filipczyk
bc37d44d52 [quickjs] element.clientWidth 2024-01-27 14:16:48 +01:00
Witold Filipczyk
82dae118f0 [mujs] element.clientWidth 2024-01-27 14:16:34 +01:00
Witold Filipczyk
d8007fafaf [spidermonkey] element.clientHeight 2024-01-27 14:09:24 +01:00
Witold Filipczyk
2800597913 [quickjs] element.clientHeight 2024-01-27 14:02:13 +01:00
Witold Filipczyk
e4b4586780 [mujs] element.clientHeight 2024-01-27 13:54:07 +01:00
Witold Filipczyk
84660b694d [node] get_element -> get_element_rect 2024-01-27 13:53:24 +01:00
Witold Filipczyk
06ffcc8085 [spidermonkey] cell_width and cell_height in screen 2024-01-27 12:34:03 +01:00
Witold Filipczyk
89955cc13a [quickjs] cell_width and cell_height 2024-01-27 12:14:01 +01:00
Witold Filipczyk
bc13ff2e1a [mujs] cell_height and cell_width in screen instead of hardcoded 16 and 8. 2024-01-27 12:08:23 +01:00
Witold Filipczyk
129683d70f [spidermonkey] element.clientLeft and element.clientTop 2024-01-26 21:31:13 +01:00
Witold Filipczyk
a72db310b4 [quickjs] element.clientLeft and element.clientTop 2024-01-26 21:24:13 +01:00
Witold Filipczyk
81c692e6b8 [mujs] element.clientLeft and element.clientTop
They always return 0.
2024-01-26 21:17:30 +01:00
Witold Filipczyk
9e743f0e80 [renderer] Reorder instructions 2024-01-26 19:02:26 +01:00
Witold Filipczyk
9e3d874577 [document] Added function scan document
This function must calculate dimensions of nodes in document.
Every node has a rectangle. x0,y0 is the left up corner, x1,y1 - the right bottom.
In theory every child of given node is contained in this rectangle.
2024-01-26 18:43:33 +01:00
Witold Filipczyk
5c8b62247a [screen] Test commit. Added element_offset to struct screen_char 2024-01-21 17:02:09 +01:00
Witold Filipczyk
937f6b415e [ecmascript] Changed declarations of ecmascript_timeout
Also free functions in quickjs version.
2024-01-20 15:56:23 +01:00
Witold Filipczyk
d34ae1371d [ecmascript] clearInterval and setInterval
Changed return type of ecmascript_set_timeout.
Now it is pointer to struct ecmascript_timeout.
2024-01-19 22:10:02 +01:00
Witold Filipczyk
e77ff5aa8b [quickjs] window.getComputedStyle 2024-01-19 17:17:11 +01:00
Witold Filipczyk
dd87474f06 [mujs] window.getComputedStyle 2024-01-18 20:53:17 +01:00
Witold Filipczyk
797124fc2a [spidermonkey] window.getComputedStyle
It is fake, it returns "0" for "marginTop", "marginLeft" and "marginRight".
2024-01-18 18:41:20 +01:00
Witold Filipczyk
d393a06f07 [mujs] document.defaultView 2024-01-17 17:12:18 +01:00
Witold Filipczyk
ebb41e9c67 [quickjs] document.defaultView 2024-01-17 17:05:36 +01:00
Witold Filipczyk
5297063bbe [spidermonkey] document.defaultView 2024-01-17 16:55:52 +01:00
Witold Filipczyk
addc4a7c43 [quickjs] location.replace 2024-01-16 18:51:48 +01:00
Witold Filipczyk
4aa0ff661f [mujs] location.replace 2024-01-16 18:45:44 +01:00
Witold Filipczyk
2d4d46f939 [spidermonkey] location.replace
I guess there is something wrong with this function.
2024-01-16 18:39:00 +01:00
Witold Filipczyk
afb2a7da28 [quickjs] location.assign 2024-01-16 17:57:45 +01:00
Witold Filipczyk
65998ab36b [mujs] location.assign 2024-01-16 17:47:04 +01:00
Witold Filipczyk
ebaceedab2 [spidermonkey] location.assign 2024-01-16 17:38:26 +01:00
Witold Filipczyk
103669e825 [html5] Also add NAV element. Refs #282 2024-01-07 20:11:00 +01:00
Witold Filipczyk
94cfc49ce1 [win32] Every mouse DOWN followed by UP
It is rather a workaround, but works for the right button click.
2024-01-07 16:18:54 +01:00
Witold Filipczyk
ef80897185 [html5] Stubs for html_main and html_article. Refs #282 2024-01-07 11:43:18 +01:00
Witold Filipczyk
69edab0036 [libcss] initialize unit_len_ctx with zeroes 2024-01-07 11:41:52 +01:00
Witold Filipczyk
a96b9fba1f [win32] middle and right buttons were swapped
Right-click menu still not functional.
It appears, but disaappers immediately, and "Go back" action is choosen.
2024-01-06 15:51:44 +01:00
Witold Filipczyk
389df54184 Revert "[head] addcrlf". Refs #281
This reverts commit 90d4f17031.
2024-01-06 09:33:40 +01:00
Witold Filipczyk
0b7cdab108 [terminal] Do not draw the right bottom cell
For wineconsole.
2024-01-05 19:29:58 +01:00
Witold Filipczyk
6642ebe509 [win32] Some changes in mouse handling
It is a step forward. There some problems with wheel, the right mouse button.
2024-01-04 18:29:31 +01:00
Witold Filipczyk
84f6a08f83 [kbd] Test commit. Change <= 0 to < 0
I'm trying to debug mouse issues.
2024-01-03 21:37:07 +01:00
Witold Filipczyk
2fdb04a6ab [libcss] bump libcss to 0.9.2 and libdom to 0.4.2
Needs some tweaks. Code is compilable at least.
2024-01-01 17:47:59 +01:00
Witold Filipczyk
f89705df74 [spidermonkey] Bump mozjs dependency to mozjs-115 2024-01-01 13:24:32 +01:00
Witold Filipczyk
378842a349 [quickjs] C only
There are some bugs left.
2023-12-31 16:08:35 +01:00
Witold Filipczyk
4c7364c14e [mujs] Code rewritten to C
Likely some bugs were introduced here.
elinks with mujs suppport can be built by tcc.
2023-12-30 21:42:31 +01:00
Witold Filipczyk
8b5cb79485 [ecmascript] Copy of ecmascript.cpp as ecmascript.c 2023-12-29 20:53:53 +01:00
Witold Filipczyk
3f3a38145a [ecmascript] New try to compile code by C compiler
ecmascript-c.c is compilable by C compilers and ecmascript-c.cpp
which includes ecmascript-c.c is compilable by C++ compilers.
2023-12-29 20:42:21 +01:00
Witold Filipczyk
c473ce5522 [quickjs] quickjs.cpp -> quickjs.c 2023-12-29 19:27:26 +01:00
Witold Filipczyk
6ad38f3814 [mujs] mujs.cpp -> mujs.c 2023-12-29 19:23:50 +01:00
Witold Filipczyk
7de0146ded [ecmascript] localstorage-db.cpp -> localstorage-db.c
This code is pure C. There are some memory leaks.
They will be addressed later.
2023-12-29 18:46:19 +01:00
Witold Filipczyk
78483386c2 [ecmascript] timer.cpp -> timer.c
hash instead of map.
The goal is to get C++ free code for mujs and quickjs.
2023-12-29 18:29:13 +01:00
Witold Filipczyk
447c452339 [download] No need to double check 2023-12-28 13:03:45 +01:00
Witold Filipczyk
fd5e164b8f [download] memory leaks 2023-12-28 13:01:01 +01:00
Witold Filipczyk
204234b921 [memcount] libevent malloc, realloc, free replacement functions 2023-12-26 19:09:32 +01:00
Witold Filipczyk
b1bf9e8dba [libevent] Add SOCK_SHIFT for curl and libevent 2023-12-26 17:04:24 +01:00
Witold Filipczyk
1f4ca1445d [libevent] include event2/event.h instead of event.h 2023-12-26 15:53:22 +01:00
Witold Filipczyk
5211b2d8a1 [curl] fifo_event was unused 2023-12-26 14:57:25 +01:00
Witold Filipczyk
8d0054041b [select] Another try
Set fields of timeout manually.
2023-12-20 20:31:13 +01:00
Witold Filipczyk
f91d214820 [select] This code is problematic.
EINVAL on OpenBSD/i386.
2023-12-20 18:06:20 +01:00
Witold Filipczyk
6c32ce3c61 [gettext] Let it work also on Windows
When elinks.exe is located in the src subdirectory,
.gmo files are read from the po subdirectory.
2023-12-15 10:36:17 +01:00
Witold Filipczyk
93e9ac1b4c [gettext] Revision 1 is also valid
At least I think so.
2023-12-14 21:45:08 +01:00
Witold Filipczyk
dee0b28f97 [spidermonkey] meson.build also was missing 2023-12-10 16:42:32 +01:00
Witold Filipczyk
6f11b9be8b [windows] Fixes for FSP (send and recv) 2023-12-09 19:57:08 +01:00
Witold Filipczyk
2ace5374c8 [cast] cast to intptr_t to silence compiler 2023-12-08 11:14:27 +01:00
Witold Filipczyk
b894447af1 [hash] drop const for key 2023-12-08 11:11:06 +01:00