1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
Commit Graph

821 Commits

Author SHA1 Message Date
Jonas Fonseca
452f31d773 do_action(): Simplify checking of link requisition by testing link != NULL 2005-12-26 00:40:04 +01:00
Jonas Fonseca
1c3f6a8f3b Place cursor at start of text and only highlight the text in the managers
The old behavior would lead screeanreaders to pronounce items like the
bookmarks as "unknown-unknown-<the link name>". That is the border
chars of the tree view would be renderered as "unknown".

Requested by Klaus Knopper.
2005-12-26 00:26:04 +01:00
Jonas Fonseca
be8c68c5f7 Fix matching of file:// URLs which of course have no host name 2005-12-25 16:22:20 +01:00
Jonas Fonseca
5dd9061a55 Allocate the string of nodes being 'linkified'
This makes the string actually NUL terminated at the right place and the
matching will never go beyond the text region of the node. One example is
<!--http://elinks.cz/--> which didn't work before.
2005-12-25 16:08:00 +01:00
Jonas Fonseca
2d020e4879 Extend the URL_REGEX to allow more protocol and stuff like %XX in path part
Thanks to peder for suggestions.
2005-12-25 15:45:47 +01:00
Jonas Fonseca
4fa0937ca5 Make URL inside cdata, comment and text nodes accessible
It depends on existence of <regex.h> system header and that can be enabled
via document.plain.display_links. The URL regex was supplied by yanek.
2005-12-25 15:16:21 +01:00
Jonas Fonseca
dda6064b47 Add support for nested calls to parse_sgml()
It introduces a secondary stack for the SGML parser which records a parsing
in progress (stuff like the scanner and depth where the parsing began).
This should make it possible to eventually call parse_sgml() with the
output created from the ECMASCript's document.write() function or even
output from processing instructions (for example <?php code ?> ;).
2005-12-25 05:43:01 +01:00
Jonas Fonseca
cb90dcd58c Remove unused variable 2005-12-25 05:19:55 +01:00
Jonas Fonseca
f2ba5e7f6b Cleanup and remove unnneded code 2005-12-25 04:40:58 +01:00
Jonas Fonseca
40ae683bfb match_attribute_value(): Actually do the matching
This is still untested like the last patch.
2005-12-25 04:38:30 +01:00
Jonas Fonseca
fc35d9ee33 Implement matching of element relations for DOM selection
It requires searching the select_data stack for all matches of the parent
selector and check the properties of matched nodes.
2005-12-25 03:48:53 +01:00
Jonas Fonseca
1347678988 Introduce get_dom_node_list_index() to lookup the index of a node in a list 2005-12-25 03:46:01 +01:00
Jonas Fonseca
d36b2d8a36 get_dom_select_data(): Move macro nearer to its users 2005-12-25 02:43:08 +01:00
Jonas Fonseca
af089507dc Remove unneeded Unicode/.gitignore 2005-12-25 02:41:03 +01:00
Jonas Fonseca
61185ff34e Make ECMAScript browser scripting configurable
Either set CONFIG_SM_SCRIPTING in features.conf or pass to ./configure the
option --disable-sm-scripting. Now scripting is also enabled when needed
and not only if some other scripting backend is enabled.

