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

765 Commits

Author SHA1 Message Date
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
Jonas Fonseca
6f3f859578 parse_sgml(): After parsing pop the stack back to the depth it was before 2005-12-22 12:28:22 +01:00
Jonas Fonseca
4eae1d4882 Add a few comment and remove an obsolete one 2005-12-22 04:00:55 +01:00
Jonas Fonseca
9c720c2cc8 Rename the DOM tree renderer to DOM stack tracer
Use add_dom_stack_tracer(stack) to have stack activity traced. It is only
active when DOM_STACK_TRACE is defined.
2005-12-22 03:55:55 +01:00
Jonas Fonseca
cb64068712 Make it so that the indent string used by the tree renderer needs no init 2005-12-22 03:33:56 +01:00
Jonas Fonseca
f21fcd132f Oops, do not define DOM_TREE_RENDERER by default 2005-12-22 03:21:52 +01:00
Jonas Fonseca
6cb9a841b6 Add FIXME about optimizing walk_dom_nodes() 2005-12-22 03:20:11 +01:00