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
2fab08497e
Ignore potfiles.list
2005-12-27 01:35:15 +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
Jonas Fonseca
b9c5bc5536
Make building of .gmo files use the new build system
...
It now shows:
[GMSGFMT] po/da.gmo 1538 translated messages, ...
2005-12-26 19:17:47 +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
ec6e7c9044
Drop a useless and nonstandard -e from the echo in EL_LOG_CONFIG.
2005-12-26 10:37:32 +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
Laurent MONIN
4af4ac8a59
French translation was updated.
2005-12-26 10:26:11 +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