Remove some remnants of SEE scripting backend.
2005-12-25 02:23:54 +01:00
Jonas Fonseca
a186c75bd6 Fix cleanall by including $(SUBDIRS-) and $(OBJS-) when INCLUDE_ALL is set
This is necessary since some CONFIG_* variables can have no value set.
So this is really a workaround.
2005-12-25 02:15:04 +01:00
Miciah Dashiel Butler Masters
309f3d26f3 In smjs_get_keymap_object, free the private data JS_SetPrivate fails,
per fonseca's suggestion.
2005-12-24 18:07:55 +00:00
Miciah Dashiel Butler Masters
f46cdd8f03 Add elinks.location property to get and set the current URL. 2005-12-24 18:05:32 +00:00
Miciah Dashiel Butler Masters
b13d35dc5a Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2005-12-24 18:02:12 +00:00
Jonas Fonseca
3338f851ec Add example of how to configure colors used for HTML highlighting 2005-12-24 16:03:15 +01:00
Jonas Fonseca
a08a3aca8f elinks_goto_url(): Remove evil goto and simplify matters 2005-12-24 15:30:21 +01:00
Jonas Fonseca
ce2aa08cb1 Compile fix 2005-12-24 13:07:57 +01:00
Miciah Dashiel Butler Masters
d44a24050c Undo in favour of a nicer API... 2005-12-24 07:17:36 +00:00
Miciah Dashiel Butler Masters
054fb15ff0 Add an elinks.goto_url method. 2005-12-24 07:14:51 +00:00
Miciah Dashiel Butler Masters
330cd6b7ce Assign the given ses to smjs_ses while the ECMAScript callback runs in
smjs_keybinding_action_callback.
2005-12-24 07:01:17 +00:00
Miciah Dashiel Butler Masters
f1fe83b035 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2005-12-24 06:54:43 +00:00
Miciah Dashiel Butler Masters
80a5467b8d Introduce get_action_from_keystroke and get_action_name_from_keystroke.
Introduce smjs_init_keybinding_interface, which creates elinks.keymaps.<map>
for <map> in "main", "edit", and "menu". elinks.keymaps.<map> is a hash
indexed by string representations of keystrokes, and can be used to get the
current action for a key and to set the action either to an internal ELinks
action or to an ECMAScript function.
2005-12-24 06:54:01 +00:00
Miciah Dashiel Butler Masters
5714a8b54e Factor kbd_stroke_lookup out of bind_act. 2005-12-24 05:40:40 +00:00
Miciah Dashiel Butler Masters
92da153e13 Lock the struct cache_entry when creating the corresponding ECMAScript
object in smjs_get_cache_entry_object and unlock it in the new finalizer
cache_entry_finalize.
2005-12-24 04:07:32 +00:00
Miciah Dashiel Butler Masters
f8de70b8f6 Comment smjs_elinks_object. 2005-12-24 03:49:06 +00:00
Miciah Dashiel Butler Masters
9b645f9b66 Move smjs_elinks_object to elinks_object.h. 2005-12-24 03:48:57 +00:00
Miciah Dashiel Butler Masters
8743ec74d8 Factor the initialisation of smjs_elinks_global out of init_smjs and
into the new smjs_init_elinks_object.
2005-12-24 03:47:34 +00:00
Miciah Dashiel Butler Masters
60dd7515f9 Change smjs_get_elinks_object to use smjs_global_object instead of
an argument.
2005-12-24 03:43:53 +00:00
Miciah Dashiel Butler Masters
d6ecf895ce Make global_object a global with the new name smjs_global_object and
create smjs_init_global_object to initialise the global.
2005-12-24 03:40:59 +00:00
Miciah Dashiel Butler Masters
3174c533b0 Factor smjs_get_global_object out of init_smjs. 2005-12-24 03:39:24 +00:00
Jonas Fonseca
73b599e637 Merge with git+ssh://pasky/srv/git/elinks.git 2005-12-23 01:05:12 +01:00
Jonas Fonseca
8d30613a7f The child node list can be NULL when matching for the :empty pseudo-class
Also use the children node list and not the attribute list (aka the map).
2005-12-23 01:03:39 +01:00
Jonas Fonseca
3ea1b30fd6 Fix matching of the :root structural pseudo-class
Root nodes either have no parents or are the single child of the document
node.
2005-12-23 00:59:56 +01:00
Jonas Fonseca
755108cf95 Tidyup 2005-12-23 00:53:31 +01:00
Jonas Fonseca
4d6223f6a4 Oops, compile fix 2005-12-23 00:52:52 +01:00
Jonas Fonseca
12d34fd133 Factor out code to new match_element_selector()
'Twill make it easier to do the logic.
2005-12-23 00:51:57 +01:00
Miciah Dashiel Butler Masters
2a0653a9f2 Fix the comment heading to say ECMAScript instead of Ruby. 2005-12-22 23:45:12 +00:00
Jonas Fonseca
07fc481607 match_attribute_selectors(): Factor out matching of values to own function 2005-12-23 00:11:25 +01:00
Jonas Fonseca
262856273e Drop unused get_dom_node_attributes(), comment get_dom_node_list() 2005-12-22 23:42:23 +01:00
Jonas Fonseca
faa85adf73 dom_select_push_element(): Use dom_node_casecmp() and drop homegrown one 2005-12-22 23:40:11 +01:00
Jonas Fonseca
1f47fabf5e Rename dom_node_cmp() to dom_node_casecmp() and make it public 2005-12-22 23:37:59 +01:00
Jonas Fonseca
b13a21bbc2 dom_node_cmp(): Make it into a general node comparer 2005-12-22 23:35:17 +01:00
Jonas Fonseca
6dfd7a5988 When searching DOM node lists store the subtype in the search struct's node 2005-12-22 23:29:07 +01:00
Jonas Fonseca
558e2736e4 search_dom_stack(): Use dom_string_casecmp() for comparison 2005-12-22 22:28:38 +01:00
Jonas Fonseca
c4a1031b2e Move code for the final source highlight flushing to document pop callback
This requires the document root stack state is made mutable and is popped.
Should make render_dom_document() more generalised. For SGML_PARSER_STREAM
this has the fun property that the stack will magically free the root node.
2005-12-22 12:33:27 +01:00