Jonas Fonseca
9264221635
Make init_dom_scanner() take the state arg and drop a macro
2005-12-31 01:55:38 +01:00
Jonas Fonseca
7489c134f7
Make non-terminated comments and cdata sections have 'the rest' as content
2005-12-31 01:47:57 +01:00
Jonas Fonseca
8f7f6abc16
Use skip_sgml_chars() in skip_comment() and skip_cdata_section()
2005-12-31 01:40:52 +01:00
Jonas Fonseca
4e10bcf772
Drop useless code for proc. instruction scanning
2005-12-31 01:18:49 +01:00
Jonas Fonseca
e8ff8bd5f0
Fix another off-by-one error similar to the SGML comment parsing
2005-12-31 01:14:52 +01:00
Jonas Fonseca
ab7ba39d42
Introduce skip_sgml_chars() to avoid usage of memchr()
2005-12-31 00:06:12 +01:00
Jonas Fonseca
14a3f9c0fd
Disable dom-select building since it requires defining of DOM_STACK_TRACE
2005-12-31 00:05:49 +01:00
Jonas Fonseca
9a0bf83756
Add basic stuff for XBEL parsing/highlighting using the DOM engine
2005-12-30 22:19:32 +01:00
Jonas Fonseca
aa07b3edf4
Fix old (non) problem with using VERSION identifier by #undef'ing it first
2005-12-30 22:13:13 +01:00
Miciah Dashiel Butler Masters
9d713ff41d
Write the bookmarks whether or not they are dirty if the backend has
...
changed since reading.
2005-12-30 21:08:50 +00:00
Jonas Fonseca
c0ece18042
Start showing RSS files in the plain view so it gets highlighted
2005-12-30 21:55:53 +01:00
Jonas Fonseca
65a114f4bc
Sort the RSS elements, they are supposed to be binarily searchable
2005-12-30 21:46:44 +01:00
Jonas Fonseca
ad052c3985
Hey, hey Cripple Creek Fai^H^Herry
2005-12-30 21:19:46 +01:00
Jonas Fonseca
ff75d5086f
Remove the DOM track tracer from the renderer
2005-12-30 13:08:42 +01:00
Miciah Dashiel Butler Masters
470da90699
Put documentation (doc/events.txt) and reality back into alignment
...
by changing goto_url_with_hook not to call goto_uri if get_hooked_uri
returns NULL, which it does if a hook returns "", which several hooks do.
2005-12-30 03:04:04 +00:00
Jonas Fonseca
41f1f5f9d3
Add a simple program for testing the DOM select code
...
It accepts --uri, --src and --selector args.
2005-12-30 03:33:48 +01:00
Jonas Fonseca
4f09ac99f7
Make it possible to identify the output of DOM stack tracers
2005-12-30 03:29:17 +01:00
Jonas Fonseca
0ddb5f2d18
Use the DOM stack tracer for getting a dump of active nodes
2005-12-30 03:02:59 +01:00
Jonas Fonseca
bd1beb1fab
Use the stack when creating the select node hierachy
2005-12-30 02:59:34 +01:00
Jonas Fonseca
4868c23a06
Cleanup the DOM test Makefile so it's more generic and more silent
2005-12-30 02:19:25 +01:00
Jonas Fonseca
748bab64a7
Make the printed install paths simpler for man5 files when srcdir == builddir
2005-12-30 00:49:01 +01:00
Miciah Dashiel Butler Masters
6a44d5192d
Fix a typo in an error message in cache_entry_set_property: s/get/set/
2005-12-29 22:31:25 +00:00
Miciah Dashiel Butler Masters
65372061a0
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-29 22:29:39 +00:00
Miciah Dashiel Butler Masters
7f1711471f
Drop an extra object_lock in bookmark_folder_get_property:
...
smjs_get_bookmark_object will lock the bookmark for us.
2005-12-29 22:19:19 +00:00
Miciah Dashiel Butler Masters
9e06b709d4
Return NULL when a script tries to get a bookmark that does not exist
...
in the given folder. (What was I thinking before?)
2005-12-29 22:18:45 +00:00
Jonas Fonseca
76a524ddf6
More <?xml and comment tests, fix an off-by-one error for comments skipping
2005-12-29 22:26:39 +01:00
Jonas Fonseca
bd877570d2
Test some more obscure proc. instructions and fix some assertion failures
2005-12-29 21:52:27 +01:00
Jonas Fonseca
57168e1fbc
Handle <element path=/to/%61-&\one";files/> as a self-closing tag
...
Before the '/' before '>' would be interpreted as part of the attribute
value. Hope this is sensible slurping of the markup soup.
2005-12-29 20:38:43 +01:00
Jonas Fonseca
958a4a1b51
Add tests for more things like space handling and obscure formatting
2005-12-29 19:13:48 +01:00
Jonas Fonseca
beb8337fc5
Add rule to make test run from src/dom dir
2005-12-29 18:33:59 +01:00
Jonas Fonseca
1a177491a0
Fix SGML parsing of processing instructions (<?xml ...?>)
...
It involves adding a new scanner state which is used only to generate a new
processing instruction (PI) data token. This removes some scanner specific
code from the parser and makes handling of PIs more generic. The data of
XML PIs are still parsed as attributes and added to the PI node.
The 6th test now succeeds. Hurrah!
2005-12-29 18:31:49 +01:00
Jonas Fonseca
c24c67ce59
Make it possible to initialise a scanner in a specific state
2005-12-29 18:20:03 +01:00
Jonas Fonseca
889a0f16f8
Fix the expected output of processing instruction parsing
...
Spaces after the target should be skipped.
2005-12-29 18:00:26 +01:00
Miciah Dashiel Butler Masters
684bac3b22
Define do_file before loading hooks.js in case hooks.js wants to use
...
do_file immediately.
2005-12-29 14:24:00 +00:00
Miciah Dashiel Butler Masters
ae42c586f8
Add elinks.home property.
2005-12-29 14:19:09 +00:00
Miciah Dashiel Butler Masters
a4be153703
Generalise the error message from smjs_do_file by dropping 'default'
...
from 'error loading default script file'.
2005-12-29 13:54:26 +00:00
Miciah Dashiel Butler Masters
b52a29f8c0
Let smjs_do_file return 0 to indicate failure and 1 to indicate
...
success. Add smjs_do_file_wrapper and let ECMAScript load files with
do_file(path).
2005-12-29 13:48:02 +00:00
Miciah Dashiel Butler Masters
cb506ea412
Factor smjs_do_file out of smjs_load_hooks.
2005-12-29 13:27:12 +00:00
Miciah Dashiel Butler Masters
9d4893e384
Mark smjs_load_hooks static.
2005-12-29 13:26:38 +00:00
Miciah Dashiel Butler Masters
79cf499cf9
Use JS_PropertyStub instead of NULL where applicable in JSClass
...
definitions.
2005-12-29 07:25:04 +00:00
Miciah Dashiel Butler Masters
46b1db47a2
Check JS_TRUE == ... instead of JS_FALSE != ... in smjs_get_keymap_object.
2005-12-29 07:20:33 +00:00
Miciah Dashiel Butler Masters
1ba2b6931a
Don't check CACHE_ENTRY_LENGTH in cache_entry_set_property since, as
...
Jonas pointed out, .length is read-only, so SpiderMonkey will never
pass the setter CACHE_ENTRY_LENGTH. Anyway, .uri is also read-only and
is not handled in the setter.
2005-12-29 07:19:15 +00:00
Miciah Dashiel Butler Masters
898c2a8165
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-29 07:08:37 +00:00
Miciah Dashiel Butler Masters
17b7ffc7df
Add elinks.bookmarks interface for reading bookmarks.
2005-12-29 07:05:31 +00:00
Jonas Fonseca
5a75bbc427
Merge with git+ssh://pasky/srv/git/elinks.git
2005-12-29 06:55:30 +01:00
Jonas Fonseca
ba5dbd3a18
Add test_output_equals helper and add a few more tests
...
The last one fails for now. Incorrect parsing of processing instructions.
2005-12-29 06:54:41 +01:00
Jonas Fonseca
23f21f1924
Fine tune how some of the nodes are printed, fix string compressing
2005-12-29 06:50:51 +01:00
Miciah Dashiel Butler Masters
59ffb72b8f
Drop .or from elinks.or.cz.
2005-12-29 04:35:02 +00:00
Jonas Fonseca
602d2d8a66
Add README for the test infrastructure mostly pasted from git/t/README
2005-12-29 05:12:36 +01:00
Jonas Fonseca
d394cb0bc1
Grab GITs shell script-based test infrastructure and add "Hello world" test
2005-12-29 04:44:03 +01:00
Jonas Fonseca
f42b39ee3c
Fix indentation so that things are printed at the start of the line
2005-12-29 04:39:20 +01:00
Jonas Fonseca
8dcbaa76f3
sgml-parser: Make it possible to specify the URL and the source to parse
2005-12-29 04:29:13 +01:00
Miciah Dashiel Butler Masters
006445cd09
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-29 00:57:46 +00:00
Jonas Fonseca
c475f1fc0c
Drop linking with util/string.o, since memdebug no longer requires it
2005-12-28 23:07:06 +01:00
Jonas Fonseca
3d0fc33785
set_mem_comment(): Use memcpy() + NUL assignment instead of safe_strncpy()
...
... so as not to depend on util/string stuff.
2005-12-28 23:06:23 +01:00
Jonas Fonseca
4feba6d515
Use stdio when printing enhanced values instead of allocating first
2005-12-28 23:02:45 +01:00
Jonas Fonseca
92767165cc
Merge with elution
2005-12-28 21:25:08 +01:00
Jonas Fonseca
4bbc25c532
Remove dependency on util/string.h from dom/string.h
2005-12-28 21:20:55 +01:00
Jonas Fonseca
9bd346c295
dom_scanner_token_contains(): Use strcasecmp() instead of strlcasecmp()
2005-12-28 21:18:08 +01:00
Jonas Fonseca
fb6ca9a390
Use dom_string for storing the name member of dom_scanner_string_mapping
2005-12-28 21:10:05 +01:00
Jonas Fonseca
f1015f8a6a
Make files include dom/string.h instead of util/string.h directly
2005-12-28 20:45:55 +01:00
Jonas Fonseca
e34d0d3de4
Initialize the string->length in init_dom_string()
2005-12-28 19:49:22 +01:00
Jonas Fonseca
04ff274663
Merge with elution
2005-12-28 17:20:27 +01:00
Jonas Fonseca
5a936cf99c
Fix parsetst building
2005-12-28 17:16:39 +01:00
Jonas Fonseca
1b71368459
Add proof-of-concept stand-alone test binary which just prints Hello World
...
May it multiply in great numbers and help to stabilize the DOM
implementation.
2005-12-28 17:10:01 +01:00
Jonas Fonseca
1bd0c8758e
Make the DOM node creators take dom_string structs
2005-12-28 16:47:28 +01:00
Jonas Fonseca
ec7b293e4e
Some minor cleanup of token string access
2005-12-28 16:34:42 +01:00
Jonas Fonseca
6e163b186c
Make the dom_scanner_token store it's string in a dom_string struct
2005-12-28 16:23:36 +01:00
Jonas Fonseca
97c702c674
Make init_dom_select() take dom_string struct
2005-12-28 15:57:37 +01:00
Jonas Fonseca
2e4e404145
Make init_dom_scanner() take the source string as a dom_string struct
2005-12-28 15:55:21 +01:00
Jonas Fonseca
62d981c551
Store struct dom_scan_table_info data in a dom_string
2005-12-28 15:51:31 +01:00
Jonas Fonseca
73785bee02
Remove some unneeded #includes
2005-12-28 15:36:58 +01:00
Jonas Fonseca
dbf0948062
Do not decode entity references and fix the tree tracer for document nodes
...
The idea is to make the DOM thing not depend on too many external things.
2005-12-28 15:27:05 +01:00
Jonas Fonseca
d1e275be52
Make parse_sgml() take buffer as dom_string struct
2005-12-28 15:21:45 +01:00
Jonas Fonseca
11e168aba4
Make init_sgml_parser() take URI as dom_string struct
2005-12-28 15:19:10 +01:00
Jonas Fonseca
a21f192199
Remove some left over .vimrc files
2005-12-28 14:14:12 +01:00
Jonas Fonseca
71533eef9a
Elute all DOM-related code and put it in src/dom
2005-12-28 14:05:14 +01:00
Miciah Dashiel Butler Masters
81be17108b
Understand a boolean true from elinks.goto_url_hook and
...
elinks.follow_url_hook to mean that the URI should be unchanged and that
further hooks should be permitted to run.
2005-12-28 07:12:09 +00:00
Miciah Dashiel Butler Masters
76d9b9de91
Add elinks.follow_url_hook.
2005-12-28 07:07:21 +00:00
Miciah Dashiel Butler Masters
d7c7736008
Add elinks.goto_url_hook.
2005-12-28 07:06:42 +00:00
Miciah Dashiel Butler Masters
c0fd25b368
Add a read-only .uri property to the cache_entry class.
2005-12-28 06:37:00 +00:00
Jonas Fonseca
217f905d88
call_dom_stack_callbacks(): Only acquire the state data if needed
2005-12-27 15:22:06 +01:00
Jonas Fonseca
a31eaaabdd
Rename parse_sgml_document() -> parse_sgml_plain()
...
It really can be anything. I visited the elusive HTML parser to find the
new ending. ;)
2005-12-27 06:22:53 +01:00
Jonas Fonseca
9e7dfb1ddf
Make walk_dom_nodes() use a stack context; reduces the DOM stack state size
2005-12-27 06:04:01 +01:00
Jonas Fonseca
a4831fef2d
Make it easier to work with DOM stack contexts outside of the callbacks
...
The problem is to get access to the context when it is not the first one
and it has to happen outside of the context callbacks. This changes the
memory management so that the context adder returns the context. To further
improve the use of contexts add a context destructor which makes it
possible to unregister (temporary) contexts.
2005-12-27 05:59:12 +01:00
Jonas Fonseca
774aa70c6f
Drop (now) unused get_dom_stack_parent() wrapper for get_dom_stack_state()
2005-12-27 04:44:20 +01:00
Jonas Fonseca
af19f811e3
Simplify DOM node popping
...
.. by turning do_pop_dom_node() into pop_dom_node() and let pop_dom_state()
handle it's own logic for reaching the wanted state.
2005-12-27 04:42:28 +01:00
Jonas Fonseca
f371de1638
Restructure the SGML parser file and add comments to the main parts
2005-12-27 03:57:56 +01:00
Jonas Fonseca
f5b32f86d1
Drop some dead code related to past rendering of DOM attribute nodes
2005-12-27 03:55:34 +01:00
Jonas Fonseca
b36229c222
Drop some unneeded #includes
2005-12-27 03:33:49 +01:00
Jonas Fonseca
0e2eefcb82
Add missing HTML_(SCRIPT, ...) definition
2005-12-27 01:58:54 +01:00
Jonas Fonseca
cef160d630
No need to have link_form_menu() be a menu function when it has an action
2005-12-26 22:28:38 +01:00
Jonas Fonseca
b82a38ab28
Introduce ACTION_REQUIRE_FORM and use it for link-form-menu
...
... since it asserts it is dealing with a link.
2005-12-26 22:22:03 +01:00
Jonas Fonseca
74a0a7b174
Highlight the 'CDATA' part of <![CDATA[ (in a bit hacky way)
2005-12-26 20:51:01 +01:00
Jonas Fonseca
c99b1cc2cc
Render content of CDATA sections with orange2 (in lack of something better)
2005-12-26 19:56:07 +01:00
Jonas Fonseca
e28f3fc592
Drop macros in favour of more informative direct calls to add_sgml_node()
2005-12-26 19:45:58 +01:00
Jonas Fonseca
98d7263c2f
Parse <[CDATA[ sections ]]>
2005-12-26 19:43:32 +01:00
Miciah Dashiel Butler Masters
62de7cc750
In delayed_goto, do not load the page if the doc_view has changed since
...
the delayed_goto was registered. This fixes bug 611, the infinite loop
on Gmane.
2005-12-26 14:12:45 +00:00
Miciah Dashiel Butler Masters
92c9b86374
In add_document_line, check expanded + line_pos rather than just
...
expanded when checking whether there are enough characters on the line
to decrement expanded by 2. This fixes the problem reported by fonseca
where the linked text was offset from the URI when there were backspaces
earlier on the line.
2005-12-26 11:43:18 +00:00
Miciah Dashiel Butler Masters
eeb51bffea
Refresh the view after selecting a new form item with the form menu.
2005-12-26 11:31:05 +00:00
Miciah Dashiel Butler Masters
bcdc69e86a
Use intdup for the new form menu because you can't just put an int in
...
a void * and expect it to work everywhere.
2005-12-26 11:25:03 +00:00
Miciah Dashiel Butler Masters
a33547d8ad
Add memory-leak tracing to intdup.
2005-12-26 11:22:05 +00:00
Miciah Dashiel Butler Masters
1602bd5d29
Factor intdup out of smjs_get_keymap_object.
2005-12-26 11:07:15 +00:00
Miciah Dashiel Butler Masters
e64871f5e2
Drop some dead code in add_document_line: line_pos should never be
...
negative.
2005-12-26 10:31:06 +00:00
Laurent MONIN
26c9bdf538
Move code from kbd_listbox() to new do_kbd_listbox_action().
2005-12-26 11:02:39 +01:00
Laurent MONIN
918fed9966
kbd_listbox(): converts if {} stuff to a switch{}.
2005-12-26 10:53:39 +01:00
Laurent MONIN
9683cf429b
display_listbox_item(): clarify tests a bit.
2005-12-26 10:39:07 +01:00
Jonas Fonseca
26b82953ce
Add a "Form fields" entry to the link menu (if it is a form field)
...
The menu shows a list of all fields of a form, with the possibility to jump
right to that form field when selecting an entry. The menu text is the
basic form field label "Radio button", "Text field", etc. with the form
field name or alt text as the right menu text.
It introduces a new main action called link-form-menu with no default
binding.
Requested by Klaus Knopper, as a mean to improve accessibility for complex,
overloaded pages like ebay.com.
2005-12-26 01:27:44 +01:00
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
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
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
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
Jonas Fonseca
eab6c19bbe
Add lots of comments and FIXMEs
2005-12-22 03:19:53 +01:00
Jonas Fonseca
bd5d53a2a2
Use get_opt_codepage_tree()
2005-12-22 00:03:30 +01:00
Jonas Fonseca
25e0a18b7f
Misc DOM select fixes
...
- ensure done_dom_stack() is called after parsing is done
- get_dom_select_data(): Use stack->current->data since it is used within
dom_stack_callback_T
- dom_select_pop_element(): Use stack->contexts since it is the
select_data stack and it owns the first context
- add the select_data context to the right stack
- fix some comments
2005-12-21 23:26:22 +01:00
Jonas Fonseca
45592ea5a7
Make the DOM tree renderer thing usable without a dom_renderer defined
...
It now hardcodes the codepage to ASCII when showing entity references.
The tree debug context info is also exported.
2005-12-21 22:32:27 +01:00
Jonas Fonseca
d6c5640f29
Turn the DOM tree renderer into a debug module
...
Define DOM_TREE_RENDERER and run as:
ELINKS_LOG=/tmp/dom-dump.txt ./elinks -no-connect <url>
to have a trace of DOM tree dumped into a file.
2005-12-21 14:41:28 +01:00
Jonas Fonseca
fe6637dd7d
Fix the DOM tree renderer to work with the new stack interface
2005-12-21 14:05:01 +01:00
Jonas Fonseca
419d9d165a
get_dom_stack_state_data(): Make static inline and handle zero object size
2005-12-21 13:56:18 +01:00
Jonas Fonseca
9360f88d65
search_dom_stack(): No need to inline this at least not while debugging
2005-12-21 13:48:37 +01:00
Jonas Fonseca
779a8a4553
Improve comments
2005-12-21 13:46:28 +01:00
Jonas Fonseca
edee14699e
Reorder some struct and fix some comments
2005-12-21 04:57:25 +01:00
Jonas Fonseca
2a24ad9099
Introduce enum dom_stack_flag to make init_dom_stack() more obvious
2005-12-21 04:48:50 +01:00
Jonas Fonseca
632f12f82a
init_dom_stack(): Drop unused object_size argument
2005-12-21 04:41:35 +01:00
Jonas Fonseca
f8d48e81eb
Move the state_objects to the DOM stack contexts
...
This way all contexts are now separated, almost.
2005-12-21 04:38:04 +01:00
Jonas Fonseca
910c51abaf
Remove the now unused DOM stack data member
2005-12-21 03:59:46 +01:00
Jonas Fonseca
da33827771
Use a (for now bogus) DOM stack context for holding DOM select data
2005-12-21 03:57:17 +01:00
Jonas Fonseca
225e3a6764
Use a (for now bogus) DOM stack context for holding the SGML parser data
2005-12-21 03:39:17 +01:00
Jonas Fonseca
87d8c890dd
Define convinience macros for getting parser and parser states from stack
2005-12-21 03:12:35 +01:00
Jonas Fonseca
3374f3cbba
Drop data member from struct sgml_parser it is at stack->current->data
2005-12-21 01:36:47 +01:00
Jonas Fonseca
c524655362
Add current member to struct dom_Stack which holds the current context
2005-12-21 01:32:43 +01:00
Jonas Fonseca
0faa8d7462
Add a data member to struct dom_stack_context (not used yet)
2005-12-21 01:25:50 +01:00
Jonas Fonseca
12a2f96920
Introduce struct dom_Stack_context
...
- For now it just stores the dom_stack_context_info reference.
- Rename dom_stack members to contexts and contexts_size.
- Use mem_alloc_align based rellocation scheme.
2005-12-21 01:15:19 +01:00
Jonas Fonseca
a77242738c
Rename: add_dom_stack_callbacks() -> add_dom_stack_context()
2005-12-21 01:04:37 +01:00
Jonas Fonseca
3843be25af
Rename: struct dom_stack_callbacks -> struct dom_stack_context_info
2005-12-21 00:58:22 +01:00
Miciah Dashiel Butler Masters
f6ce6c84f7
Rename get_cache_entry_object to smjs_get_cache_entry_object for great
...
consistency.
2005-12-20 22:13:29 +00:00
Miciah Dashiel Butler Masters
9e15d09340
NULL-terminate cache_entry_props. This and the last change resolves
...
crashes with GCC 2.x and 3.x reported by zas.
2005-12-20 22:10:59 +00:00
Miciah Dashiel Butler Masters
bb4f08172b
In init_smjs, mark global_class static.
2005-12-20 22:09:56 +00:00
Jonas Fonseca
5f9583579e
And the SGML parser should not add any callbacks anymore
2005-12-20 21:12:25 +01:00
Jonas Fonseca
0834e77252
Make the DOM renderer add its own DOM stack callbacks
2005-12-20 21:10:09 +01:00
Jonas Fonseca
1228ef8d48
Create the SGML parser->root node on demand
...
This way all callbacks added after init_sgml_parser() will have their
document node push callback invoked.
2005-12-20 21:08:47 +01:00
Jonas Fonseca
625725f0e9
Allow for multiple callbacks to be attached to the DOM stack
2005-12-20 20:27:20 +01:00
Jonas Fonseca
e309de8950
Introduce call_dom_stack_callbacks as a common way to call back
2005-12-20 20:01:18 +01:00
Jonas Fonseca
d6b125fa68
Drop the return value from dom_stack_callback_T
...
... since the feature with popping the node if the return value is NULL is
not used and it doesn't make a lot of sense with multiple callbacks.
2005-12-20 19:48:33 +01:00
Jonas Fonseca
990c5e0a26
Combine DOM stack push and pop callbacks into one struct
2005-12-20 19:20:04 +01:00
Jonas Fonseca
7679ccd881
Associate .rss file extension with application/rss+xml
2005-12-20 17:00:33 +01:00
Miciah Dashiel Butler Masters
b150fa8c56
#include util/align.h in bfu/msgbox.h.
2005-12-20 10:48:45 +00:00
Miciah Dashiel Butler Masters
be76bed022
Check the return values of JS_SetPrivate and JS_DefineProperties in
...
get_cache_entry_object.
2005-12-20 10:44:51 +00:00
Miciah Dashiel Butler Masters
9559871fd0
Add src/document/sgml/rss/Makefile.
2005-12-20 05:29:05 +00:00
Miciah Dashiel Butler Masters
178bc908e1
Drop an unnecessary and non-existent #include, added in commit
...
56d634b946
.
2005-12-20 05:28:36 +00:00
Miciah Dashiel Butler Masters
71fb9a1db7
Move smjs_invoke_elinks_object_method from hooks.c to elinks_object.c.
2005-12-20 05:26:55 +00:00
Miciah Dashiel Butler Masters
3302baca35
Rename call_script_hook to smjs_invoke_elinks_object_method and rename
...
its hook parameter to method.
2005-12-20 05:25:36 +00:00
Jonas Fonseca
ec9f41c1cd
Retire specialized proc-instruction DOM renderer callback
...
It now uses the DOM element callback. Before the proc-instruction
attributes was shown twice.
2005-12-20 03:25:51 +01:00
Jonas Fonseca
4104f5d2f0
Only consider application/rss+xml internal with CONFIG_DOM
2005-12-20 03:13:08 +01:00
Jonas Fonseca
56d634b946
Add basic support for RSS parsing for application/rss+xml content types
...
This means the RSS source will be highlighted, but by default the HTML
renderer will be used for the default rendering.
2005-12-20 03:08:13 +01:00
Jonas Fonseca
5777941d06
DOM select: Completely rewrite the parser for nth arguments
2005-12-20 01:50:39 +01:00
Jonas Fonseca
c2e30c8eea
get_child_dom_select_node(): Use the foreach_dom_node iterator
2005-12-20 01:48:21 +01:00
Jonas Fonseca
ceffe8f1a4
Make the SGML parser ready for (specializing) doctypes other than HTML
2005-12-20 01:04:33 +01:00
Jonas Fonseca
f6e551379e
Remove some includes which are no longer needed
2005-12-20 00:48:34 +01:00
Jonas Fonseca
8e769d48a5
Misc cleanups and improvements
2005-12-20 00:01:18 +01:00
Miciah Dashiel Butler Masters
f5b102cfea
Assert smjs_ctx in get_cache_entry_object.
2005-12-19 21:33:10 +00:00
Miciah Dashiel Butler Masters
2e0907ff8d
In script_hook_pre_format_html, check whether get_cache_entry_object
...
returns NULL.
2005-12-19 21:28:52 +00:00
Miciah Dashiel Butler Masters
7d5e006908
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-19 21:26:35 +00:00
Miciah Dashiel Butler Masters
2b6ef067be
In init_smjs, destroy the runtime if JS_NewContext returns NULL.
2005-12-19 21:26:05 +00:00
Miciah Dashiel Butler Masters
fcd13e35cb
Do nothing in cleanup_smjs is smjs_ctx is NULL.
2005-12-19 21:24:54 +00:00
Miciah Dashiel Butler Masters
11c90e7205
Add some assertions.
2005-12-19 21:24:27 +00:00
Jonas Fonseca
3b412553b6
match_attribute_selectors(): Fix warning about uninitialized attr variable
...
Outspitten on FreeBSD.
2005-12-19 22:13:23 +01:00
Miciah Dashiel Butler Masters
5ca5381fbc
Rework smjs_load_hooks not to free path until it is done and to always
...
call done_string on the script string, even when add_file_to_string fails.
2005-12-19 19:08:34 +00:00
Miciah Dashiel Butler Masters
d12226d4cb
Fix a problem with my rewrite of scroll_menu where selecting an item on
...
a main menu selects the next item instead.
2005-12-19 03:44:14 +00:00
Jonas Fonseca
2e2c0a590e
Add basic functionality for selecting DOM nodes based on CSS3 selectors
...
The design should more or less be in place. There is still a lot of things
missing but it should actually be enough for using it in a simple RSS renderer.
Amongst several things, :nth-* pseudo-classes and :not() syntax is not in
place.
2005-12-19 03:44:18 +01:00
Jonas Fonseca
b64e122159
Change order of variables given to foreach_dom_node iterators
2005-12-19 02:57:00 +01:00
Jonas Fonseca
330c0174e5
Rename DOM stack iterators and make them include all states when iterating
...
They are now called: foreach{back,}_dom_stack_state (...) and the immutable
flag together with node type restricted stack searches should ensure that
the document root node never is popped.
2005-12-19 02:51:32 +01:00
Jonas Fonseca
051db70dd4
Add boolean immutable flag to the DOM stack state
...
Can be used to ensure the document root node never leaves the stack while
parsing.
2005-12-19 02:34:26 +01:00
Jonas Fonseca
50223a91ae
Merge with git+ssh://pasky/srv/git/elinks.git
2005-12-19 02:18:53 +01:00
Jonas Fonseca
ee1eba9689
Rename: dom_stack_has_parents() -> dom_stack_is_empty() (with negated value)
2005-12-19 02:15:36 +01:00
Jonas Fonseca
bc338207e7
do_pop_dom_node(): move dom_stack_has_parents() to assertion
...
All callers already checks if the stack is empty.
2005-12-19 02:05:43 +01:00
Miciah Dashiel Butler Masters
82850fab29
Rewrite the better part of scroll_menu so that it is more readable
...
and wraps properly when the first or last items on a menu are
unselectable. Drop search_selectable, which is now unnecessary.
2005-12-19 01:01:52 +00:00
Jonas Fonseca
9bc71ec8a9
Retire the SEE-based *.js scripting backend
2005-12-19 01:22:32 +01:00
Miciah Dashiel Butler Masters
9fb9e8700d
Predicate the SpiderMonkey scripting backend on CONFIG_SPIDERMONKEY
...
rather than on CONFIG_ECMASCRIPT.
2005-12-18 22:51:47 +00:00
Jonas Fonseca
fa124d0988
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-18 23:49:15 +01:00
Miciah Dashiel Butler Masters
2fef4bd531
In cache_entry_get_property and cache_entry_set_property, use
...
cache_entry_is_valid to check that the reference to the struct cache_entry
is still valid. Thanks to fonseca for the reminder.
2005-12-18 22:47:58 +00:00
Jonas Fonseca
8ea7f202b1
#include "src/scripting/smjs/cache_object.h"
2005-12-18 22:17:48 +01:00
Jonas Fonseca
838e2ea0c9
Make all global variables exported by src/scripting/smjs/core.h extern
2005-12-18 19:57:03 +01:00
Miciah Dashiel Butler Masters
51322649fe
Load the default script.
2005-12-18 18:02:32 +00:00
Miciah Dashiel Butler Masters
e3fed7e19e
Add a pre-format-html hook.
2005-12-18 17:58:42 +00:00
Miciah Dashiel Butler Masters
30ccbaaf21
Add the elinks.alert method.
2005-12-18 17:49:21 +00:00
Miciah Dashiel Butler Masters
6e0d4374c1
Add the "elinks" object.
2005-12-18 17:47:54 +00:00
Miciah Dashiel Butler Masters
acb2bb80be
Create a global object.
2005-12-18 17:40:13 +00:00
Miciah Dashiel Butler Masters
60d40b7f50
Initial skeleton for SpiderMonkey scripting backend.
2005-12-18 17:40:00 +00:00
Miciah Dashiel Butler Masters
a96c0250c3
Merge textarea updates
2005-12-18 16:26:05 +00:00
Miciah Dashiel Butler Masters
d11dc65320
If the user edits a textarea with an external editor but exceeds the
...
maximum length, do not simply drop the changes, but instead truncate them,
warn the user, and provide the user with the path to the temporary file
from which the full changes can be recovered.
2005-12-18 16:23:52 +00:00
Witold Filipczyk
d09bdf7c28
Fix problem with double decompression of local files
...
ELinks tries decompress local gziped files twice, which causes problems
with some files eg. with this README.gz. This patch prevents it.
2005-12-18 17:03:34 +01:00
Miciah Dashiel Butler Masters
69f38bcbcc
After editing a textarea in an external editor, do not unlink the file
...
if it was too large to fit into the textarea.
2005-12-18 16:02:37 +00:00
Miciah Dashiel Butler Masters
9959f4d788
Fold load_textarea_file into textarea_edit.
2005-12-18 16:00:48 +00:00
Miciah Dashiel Butler Masters
517bb03da4
Add routine add_file_to_string and use it in load_textarea_file.
2005-12-18 15:56:59 +00:00
Miciah Dashiel Butler Masters
dc29fa0a0b
Add a missing bracket in report_scripting_error.
2005-12-18 15:32:11 +00:00
Jonas Fonseca
3dadc0ad46
Fix order of args passed to SEE_string_sprintf("%.*s")
2005-12-17 19:19:42 +01:00
Jonas Fonseca
6251884765
One more compile fix for evhook_use_param() macro usage
2005-12-17 18:36:46 +01:00
Jonas Fonseca
1e60feacb4
Compile fix for arg usage macro
2005-12-17 18:27:49 +01:00
Miciah Dashiel Butler Masters
5145ae266a
Follow-up for commit fdacffd113
: change
...
the Python, Ruby, and SEE hooks for pre-format-html to work properly
now that they are given a non-NUL-terminated string. Thanks to fonseca
for noticing this problem as well as that fixed by the previous commit.
2005-12-17 16:38:24 +00:00
Miciah Dashiel Butler Masters
fdacffd113
Change the pre-format event so that hooks are given the cache entry
...
instead of the URI, content, and length of the entry. Change the hooks
to use add_fragment. This should fix the memory leakage when multiple
hooks change the same document, closing bug 703.
2005-12-17 06:32:08 +00:00
Miciah Dashiel Butler Masters
35aa8119e3
In run_lua_func, pass handle_ref 0 for the unref flag so that bindings
...
will work more than once.
2005-12-17 01:42:20 +00:00
Miciah Dashiel Butler Masters
717b440f62
Add an unref flag to handle_ref so that the unreferencing is optional.
2005-12-17 01:36:26 +00:00
Miciah Dashiel Butler Masters
8edcb292cb
In l_set_option, use lua_toboolean for boolean options instead of
...
lua_tonumber. Now set_option(opt, not get_option(opt)) will always work
to toggle a boolean option.
2005-12-17 00:31:45 +00:00
Miciah Dashiel Butler Masters
35e5ec74d2
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-17 00:09:02 +00:00
Miciah Dashiel Butler Masters
fa0ce83f24
Recomment do_tab_compl_unambiguous.
2005-12-17 00:02:15 +00:00
Miciah Dashiel Butler Masters
093800d6fb
Only set match the first time since we are only interested in the common
...
substring at the start, which will be the same for all matches.
2005-12-16 23:59:04 +00:00
Miciah Dashiel Butler Masters
aad46173ae
Refactor.
2005-12-16 23:50:17 +00:00
Miciah Dashiel Butler Masters
63a71348f2
Refactor.
2005-12-16 23:48:41 +00:00
Miciah Dashiel Butler Masters
5279ea97da
Drop a funny comment.
2005-12-16 23:47:25 +00:00
Miciah Dashiel Butler Masters
20ee738904
Stop using a special value of 0 for longest_common_match to check whether
...
a match has been found and just check whether match is NULL.
2005-12-16 23:37:52 +00:00
Miciah Dashiel Butler Masters
0f8fe3f919
Define a new routine strcommonlen and use it in do_tab_compl_unambiguous.
2005-12-16 23:35:11 +00:00
Jonas Fonseca
45861c68e1
pop_dom_state(): Drop unused left-over argument
2005-12-15 22:05:30 +01:00
Jonas Fonseca
ef5d5fc27a
dom_node_cmp(): Only use element or attribute type ID if both are set
2005-12-15 22:02:02 +01:00
Jonas Fonseca
c2d27a33d8
Rename: nav -> stack
2005-12-15 17:24:20 +01:00
Jonas Fonseca
87c8a5cee4
Merge with 5ef041c051
...
Which mysteriously didn't get auto-merged when updating.
2005-12-13 20:26:06 +01:00
Jonas Fonseca
5ef041c051
Redo the assertm() message to just show the type of the node and parent
2005-12-13 20:08:58 +01:00
Miciah Dashiel Butler Masters
13f4464151
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-12-13 18:03:55 +00:00
Laurent MONIN
1ca88c9147
encode_multipart(): move @rd to inner scope.
2005-12-13 17:04:24 +01:00
Laurent MONIN
10aa67fb32
sort_submitted_values(): move @change abd @next to inner scope.
2005-12-13 17:01:45 +01:00
Laurent MONIN
dbcc033edb
draw_frames(): move @more to inner scope.
2005-12-13 16:59:10 +01:00
Laurent MONIN
4a930507e4
process_file_requests(): move @more, @ftl and @doc_view variables to
...
inner scope.
2005-12-13 16:57:17 +01:00
Laurent MONIN
1c7b27c99f
abort_files_load(): make @more and @ftl variables local to the loop.
2005-12-13 16:53:56 +01:00
Laurent MONIN
f331c7ac85
sort_bittorrent_peer_connections(): make @resort variable local to
...
the loop.
2005-12-13 16:52:08 +01:00
Laurent MONIN
852bdaec88
sort_queue(): make @swp variable local to the loop.
2005-12-13 16:50:04 +01:00
Jonas Fonseca
2eebef098d
Prepare the CSS scanner for tokenizing ~ and + as char tokens
...
They are used for "E ~ F" and "E + F" element relations.
2005-12-13 16:35:41 +01:00
Jonas Fonseca
d1635d6970
Fix wrong assertion message string
...
You just cannot print dom_string structs with %s.
2005-12-13 16:33:50 +01:00
Jonas Fonseca
be3223b38e
Don't try MIME handlers for application/x-bittorrent
...
It is an internally supported protocol, so it should be all internal. The
other thing was just causing headacks. Thanks to Neuromancer for suggesting
not to endeavor into another configuration nightmare. And thanks to arcatan
for requesting this for the n-th time. ;)
2005-12-13 16:32:53 +01:00
Jonas Fonseca
cd4fd51438
Compile fix, reported by zas
2005-12-13 16:28:14 +01:00
Jonas Fonseca
b2c1af1611
Add key parameter to the tracker announce URI
...
If non-empty it will be sent to the tracker. A short description of the
purpose:
* key: Optional. An additional identification that is not shared
with any users. It is intended to allow a client to prove their
identity should their IP address change.
Reported by Toksyuryel.
2005-12-13 16:16:55 +01:00
Jonas Fonseca
f35026ecfb
Add DOM_NODE_UNKNOWN node type for internal purposes only
2005-12-13 04:52:47 +01:00
Jonas Fonseca
771a2eea82
Prepare the CSS scanner for parsing [foo{|,*,^,$,}=bar] selectors
2005-12-13 04:50:30 +01:00
Miciah Dashiel Butler Masters
db5b9be213
Convert the body of activate_link to a single switch statement.
2005-12-13 00:00:08 +00:00
Miciah Dashiel Butler Masters
b191247894
Reflow some code to reduce indentation in activate_link.
2005-12-12 23:57:37 +00:00
Miciah Dashiel Butler Masters
73e3cdecd0
Factor activate_link out of enter, which now just acquires the link
...
reference, calls activate_link, and triggers the onClick event.
2005-12-12 22:58:05 +00:00
Jonas Fonseca
5ff0849eb3
set_dom_string(): take length as size_t; -1 means use strlen() to get size
2005-12-12 17:42:26 +01:00
Jonas Fonseca
27116d6385
Make the DOM stack and the SGML parser interface more general
...
They now both hold a single private data member. This means the parser now
holds the renderer data.
2005-12-12 17:41:09 +01:00
Laurent MONIN
c769b81f93
send_event(): initialize @doc_view only when needed, and prevent a
...
useless test for mouse event when event is of keyboard type.
2005-12-12 17:11:28 +01:00
Laurent MONIN
59c8dcc473
get_current_link_info(): simplify code flow.
2005-12-12 17:05:43 +01:00
Laurent MONIN
ac5441db9e
Prevent successive calls to time(), since it doesn't have much impact.
2005-12-12 17:00:08 +01:00
Jonas Fonseca
458fc5ee79
Review and change dom_string specific uint16_t value to size_t
2005-12-10 22:24:30 +01:00
Jonas Fonseca
c1136b8791
Use dom_string for storing sgml_node_info data
...
Reduces code redundancy for node searching. Oh, comment the purpose
of the special SGML_NODE_HEAD() macro.
2005-12-10 21:58:59 +01:00
Jonas Fonseca
cdc749def3
get_dom_node_value(): indent switch
2005-12-10 21:50:40 +01:00
Jonas Fonseca
86c9a37810
Factor out dom_string_casecmp()
2005-12-10 21:49:33 +01:00
Jonas Fonseca
87aad88c96
Use dom_string throughout the DOM stack interface
2005-12-10 21:42:49 +01:00
Jonas Fonseca
0fab644bee
get_dom_node_value(): move non-compliant functionality to the tree renderer
...
Entity references are supposed to have a null value and the string
compression is for improving the tree view.
2005-12-10 21:37:47 +01:00
Jonas Fonseca
52f5276f92
get_dom_node_name(): indent switch statement
2005-12-10 20:05:01 +01:00
Jonas Fonseca
295679a5e6
get_dom_node_name(): return struct dom_string *
...
Also, simplify the rendering a bit for now.
2005-12-10 20:03:43 +01:00
Jonas Fonseca
7d6db6b152
Update the DOM tree renderer to support dom_strings
2005-12-10 19:44:01 +01:00
Jonas Fonseca
2aedeb0a67
get_dom_node_type_name(): return struct dom_string *
2005-12-10 19:28:37 +01:00
Jonas Fonseca
5f69255cbc
get_dom_node_map_entry(): take name as a dom_string
...
Requires that dom_string->length becomes a size_t.
2005-12-10 19:21:12 +01:00
Jonas Fonseca
0546759b4b
Use struct dom_string for node->proc_instruction.instruction
2005-12-10 18:59:17 +01:00
Jonas Fonseca
9935bf2083
Convert some yet unused strings to use the dom_string struct
...
Also remove the unneeded path member from the dom_node_id_item struct. It
was obsoleted by the addition of dom_node->parent.
2005-12-10 18:51:08 +01:00
Jonas Fonseca
ed7a292966
Use struct dom_string for node->attribute.value
2005-12-10 18:42:54 +01:00
Jonas Fonseca
ce3778c3c0
Add struct dom_string
...
In time it should be used for all strings in the DOM engine.
For now it is just used for node->string.
2005-12-10 18:37:47 +01:00
Miciah Dashiel Butler Masters
f9dea85126
Drop a line that should have been dropped with commit
...
3719e75068
, 'Reduce code redundancy.'
2005-12-10 16:24:54 +00:00
Petr Baudis
0281f732ab
Fix broken onClick on checkboxes etc.
...
onClick on checkbox would get triggered before actually ticking the
checkbox, which is not the expected behaviour (apparently). This change
makes sure that we call the onClick event handler only after actually
doing our work with the checkbox/select widget (for the other widgets,
things should stay the same).
2005-12-10 03:48:42 +01:00
Russ Rowan
588ba7db30
fonseca: We don't do that for other downloaded files, so why add bt links?
...
(global history)
2005-12-09 19:25:06 -05:00
Jonas Fonseca
f9c8838465
The not so short BitTorrent TODO list
2005-12-09 22:43:28 +01:00
Russ Rowan
9bd00e0ad8
Added a short TODO list for fonseca.
2005-12-09 16:29:02 -05:00
Laurent MONIN
20cb9ad9ee
html_option(): optimize code.
2005-12-08 16:33:37 +01:00
Laurent MONIN
8fe86a1a63
Drop trailing spaces.
2005-12-08 16:27:51 +01:00
Laurent MONIN
3719e75068
Reduce code redundancy.
2005-12-08 16:26:37 +01:00
Laurent MONIN
1f7aa841aa
Simplify tests.
2005-12-08 16:25:22 +01:00
Laurent MONIN
d9f0de82f8
Use closing_tag variable in tests.
2005-12-08 16:22:53 +01:00
Laurent MONIN
37ec65247d
Minor code reordering.
2005-12-08 16:20:13 +01:00
Laurent MONIN
279f2bec93
Goto see instead of se.
2005-12-08 16:19:20 +01:00
Laurent MONIN
a499bf5a61
Introduce closing_tag variable.
2005-12-08 16:16:28 +01:00
Laurent MONIN
ae00f391f2
t_name -> name, t_namelen -> namelen.
2005-12-08 16:13:21 +01:00
Laurent MONIN
5f66f98b66
Prevent useless tests when @namelen is 0.
2005-12-08 16:11:19 +01:00
Jonas Fonseca
8aa078393a
Move dom_node_data union outside the dom_node struct
2005-12-08 03:26:34 +01:00
Jonas Fonseca
45958b773a
Merge with dom-stack-keep-nodes
2005-12-08 03:07:20 +01:00
Jonas Fonseca
4480a9a4cd
Removes node from the DOM tree when using the SGML stream parser
...
That should free up some short-term memory.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 03:02:27 +01:00
Jonas Fonseca
8f97dc8403
done_dom_node(): remove the node from all parent lists
...
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 02:59:40 +01:00
Jonas Fonseca
93fb17ea2a
Indent switch statement
...
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 02:32:23 +01:00
Jonas Fonseca
ce5bf8c6f8
Fix DOM node list iterators macros
...
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 02:04:13 +01:00
Jonas Fonseca
1c2f271782
Add parent member to dom_node
...
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
2005-12-08 01:35:48 +01:00
Laurent MONIN
a1284ccd1f
skip_table(): simplify code.
2005-12-07 20:51:09 +01:00
Laurent MONIN
f3838bac5b
parse_table(): cache to_upper() result.
2005-12-07 20:36:07 +01:00
Laurent MONIN
485e16c6c9
parse_table(): optimize code a bit.
2005-12-07 20:32:36 +01:00
Laurent MONIN
53cbf3e3df
parse_table(): introduce a local variable @is_header to cache test result.
2005-12-06 15:38:34 +01:00
Laurent MONIN
90d843e8fc
parse_table(): re-order code.
2005-12-06 15:35:52 +01:00
Laurent MONIN
a00dfbecf9
parse_table(): fix missing goto see.
2005-12-06 15:32:02 +01:00
Laurent MONIN
29a80ce4eb
parse_table(): optimize even more using @closing_tag.
2005-12-06 15:19:44 +01:00
Laurent MONIN
b63dd28500
parse_table(): use strlcasecmp() instead of strncasecmp().
2005-12-06 15:17:56 +01:00
Laurent MONIN
3fe59e8c7a
parse_table(): totally drop @t_name and @t_namelen in favor of @name
...
and @namelen.
2005-12-06 15:15:25 +01:00
Laurent MONIN
975a4251e8
parse_table(): reorder code to optimize even more.
2005-12-06 15:07:49 +01:00
Laurent MONIN
b6c54846ad
parse_table(): reduce code redundancy.
2005-12-06 15:02:45 +01:00
Laurent MONIN
a371f22b22
parse_table(): use intermediate variables to optimize tests.
2005-12-06 14:57:25 +01:00
Jonas Fonseca
b06a8adeac
Move parser root node initialization to init_sgml_parser()
...
... parse_sgml() in theory should be able to be called multiple times.
2005-12-06 12:30:53 +01:00
Jonas Fonseca
69b321cb5b
Replace struct cache_entry member with struct uri member
...
Reduces the number of (unused) dependencies. Also, update the #include
list removing old entries.
2005-12-05 23:47:23 +01:00
Jonas Fonseca
38b8503161
Remove document member from struct sgml_parser
...
The document URI can be accessed from the cache entry.
2005-12-05 23:31:54 +01:00
Jonas Fonseca
1d24d549e4
Merge with dom-parser-stream
2005-12-05 19:41:56 +01:00
Jonas Fonseca
c7ad6f967b
Introduce new pop_dom_state()
...
It's basically pop_dom_nodes() without the search part and is now used as a
backend in pop_dom_nodes(). Use it in parse_sgml_document() to avoid two
DOM stack searches in a row.
2005-12-05 19:40:35 +01:00
Jonas Fonseca
1c4a0d67ce
Restore highlighting of element end-tags
...
... by installing a pop-callback for elements and responding to whatever
the parser has put in the end_token parser state member.
2005-12-05 19:33:15 +01:00
Jonas Fonseca
9aebb66bce
Introduce separate push/pop callbacks
...
This should make it possible to do the SAX (parser stream thing) for XBEL.
And will also be used for fixing the end-tag highlighting.
2005-12-05 19:31:42 +01:00
Jonas Fonseca
d7d5fcab4d
Save the end tag token in the SGML parser state
...
... so that the renderer eventually can pick it up and highlight it.
2005-12-05 19:28:23 +01:00
Jonas Fonseca
7a912795e1
Make the parser stream mode work as intended
...
This makes the parser and renderer share the stack, most importantly the
callbacks are now those of the renderer. Disable node attribute rendering
code that worked around the attributes being visited in sorted order.
2005-12-05 19:25:13 +01:00
Jonas Fonseca
2dddf86acc
Initialize the renderer before initializing the parser
...
... so it is ready when/if the parser will push any initial states.
2005-12-05 19:20:48 +01:00
Jonas Fonseca
65b504f093
Remove all traces of the element end-tag hilighting hack
...
End-tags will stay uncolored for the next few commits.
2005-12-05 11:21:08 +01:00
Jonas Fonseca
4c8d871404
Introduce sgml_parser_type for specifying tree and streaming parsers
...
Mostly added for the future, since currently only one parser type is
supported.
2005-12-05 11:19:13 +01:00
Jonas Fonseca
05a61cd16a
Update the DOM stack comment for things to come
2005-12-05 11:16:52 +01:00
Jonas Fonseca
8f25d73013
Use separate data variables for storing DOM stack data
...
They will eventually have to share the stack.
2005-12-05 11:16:05 +01:00
Jonas Fonseca
f85b498375
Add FIXME about using DOM node subtypes when searching the DOM stack
2005-12-05 11:11:40 +01:00
Jonas Fonseca
208515c82f
Fix access to free()d memory in the DOM stack state data
...
There already was one work-around in the code related to clearing of the
state data after popping. Instead of storing a pointer to the state data in
the state we now store the depth of the state (in the stack) and use a
macro to access the state data. The bug occurred when reallocating the
stack state objects and the stack data pointers wasn't updated to point to
the newly allocated data.
2005-12-05 11:11:06 +01:00
Jonas Fonseca
cc416b2234
Prospone pushing of DOM nodes on the stack until they are fully initialized
...
Goes for both attributes and elements.
2005-12-05 10:26:55 +01:00
Laurent MONIN
eb74cdf6f9
html_button(): drop suspect line which has nothing to do with BUTTON
...
html element.
2005-12-05 09:57:54 +01:00
Laurent MONIN
59329dbc30
get_resource_info(): fix memory cache size display.
2005-12-05 09:37:29 +01:00
Laurent MONIN
e498b4bc74
Fix dump_frags() compilation (cache debug only).
2005-12-05 09:33:11 +01:00
Jonas Fonseca
cfb347bf45
Fix reporting of cache size in the resource dialog
...
The longlong bigval was never used. Reported by zas.
2005-12-04 20:13:26 +01:00
Laurent MONIN
15a7069fea
Move code from html_input() to new html_input_format().
2005-12-04 18:25:23 +01:00
Laurent MONIN
b863b65fbc
html_input(): minor code reordering.
2005-12-04 12:45:42 +01:00
Laurent MONIN
a57c193ad9
html_input(): drop local variable @type, use @fc->type directly.
2005-12-04 12:43:53 +01:00
Laurent MONIN
7a443d0f73
html_input(): re-order type tests a bit.
2005-12-04 12:40:38 +01:00
Laurent MONIN
a5a731a77b
html_input(): increase indentation a bit to drop a goto/label.
2005-12-04 12:38:19 +01:00
Laurent MONIN
1223850567
html_input(): improve the test logic and simplify the code.
2005-12-04 12:35:55 +01:00
Laurent MONIN
e222bb733c
html_button(): improve the logic.
2005-12-04 12:27:22 +01:00
Laurent MONIN
2df9c06c46
Tidy up.
2005-12-04 12:24:39 +01:00
Laurent MONIN
d1f8b8061c
html_form(): prevent useless second test by using else if instead of if.
2005-12-04 12:21:43 +01:00
Laurent MONIN
37b1fcadea
distribute_table_widths(): simplify.
2005-12-01 11:39:39 +01:00
Laurent MONIN
978eff94ad
Move code from format_table() to new distribute_table_widths().
2005-12-01 11:37:08 +01:00
Laurent MONIN
ac01cbba30
draw_table_caption(): reduce indentation level.
2005-12-01 11:33:43 +01:00
Jonas Fonseca
b42c3f5bd2
Merge with git+ssh://pasky/srv/git/elinks.git
2005-11-30 01:28:34 +01:00
Laurent MONIN
40829d3e34
draw_frame_point(): use BORDER_* and enum border_char type, drop a TODO.
2005-11-29 11:21:35 +01:00
Laurent MONIN
c8b53a6c2b
Complete enum border_char using codes borrowed from TWIN project.
2005-11-29 11:20:10 +01:00
Miciah Dashiel Butler Masters
fee63d574a
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-11-27 19:40:49 +00:00
Jonas Fonseca
3a9cba5695
Split the parser interface up into init, parser and done steps
...
The parser will eventually have to live across parses for incremental
renderering. Also the renderer and parser need to share the DOM stack.
2005-11-27 09:18:40 +01:00
Jonas Fonseca
83dca03a27
Remove indentation from option description
2005-11-27 07:29:36 +01:00
Jonas Fonseca
68404b5bf1
Remove some unused struct decls
2005-11-27 07:21:28 +01:00
Miciah Dashiel Butler Masters
d0eeab5b7e
Merge the special handling in start_element for tables into html_table.
2005-11-26 02:38:12 +00:00
Miciah Dashiel Butler Masters
947ddc4160
In html_table, rename parameter a to attr.
2005-11-26 02:15:00 +00:00
Miciah Dashiel Butler Masters
cf2fcaa84f
Shuffle code so that the do_html_select, do_html_select_multiple, and
...
html_select are together.
2005-11-26 01:50:46 +00:00
Miciah Dashiel Butler Masters
a781cf1894
Give do_html_select return type void instead of int.
2005-11-26 01:47:50 +00:00
Miciah Dashiel Butler Masters
321003a09e
Check for the multiple attribute in html_select rather than in
...
do_html_select.
2005-11-26 01:46:01 +00:00
Miciah Dashiel Butler Masters
c2445f09bd
Factor do_html_select_multiple out of html_select.
2005-11-26 01:43:10 +00:00
Miciah Dashiel Butler Masters
a6a67174af
Drop the html_textarea wrapper for do_html_textarea and rename
...
do_html_textarea to html_textarea.
2005-11-26 01:35:26 +00:00
Miciah Dashiel Butler Masters
a27284611c
Don't export do_html_select.
2005-11-26 01:32:10 +00:00
Miciah Dashiel Butler Masters
683c8722d2
Merge do_html_script into html_script.
2005-11-26 01:23:07 +00:00
Jonas Fonseca
bb588729ff
Silence various sparse warnings
...
... related to __INT_MAX__ and friends not being defined, and various
__builtin.. function declarations missing (they should probably be added
to sparse, but I am lazy).
2005-11-25 19:02:16 +01:00
Jonas Fonseca
48c113b114
Fix non-ANSI function declaration
2005-11-25 18:51:21 +01:00
Jonas Fonseca
2e18d752fc
Kill suspicious looking empty line
2005-11-25 13:31:07 +01:00
Laurent MONIN
3dd81f003e
Fix trailing whitespaces.
2005-11-25 09:38:32 +01:00
Laurent MONIN
50ffe0f2cd
html_select(): fix compilation bug to recent patch.
2005-11-25 09:32:43 +01:00
Miciah Dashiel Butler Masters
9062c83b51
Let html_select, html_textarea, and html_script call do_html_select,
...
do_html_textarea, and do_html_script directly instead of handling them
specially in start_element.
2005-11-25 01:22:55 +00:00
Miciah Dashiel Butler Masters
08c1cdf9d4
Add parameters unsigned char *html, unsigned char *eof, and unsigned
...
char **end to element_handler_T.
2005-11-25 00:30:13 +00:00
Jonas Fonseca
94e6b2def5
Revert DOM stack member renames and fix compile errors
2005-11-25 00:16:22 +01:00
Jonas Fonseca
60269a7466
One missing sparse warning fix
2005-11-24 21:57:35 +01:00
Witold Filipczyk
6afdbf608f
Fix frame-related crash on www.sts.pl (bug 723)
...
Earlier doc_view was freed in src/document/renderer.c line 455
and used later by load_additional_file.
2005-11-24 16:42:03 +01:00
Jonas Fonseca
5dffe2e8ac
Fix various sparse warnings
...
Mostly non-ANSI function declarations, using 0 as NULL and inline
function prototypes. Also removed unused S_HTTP_100 network state
enum type, which text message contained unknown escape sequence: '\?'.
2005-11-24 15:38:47 +01:00
Jonas Fonseca
2dd2e10a28
Remove unused ditrm declaration
2005-11-24 14:24:14 +01:00
Jonas Fonseca
7c0b6809b9
HTML_NODE_INFO -> HTML_, HTML_NODE_INF2 -> HTM2_
2005-11-24 13:32:04 +01:00
Witold Filipczyk
583649e807
Try to fix HTTP gzip decoding
...
Sometimes gzip decoding causes garbage on screen. With this patch garbage
will go away. It inverts the logic. Now is simpler.
2005-11-15 22:23:27 +01:00
Jonas Fonseca
b42b098fd4
Remove unused root member of struct dom_renderer
2005-11-15 12:11:48 +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
Jonas Fonseca
41941c64d6
Improve the DOM stack structures comments
2005-11-15 11:21:01 +01:00
Jonas Fonseca
16481d7baa
Move DOM exception enum to separate file
...
... and remove it from the dom_stack struct.
2005-11-15 11:01:11 +01:00
Jonas Fonseca
bccfbf8647
Rename DOM navigator -> stack
...
This is really a much more appropriate word since it never ended up being
more than just a stack. The rename also changes the symbol names to use the
much shorter "stack".
2005-11-15 10:43:52 +01:00
Jonas Fonseca
a0fb29bcd5
Fix typo introduced in cdd3f5d9739d...
2005-11-15 10:20:48 +01:00
Miciah Dashiel Butler Masters
cdd3f5d973
Modify the logic for confirm_submit to flow better.
2005-11-14 09:02:08 +00:00
Miciah Dashiel Butler Masters
683d73d89d
Tighten scope for cached in ses_goto.
2005-11-14 08:53:03 +00:00
Miciah Dashiel Butler Masters
97ad0e0f21
Use ses_load in post_yes.
2005-11-14 08:51:09 +00:00
Miciah Dashiel Butler Masters
93d6d959a5
Factor new function ses_load out of ses_goto.
2005-11-14 08:46:17 +00:00
Miciah Dashiel Butler Masters
16c0afb56c
Drop a superfluous assignment to confirm_submit in ses_goto.
2005-11-14 08:27:55 +00:00
Miciah Dashiel Butler Masters
5d39d90909
Add some whitespace in bad_punct.
2005-11-11 06:17:50 +00:00
Laurent MONIN
f7bc7c3497
Tidy up.
2005-11-10 15:42:35 +01:00
Laurent MONIN
2beadb8f6b
html_focusable(): use mem_free_set().
2005-11-10 15:38:52 +01:00
Laurent MONIN
29577cad31
html_focusable(): use a local variable to shorten lines.
2005-11-10 15:35:57 +01:00
Laurent MONIN
24a8ff7294
Tidy up, drop a goto.
2005-11-10 10:39:42 +01:00
Laurent MONIN
39015488d3
Optimize type of script matching.
2005-11-02 16:54:24 +01:00
Laurent MONIN
53590ee002
Attempt to match a wider range of types regarding detection of
...
javascript. Only text/javascript type was matched.
2005-11-02 10:38:24 +01:00
Jonas Fonseca
ffcee4532d
Make the build id thing work for out of tree builds
2005-11-01 23:19:50 +01:00
Miciah Dashiel Butler Masters
37d43ef7c6
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-11-01 19:32:31 +00:00
Laurent MONIN
b374d9f407
Options i18n debug code: accept > as ending char, it is used for tags.
2005-10-30 17:42:58 +01:00
Miciah Dashiel Butler Masters
8fb4fc437a
Redraw the title when the document changes it with ECMAScript.
2005-10-30 04:33:40 +00:00
Miciah Dashiel Butler Masters
4806005c21
Delete the socket file on the penultimate try in bind_to_af_unix,
...
restoring the behaviour that was inadvertently lost in CVS revision 1.48.
2005-10-30 04:23:04 +00:00
Miciah Dashiel Butler Masters
a7e0fa38cc
Re-arrange.
2005-10-30 04:16:19 +00:00
Miciah Dashiel Butler Masters
00b12197a5
Re-arrange.
2005-10-30 04:13:59 +00:00
Miciah Dashiel Butler Masters
9b6dd7f087
Re-arrange.
2005-10-30 04:13:12 +00:00
Miciah Dashiel Butler Masters
17827a5edf
Indent the new while loop.
2005-10-30 04:11:59 +00:00
Miciah Dashiel Butler Masters
dc7a7c6e1a
In bind_to_af_unix, convert the goto loop to a while loop.
2005-10-30 04:11:23 +00:00
Jonas Fonseca
aa07c4d848
Tidy up a bit
2005-10-26 22:39:12 +02:00
Jonas Fonseca
d7f002c8a1
Move code for the SEE object interface
2005-10-26 22:11:34 +02:00
Jonas Fonseca
a5d205c047
Add missing host variable and fix installation of charset.alias
...
Add variable expanded from @host@ and use $(host) instead of @host@
in the gettext Makefile.
Reported by zas.
2005-10-26 19:06:30 +02:00
Jonas Fonseca
9096886a67
@USE_INCLUDED_LIBINTL@ -> $(CONFIG_NLS), @GLIBC21@ -> $(GLIBC21)
...
Should remove all @Makefile.in@ variable traces except for @host@ also in
src/intl/gettext/Makefile (which zas will hopefully fix :).
2005-10-26 14:26:35 +02:00
Jonas Fonseca
e82de325a0
@USE_INCLUDED_LIBINTL@ -> CONFIG_NLS
2005-10-26 14:19:32 +02:00
Miciah Dashiel Butler Masters
811f458ef4
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-10-26 09:41:31 +00:00
Miciah Dashiel Butler Masters
c313b2877a
In change_hook_html, instead of redrawing the current tab,
...
set the resize flag on all tabs so that they will all be redrawn
to reflect the new setting.
2005-10-26 09:40:52 +00:00
Jonas Fonseca
1f69d4b931
Add support for navigator.preference() and navigator.savePreferences()
...
It required that the 'context' session was saved in see_ses (similarly to
the lua_ses variable)
Anyway, now you can use
var opt_value = navigator.preference("ui.window_title)
navigator.preference("ui.window_title", false)
navigator.savePreferences()
to get and set optinos + save the changes.
2005-10-25 19:13:33 +02:00
Jonas Fonseca
a317dd71fb
Print the invalid option value
2005-10-25 19:10:30 +02:00
Jonas Fonseca
7659f284ac
Try to comply to the client-side javascript interface and not our own
...
Renames the following things:
ELinks.write() -> alert() or navigator.alert()
ELinks.version -> navigator.appVersion
ELinks.home -> navigator.appHome
The last one is not defined by the client-side javascript interface.
2005-10-25 17:43:33 +02:00
Miciah Dashiel Butler Masters
dcbb9cf909
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-10-24 00:32:42 +00:00
Andrzej Zaborowski
4fe6e19dc6
Fix a memory-corruption bug in the line justification algorithm.
2005-10-24 00:30:36 +00:00
Miciah Dashiel Butler Masters
5ce3f23a2e
In justify_line, rename the variable 'insert' to 'diff'.
2005-10-23 23:30:12 +00:00
Jonas Fonseca
bc0cc67fd9
Cleanup and improve error messaging
...
Script errors are now reported either with WDBG() at startup, ERROR()
if SEE decides to abort and using info_box() for everything else, including
script runtime errors.
2005-10-24 00:57:47 +02:00
Miciah Dashiel Butler Masters
82c4d457d6
Add a boolean option ecmascript.ignore_noscript, default off,
...
that when enabled causes ELinks to ignore any content enclosed
with <noscript> tags.
2005-10-23 21:59:05 +00:00
Laurent MONIN
792e4c4355
html_special(): move va_end() call outside the switch and make variables
...
more local.
2005-10-21 10:15:03 +02:00
Laurent MONIN
728014118d
Since is_drawing_subs_or_sups() macro is only used by put_chars(),
...
defined it in this function.
2005-10-21 09:46:13 +02:00
Laurent MONIN
df065ead80
Remove now useless $Id: lines.
2005-10-21 09:14:07 +02:00
Jonas Fonseca
03118059ee
Move and make sense of the common code
2005-10-21 04:07:43 +02:00
Jonas Fonseca
0ba773e7a5
Add the basics for _browser_ (ecma)scripting ELinks with SEE
...
SEE is David Leonard's Simple Ecmascript Engine. The SEE scripting backend
is very raw and not tested very much. The idea was to see what kind of
creature SEE is (and contradict pasky's aired opinion that no new features
are added anymore ;).
echo 'function goto_url() { return 'localhost'; }' > ~/.elinks/hooks.js
and get local for maximum security ...
FYI: SEE is smaller than Spidermonkey but doesn't have the same kind of
data-driven interface, although it looks like it is possible to build that.
2005-10-20 20:38:01 +02:00
Laurent MONIN
956484cf57
Drop dead commented code and tidy up.
2005-10-20 17:26:22 +02:00
Laurent MONIN
d54f76bec8
Re-order code in a more logical fashion.
2005-10-20 17:23:18 +02:00
Laurent MONIN
2f8ed27eab
No need to initialize @end and @start.
2005-10-20 17:22:15 +02:00
Laurent MONIN
e47f8068d9
Declare variable in inner block.
2005-10-20 17:21:17 +02:00
Laurent MONIN
c17940044c
Move table cache stuff outside local renderer_context.
2005-10-20 17:17:25 +02:00
Laurent MONIN
23f7fc1b78
Move code from new_link() to new init_link_event_hooks().
...
Make code cleaner, and reduce indentation.
2005-10-20 11:43:42 +02:00
Laurent MONIN
d5e6110711
html_special_tag(): reduce indentation.
2005-10-20 11:21:02 +02:00
Laurent MONIN
ca27359131
Cast void * to struct tag *, instead the opposite.
2005-10-20 11:20:13 +02:00
Laurent MONIN
ee476c6eb6
shift_chars(): let it use alloca() if possible (--fastmem mode only).
2005-10-20 11:13:10 +02:00
Laurent MONIN
11564e255c
Trim trailing whitespaces.
2005-10-20 10:09:19 +02:00
Laurent MONIN
6cc441f34a
Introduce set_screen_char_color() and reduce code redundancy.
2005-10-20 10:07:50 +02:00
Jonas Fonseca
c88afeb1c2
path_to_top -> top_builddir
2005-10-20 04:00:35 +02:00
Jonas Fonseca
db99a74777
Add support for out-of-tree builds
...
Involves prefixing with $(srcdir) to some of the build rule variables. For
the builddir we create Makefiles which simply include the srcdir Makefile.
Add list make rule to get list of Makefiles to generate (find will get it
wrong for builddirs nested in srcdir).
There are still a few minor issues like the file paths echoed during make
install ...
2005-10-20 03:49:40 +02:00
Jonas Fonseca
e39a4342d6
Include $(top_srcdir)/Makefile.lib instead of $(path_to_top)/Makefile.lib
...
A step towards out of tree builds ...
2005-10-20 01:11:47 +02:00
Laurent MONIN
7392b8c503
Attempt to improve sub/sup rendering. Now 2<sup>2<sup>2</sup></sup> is
...
rendered as 2^2^2 and mixed sub/sup should be rendered in a better way.
A bit hacky though.
2005-10-19 23:11:27 +02:00
Laurent MONIN
9841316755
Use bitfields for on/off flags in struct renderer_context.
2005-10-19 11:56:26 +02:00
Laurent MONIN
65f4cfcb30
Add a field did_superscript to struct renderer_context and use it instead
...
of a local static variable.
2005-10-19 11:49:00 +02:00
Jonas Fonseca
c6f6717a79
Re-commit the rest of the changes which was reverted in the recent 'funny merge'
2005-10-17 23:20:53 +02:00
Marti Raudsepp
e31a66745a
Fix a bug in the KiB and MiB computation in add_xnum_to_string
...
where the fractional part overflowed to 0 before the integer part
was incremented.
Thanks to Marti Raudsepp for finding this bug and Marti and pasky
for the fix.
2005-10-16 01:53:06 +00:00
Petr Baudis
4ce737379f
Call option_changed() on two more appropriate places
...
This should fix the bug with toggled options not getting saved, and
changehooks wouldn't be called on certain circumstances (if there were
any to be called, anyway - but it is more correct now).
2005-10-12 09:50:41 +02:00
Petr Baudis
d34fe568cd
Introduce option_changed() for marking the options as modified
...
This just bundles the touching and calling change hooks.
2005-10-12 09:49:40 +02:00
Jonas Fonseca
d672ecf8f7
draw_border_cross(): Simplify lookup and describe the magic
2005-10-11 15:51:18 +02:00
Jonas Fonseca
9735520297
add_border_cross(): Add missing BORDER_S{D,U}TEE values
2005-10-11 15:36:45 +02:00
Sven Wegener
eb14866bb4
The attached patch is quite special, as it fulfills a personal need. It
...
adds a boolean configuration file option ui.sessions.keep_session_active
that'll change elinks' behaviour to not terminate the session, if the
last terminal exits. That allows me to re-use entered passwords after
closing all elinks terminals. Maybe some others will find this feature
useful too and it can be included in elinks.
I guess the best would be to combine this feature with an remote command
named terminate() to terminate the background elinks instance.
2005-10-11 01:22:38 +02:00
Miciah Dashiel Butler Masters
65321923b9
In setup_session, copy the viewstate for the new session from the base session.
2005-10-08 14:00:57 +00:00
Jonas Fonseca
4a69f56829
All PROGS are now automatically build by all-default
2005-10-03 00:01:36 +02:00
Jonas Fonseca
daaf61331a
Make installation also use the cmd calling
...
Makes it more obvious which files are actually installed. MKINSTALLDIRS
still spurs out a lot of 'mkdir ...', which probably should also be
silenced when V=0.
2005-10-01 14:16:19 +02:00
Jonas Fonseca
14f6c0ebf5
Always create the directory path before installing (using mkinstalldirs)
2005-09-28 21:43:09 +02:00
Jonas Fonseca
94ed6fa754
Finalize and cleanup the denser Makefile format
...
Convert remaining conditional file building to use
OBJS-$(CONFIG_FOO) += foo.o
one problem with reverse meaining (in util/) fixed with local 'hack'.
Cleanup and remove stuff which is now default targets.
2005-09-28 12:38:17 +02:00
Jonas Fonseca
c76586e6b8
Simplify the conditional building
...
Use the very cool 'VAR-$(CONFIG_FOO) += foo.o' feature instead of the more
verbose current ifeq($(CONFIG_FOO),yes) wrapping.
2005-09-27 22:49:47 +02:00
Jonas Fonseca
68de9e35d3
Automagically link in subdir lib.o files
...
It is a little ugly since I couldn't get $(wildcard) to expand *.o files
so it just checks if there are any *.c files and then link in the lib.o
based on that.
2005-09-27 22:38:00 +02:00
Jonas Fonseca
888726e3b8
Rename local install target to intall-local
2005-09-27 21:42:52 +02:00
Jonas Fonseca
1efab31581
Simplify building of and linking with directories
...
Ditch the building of an archive (.a) in favour of linking all objects in a
directory into a lib.o file. This makes it easy to link in subdirectories
and more importantly keeps the build logic in the local subdirectories.
Note: after updating you will have to rm **/*.a if you do not make clean
before updating.
2005-09-27 21:38:58 +02:00
Jonas Fonseca
b30064c0d0
Rename targets: *-l -> *-local
2005-09-27 21:11:28 +02:00
Jonas Fonseca
1af75f051b
Fix conditional building of bzip2 and gzip files
2005-09-27 19:07:44 +02:00
Jonas Fonseca
50f4b46616
dom_node_cmp(): Minor optimization
2005-09-27 14:39:40 +02:00
Jonas Fonseca
23497405cb
More installation fixes
...
- Use the mkinstalldirs in $(top_srcdir)/config
- Fix buggy scripting of srcdir which broke the local gettext install
- Add the local uninstall stuff so we have it around
2005-09-23 20:30:56 +02:00
Jonas Fonseca
c2879b655b
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-09-23 14:51:51 +02:00
Strahinya Radich
f86a009108
Add Serbian translation
2005-09-23 14:51:14 +02:00
Petr Baudis
bd0f5ba60d
We call $(mkinstalldirs) $(MKINSTALLDIRS)
...
Should fix make install.
2005-09-23 09:08:47 +02:00
Petr Baudis
ade2ae0a69
Add simple support for the display CSS property
...
display: inline, display: block and display: inline-block (aliased to
inline) is now supported. I hope I didn't break anything. :-)
This makes the new yucky CSS'd slashdot look at least a bit better.
2005-09-22 22:07:33 +02:00
Petr Baudis
31bdf06d8f
More detailed element*.linebreak description
2005-09-22 21:52:12 +02:00
Petr Baudis
7a91098135
Use is_*_element() to determine whether element is block or inline
...
Use that in the stack killing code, where we do some pretty funny checks
and stuff. The decision is based on the linebreak struct attribute,
non-zero for block elements.
2005-09-22 21:44:28 +02:00
Russ Rowan
a3f177e088
Really fix binary installation.
2005-09-22 10:07:27 -04:00
Frobozz the Neuromancer,668,302-521-2606,609-645-8080
0815fe1cf8
Fix installation of elinks binary.
2005-09-22 08:50:59 -04:00
Laurent MONIN
787059253c
download_dialog_layouter(): store bittorrent test result in a temporary
...
variable.
2005-09-19 16:02:27 +02:00
Jonas Fonseca
5455795394
Upgrade to use cg-commit-id for getting build ID
...
The recent cogito-0.15 renamed commit-id to have the cg-prefix.
2005-09-19 11:04:03 +02:00
Jonas Fonseca
baadeebab1
More CVS -> GIT conversions
...
Update INSTALL to both 'cover' GIT checkouts and requirements for the new
build system. Hacking info no more advices to add CVS Id lines.
2005-09-18 18:47:20 +02:00
Petr Baudis
1c382625fd
Install the ELinks binary during make install.
2005-09-17 20:37:23 +02:00
Laurent MONIN
a9f70fd776
really_close_tab(): call number_of_tabs() only if needed.
2005-09-17 20:14:33 +02:00
Laurent MONIN
8d234b242b
DEBUG_HARDIO tidyup.
2005-09-17 20:06:01 +02:00