1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00
Commit Graph

1043 Commits

Author SHA1 Message Date
Witold Filipczyk
761752239f [ecmascript] Try to not put_interpreter when page is modified 2024-06-08 14:08:28 +02:00
Witold Filipczyk
ffa6c0c2a7 [meson] / operator for paths 2024-06-03 17:22:24 +02:00
Witold Filipczyk
5efad5b30a [spidermonkey] fire_onload
This function is to dispatch the "DOMContentLoaded" event.
2024-05-28 21:07:59 +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
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
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
cc718c30b5 [spidermonkey] document.querySelector
It passes test case.
2024-05-05 16:58:10 +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
cdf02f5e0c [libcss] Removed unused function 2024-04-18 17:12:27 +02: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
9c04585e84 [terminal] Add cell_height and cell_width to structs unconditionally. Refs #288 2024-03-07 08:22:57 +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
84660b694d [node] get_element -> get_element_rect 2024-01-27 13:53:24 +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
103669e825 [html5] Also add NAV element. Refs #282 2024-01-07 20:11:00 +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
389df54184 Revert "[head] addcrlf". Refs #281
This reverts commit 90d4f17031.
2024-01-06 09:33:40 +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
2ace5374c8 [cast] cast to intptr_t to silence compiler 2023-12-08 11:14:27 +01:00
Witold Filipczyk
8badb62c34 [document] I did not test it, but I guess it must be & prepended here 2023-11-29 16:15:34 +01:00
Witold Filipczyk
a5d2119dbf [map] Reimplemented map as hash
Maybe it is slower, but C only.
2023-11-28 19:55:37 +01:00
Witold Filipczyk
9dedc5779b [dcument] Compilation fix 2023-11-27 18:33:44 +01:00
Witold Filipczyk
bfd3f01d35 [document] document.cpp -> document.c
Moved some code to ecmascript-c.cpp.
2023-11-27 16:38:58 +01:00
Witold Filipczyk
a07f339fd1 [document] get rid of C++ list.
In first place it was implemented in C++ because of memory corruption problems.
2023-11-27 16:26:09 +01:00
Witold Filipczyk
424466740c [document] renderer.cpp -> renderer.c
Moved ecmascript code to ecmascript-c.cpp
2023-11-26 19:47:59 +01:00
Witold Filipczyk
58b0b39200 [hr] char -> unsigned char to avoid warning 2023-11-17 16:04:05 +01:00
Witold Filipczyk
ec9708a87e [document] init_string(&document->text) 2023-11-11 16:34:12 +01:00
Witold Filipczyk
263a06396d [document] Free previous document->title if was set 2023-10-27 16:54:18 +02:00
rkd77
a9ea05f0de
Merge pull request #269 from balducci/master
make it build when CONFIG_ECMASCRIPT is undefined
2023-10-24 18:43:41 +02:00
gabriele balducci
1112827be6 make it build when CONFIG_ECMASCRIPT is undefined 2023-10-24 18:00:11 +01:59
Witold Filipczyk
007fef1d6c [forms] Temporarily comment assertion 2023-10-24 12:34:27 +02:00
Witold Filipczyk
f12134c2cf [libdom] unlock cached 2023-10-20 18:04:48 +02:00
Witold Filipczyk
9563fef842 [document] check also doc_view->vs 2023-10-20 13:44:41 +02:00
Witold Filipczyk
9504926c6b [frames] Do not free doc_view, when toggle html -> plain
I know it is not correct, but at least does not crash.
2023-10-15 16:06:53 +02:00
Witold Filipczyk
235d998a6a [ecmascript] scroll again
scroll3.html works if started as the first page.
2023-10-05 16:42:53 +02:00
Witold Filipczyk
8596d604cc [dom] rewrite cache 2023-09-29 18:51:58 +02:00
Witold Filipczyk
3b233ba711 [libcss] this assertion fails 2023-09-29 17:15:12 +02:00
Witold Filipczyk
7fc8c2088f [document] format_cache implemented as std::list
Slower, but works for my testcase.
2023-09-28 19:44:09 +02:00
Witold Filipczyk
6487a287cf [document] Slightly better handling of string 2023-09-28 12:04:57 +02:00
Witold Filipczyk
98e72e99f3 [document] text as struct string 2023-09-28 11:54:46 +02:00
Witold Filipczyk
e80a2f7014 Merge branch 'master' into router 2023-09-28 10:40:45 +02:00
hedy
7266ac4cbd
[gemini] Use paragraph tags on gemtext empty lines
This patch makes paragraphs separated by an empty new line appear after
an empty new line when rendered in elinks.

Previously, for a gemtext source that looks like this:

    First para
    Second line

    Second para

It renders like this:

    First para
    Second line
    Second para

After this patch, they now render like this:

    First para
    Second line

    Second para

Unfortunately this also adds a </p> to the start of the HTML, as well as
a <p> at the end, both redundant; but since the HTML is parsed and
rendered later on, it does not seem to alter how the document would
look.

    </p><p> First para <br> Second line </p><p> Second para </p><p>

I could possibly add a `first_paragraph` variable and a `i !=
buffer->length` check to remove the first </p> and last <p> in the HTML,
making the HTML source "prettier". But I don't believe that would be too
beneficial, considering the performance tradeoff in executing these two
extra checks for each empty new line encountered.

For testing please see: gemini://hedy.tilde.cafe/tmp/paragraphs.gmi
2023-09-28 15:48:59 +08:00