1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-01 02:05:33 +00:00
Commit Graph

50 Commits

Author SHA1 Message Date
Witold Filipczyk
9a6edd69db [libdom] Possibility to build libcss code without ecmascript.
meson config option libcss enabled by default.
To enable libcss in elinks:
set document.css.libcss = 1
2023-05-15 19:13:38 +02:00
Witold Filipczyk
0ff62b5ee8 [ecmascript] Added ecmascript_string_item_list.
This struct will contain info about current script element.
2022-11-14 21:17:24 +01:00
Witold Filipczyk
d7f4f94a62 [click] Added eventListener. It works for these two test cases. 2022-11-07 20:59:19 +01:00
Witold Filipczyk
3330427738 [ecmascript] onkeyup and onkeydown 2022-11-03 19:30:57 +01:00
Witold Filipczyk
bce7e87bb8 [ecmascript] Handle more than 1 timeout at the same time. 2022-09-07 20:41:46 +02:00
Witold Filipczyk
98b3f14927 [quickjs] forms also as array
Sometimes it works, sometimes not.
2021-11-15 17:13:51 +01:00
Witold Filipczyk
06d50a9ccc [iframe] Copy-paste programming does not work 2021-07-25 23:07:05 +02:00
Witold Filipczyk
221f246d4c [iframe] Begining of iframe rewrite 2021-07-19 22:12:03 +02:00
Witold Filipczyk
8b76c1331d [document] free text allocated by renderer2 2021-07-18 13:35:31 +02:00
Witold Filipczyk
fa49422f88 [document] Programming by coincidence.
scroll3 works, width.html works, accesskey still does not
2021-06-27 13:01:19 +02:00
Witold Filipczyk
63d892838c [getElementById] small success. see test/ecmascript/element.html
Now memory leaks, etc. are not taken into account.
For the beginning I will implement read properties.
2021-05-02 17:27:35 +02:00
nobody@earth.com
f953744189 [smjs document replace] fixed property location, replace and writeln functions, tests 2021-02-24 11:23:34 +01:00
Witold Filipczyk
0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00
Witold Filipczyk
1f57e72212 [mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.

Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
2020-10-05 20:14:55 +02:00
Witold Filipczyk
6a960a9fb9 [viewer] New action mark-clipboard. Refs #10
Possibility to mark rectangle for clipboard.
User may bind keys to move-cursor-up, move-cursor-down, move-cursor-left,
move-cursor-right and mark-clipboard.
mark-clipboard is tristate.
First triggerred, it remembers left top corner of rectangle. Now you can move cursor.
Second time triggerred, remembers right bottom corner of rectangle.
Third time, it clears selection.

The copy-clipboard action was changed. Now if the clipboard rectangle is marked,
it copies this rectangle. If not, the current link.
2020-08-01 23:25:21 +02:00
Witold Filipczyk
6dfdd36398 form_control -> el_form_control 2018-09-09 19:18:53 +02:00
Witold Filipczyk
d8be2c505e Rename struct box to struct el_box.
In the future I want to copy some code from netsurf, so I'm preparing.
2018-09-09 19:14:56 +02:00
Witold Filipczyk
7a006b6dd2 Rewritten searching. Refs #21
Before only visible part of screen was searched for pattern.
Now whole document is searched, and beginings of found text
is remembered in document->search_points.
2018-04-14 21:49:52 +02:00
Witold Filipczyk
257422f28c Reorganisation of code to make C++ happy 2016-04-20 22:21:31 +02:00
Kalle Olavi Niemitalo
715571a5d6 HTML bug 1114: Don't doubly decode entities in attributes
The HTML parser decoded SGML entity references and numeric character
references in the following attributes, and then the renderer did the
same again:

link/@title
link/@hreflang
link/@type
link/@media
img/@alt
area/@alt
input[@type="image"]/@alt
input[@type="image"]/@name
input[@type="button"]/@value

The result was that e.g. title="A" displayed as "A"
even though it was supposed to display as "A".

Fix by making the HTML parser tell the renderer that the entities have
already been decoded.
2011-05-01 22:54:45 +03:00
Witold Filipczyk
0ec2f8eaa8 Show IP of the document in the status bar.
config options:
ui.show_ip (0/1) default 0
status.showip-text - colors
2010-03-30 14:45:19 +02:00
Miciah Dashiel Butler Masters
aafebad3f5 Document struct search 2009-05-22 20:24:34 +00:00
Kalle Olavi Niemitalo
d2854dca8d Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bookmarks/backend/default.c
	src/bookmarks/bookmarks.c
	src/session/session.c
	src/terminal/event.c
	src/viewer/text/search.c
2009-02-08 22:02:57 +02:00
Kalle Olavi Niemitalo
99d1269bc5 bug 153, 1066: Convert session-snapshot bookmarks to/from UTF-8.
These functions now expect or return strings in UTF-8:
delete_folder_by_name (sneak in a const, too), bookmark_terminal_tabs,
open_bookmark_folder, and get_auto_save_bookmark_foldername_utf8 (new
function).
2009-02-08 18:26:19 +02:00
Kalle Olavi Niemitalo
a73fe73cd2 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	src/document/document.h
	src/encoding/encoding.c
	src/network/connection.c
	src/protocol/bittorrent/bittorrent.c
	src/protocol/bittorrent/bittorrent.h
	src/protocol/bittorrent/common.h
	src/protocol/bittorrent/connection.c
	src/protocol/bittorrent/dialogs.c
	src/protocol/bittorrent/tracker.c
	src/protocol/file/cgi.c
	src/protocol/http/http.c
2008-08-03 22:18:53 +03:00
Kalle Olavi Niemitalo
018af50f1d Rename cache_entry.id and related members.
cache_entry.id => cache_entry.cache_id
document.id => document.cache_id
ecmascript_interpreter.onload_snippets_owner => .onload_snippets_cache_id

This is a combination of:

commit 232c07aa7f
bug 1009: id variables renamed, added document_id to the document.

commit 6007043458bf8f14abfc18b9db60785bdc0279f6
Revert addition of document.document_id
2008-08-03 21:27:56 +03:00
Witold Filipczyk
232c07aa7f bug 1009: id variables renamed, added document_id to the document.
cached->id => cached->cache_id
document->id => document->cache_id
onload_snippets_owner => onload_snippets_document_id
Added the distinct document->document_id.
Always reset ecmascript when a document changes for example a next chunk
of it is loaded.
2008-04-27 23:22:08 +03:00
Kalle Olavi Niemitalo
f19c948ca7 Bug 824: Disable combining characters unless --enable-combining.
Label this as an experimental feature because it has so many bugs
and it is not clear how they can be fixed.
2008-01-19 20:58:22 +02:00
Witold Filipczyk
83a4d815ae combined: Added combining characters support.
Combining characters requires a UTF-8 locale.
It slows down rendering. There is still the unresolved issue with
combining characters at the end of a document.
This patch wasn't heavilly tested. Especially a "garbage" input may cause
unpredictable results.
2008-01-19 20:49:57 +02:00
Laurent MONIN
f150f22ac9 Use color.background instead of bgcolor in struct document too.
Not useful but coherent with other changes.
2007-10-12 16:50:47 +02:00
Jonas Fonseca
8e3c2d6042 Move find_tag to document/document 2007-09-14 16:29:13 +02:00
Jonas Fonseca
5d34b4bff6 Move find_tag to document/document 2007-08-31 15:43:54 +02:00
Miciah Dashiel Butler Masters
5ada24f3ef update_cache_document_options: take @ses and pass it to get_opt calls
change_hook_active_link: pass update_cache_document_options @ses.

Now when changing the global settings, it will not simply copy the new values for the global settings to the document-options cache, but also check session-specific settings.  This doesn't really matter yet, since the options in question can't be set on a per-session basis, but is in preparation for future changes.
2007-08-30 19:19:57 +00:00
Kalle Olavi Niemitalo
870df797cf Doxygen: Escape some HTML tags. 2007-07-31 13:48:20 +03:00
Kalle Olavi Niemitalo
76c6f38169 Doxygen: Begin commands with @ not \. 2007-07-31 13:47:12 +03:00
Kalle Olavi Niemitalo
a26db3948a Doxygenate src/document/ (but not subdirs) 2007-07-28 02:34:59 +03:00
Kalle Olavi Niemitalo
d3d2bb26c5 New macro LIST_OF for better Doxygen support. 2007-07-26 22:45:51 +03:00
Miciah Dashiel Butler Masters
e523504424 Add .cached to struct document
This allows code to use document->cached instead of
find_in_cache(document->uri), thereby increasing the likelihood
of getting the correct cache entry.

This should fix Bug 756 - "assertion (cached)->object.refcount >= 0 failed"
after HTTP proxy was changed.

Patches for this were written by me and then later by Jonas.
This commit combines our independent implementations.
2006-12-10 03:11:04 +00:00
Witold Filipczyk
2fe0623298 Moved the setTimeout timer to the struct document. 2006-10-24 16:47:41 +02:00
Kalle Olavi Niemitalo
92cb452a9e Rename CONFIG_UTF_8 to CONFIG_UTF8.
The configure script no longer recognizes "CONFIG_UTF_8=yes" lines
in custom features.conf files.  They will have to be changed to
"CONFIG_UTF8=yes".  This incompatibility was deemed acceptable
because no released version of ELinks supports CONFIG_UTF_8.

The --enable-utf-8 option was not renamed.
2006-09-17 16:12:47 +03:00
Kalle Olavi Niemitalo
8850d85998 ECMAScript: If accessKey is a surrogate, throw an error when reading it.
Surrogates are now treated the same way as out-of-range characters
like U+110000; if a link has such an access key, then the ECMAScript
accessKey property cannot be read.  It seems currently impossible to
set such an access key though, because accesskey_string_to_unicode()
doesn't support multibyte characters yet.
2006-08-27 11:45:11 +03:00
Witold Filipczyk
f5351fc0dc Remember fragment of the splitted char and decode it next time. Idea by Jonas.
Not tested at all. UCS_NO_CHAR is returned only for <hr> or for UTF-8 char
which is splitted by convert_string
2006-07-21 22:10:18 +02:00
Witold Filipczyk
1adbce8429 unicode_val_T instead of unsigned char in struct search 2006-07-17 22:14:45 +02:00
Miciah Dashiel Butler Masters
2c087e52e7 Revert unstable 'Eval embedded scripts at once'
Revert commit 2f0490cb04
('Eval embedded scripts at once') and follow-up commit
997f61bb32 ('Use document_view instead of
view_state. It is safer probably') because the change causes crashes on
numerous pages and just looks wrong.
2006-02-12 15:03:12 +00:00
52d3a6411d Sort links when necessary 2006-01-28 14:13:41 +01:00
997f61bb32 Use document_view instead of view_state. It is safer probably 2006-01-28 12:07:00 +01:00
2f0490cb04 Eval embedded scripts at once 2006-01-27 10:26:58 +01:00
Jonas Fonseca
acf2ec806b Remove empty lines in start of header files
A left over from the CVS Id removal. Also, for a few files, normalize the
order in which things are declared in headers.
2005-11-15 11:33:27 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00