Jonas Fonseca
8e954e9f61
rss: check for allocation failure of struct rss_renderer
2007-08-29 12:05:10 +02:00
Jonas Fonseca
6ebcce0655
rss: document the rss_renderer members
2007-08-29 12:02:36 +02:00
Jonas Fonseca
f2db9c07ed
rss: remove the horrible text collection code which didn't do anything
2007-08-29 11:27:54 +02:00
Jonas Fonseca
86ffd94237
rss: simplify rendering to be done while parsing
2007-08-29 11:21:06 +02:00
Kalle Olavi Niemitalo
78f733c6c1
More doc comments about coordinates.
2007-08-29 09:57:18 +03:00
Jonas Fonseca
0a5ee2d3de
rss: move the rendering code above the push/pop handlers
2007-08-29 02:29:58 +02:00
Jonas Fonseca
51fec0ec52
rss: rename rss_renderer variables from data to rss
2007-08-29 02:26:53 +02:00
Jonas Fonseca
16a4110467
rss: minor cleanups
2007-08-29 02:15:06 +02:00
Jonas Fonseca
19b271e417
rss: remove check for rss_renderer->text that is already done above
2007-08-29 02:13:26 +02:00
Jonas Fonseca
8c4191fe87
rss: assert that node->parent is always set
2007-08-29 02:13:10 +02:00
Jonas Fonseca
af4b7bed84
Use the new OBJS-unless$(CONFIG_FOO) instead of $(call not,...)
2007-08-29 01:57:01 +02:00
Petr Baudis
6b05ddb762
Remove unnecessary document/html/parser.h includes
2007-08-29 00:08:05 +02:00
Petr Baudis
d905fb803a
Makefile.lib: Fix the $(OBJS) rule
2007-08-28 23:35:22 +02:00
Petr Baudis
e876df70d8
document/html: Make HTML parser state transparent
...
Before, *_html_parser_state() operated with struct html_element *. Now, it is
transparent for the renderer (just void *), so that DOM won't have to provide
this struct but will be able to use something internal.
2007-08-28 23:35:00 +02:00
Petr Baudis
14ae8ecc01
Makefile.lib: Add support for "unless" config-driven rules
...
Normally, you can add some objects or subdirs to the build if some
config variable is set to yes, by doing:
SUBDIRS-$(CONFIG_FOO)
Now you can do it the other way too, including stuff if some
variable is set to no:
SUBDIRS-unless$(CONFIG_FOO)
This will be used for switching between two HTML parser implementations.
2007-08-28 22:55:26 +02:00
Petr Baudis
e5539a9937
document/html: Move enum html_special_type from parser.h to renderer.h
...
...since it is renderer interface.
2007-08-28 22:19:33 +02:00
Petr Baudis
a74af825e2
document/dom/rss.c: Add extra styles
...
Style aux got split to styles author, author-date-sep and date.
2007-08-28 21:34:32 +02:00
Petr Baudis
b457af1984
document/dom/source.c: Trivial simplification
2007-08-28 21:31:49 +02:00
Petr Baudis
baeb0cb0d5
document/dom: Move stylesheet parsing out of style loop
...
...for better clarity of the document initialization functions.
2007-08-28 21:31:25 +02:00
Petr Baudis
a9619bce80
document/renderer.c: Fix description
2007-08-28 21:28:32 +02:00
Petr Baudis
dc0cf23631
document/dom: Simplify init_template_by_style() usage
...
It doesn't take the useless styling information but just uses options->default_style.
2007-08-28 21:28:03 +02:00
Petr Baudis
55495ab655
document: Turn options' default_fg, default_bg to default_style
...
...as struct text_style. This way it might be possible later to
add other default formatting attributes by CSS and it allows
quite a code simplification in the DOM renderer.
2007-08-28 21:16:44 +02:00
Petr Baudis
db9431465f
document: Move text_style-related stuff to dedicated format.*
...
We will need to include it from options.h and the include chain just
wouldn't work. And it feels like a hack to have it in renderer.h anyway.
2007-08-28 21:05:00 +02:00
Petr Baudis
b66d2bec67
document: Unify text style -> screen attribute handling
...
Currently, all DOM, HTML and plain renderers had their own routine for
conversion from text style to screen attribute. This moves text_style and
text_style_format from html/parser.h to renderer.h and introduces new generic
routine get_screen_chracter_template() that is used by all the specific
rendering engines.
2007-08-28 21:02:08 +02:00
Jonas Fonseca
8376feb6b1
Fix protocol/test ignore rule for the uri-test program
2007-08-28 20:35:14 +02:00
Jonas Fonseca
bbd7c8354a
Move get_test_opt to util/test.h and use throughout test programs
2007-08-28 20:34:17 +02:00
Petr Baudis
38ee8a137c
document/dom/util.*: Make init_template() private
2007-08-28 20:32:15 +02:00
Jonas Fonseca
c6a223c8dd
dom/test: properly test test option matches in get_test_opt
2007-08-28 20:22:29 +02:00
Petr Baudis
070d335796
document: struct format_attr -> struct text_style_format
2007-08-28 20:17:53 +02:00
Jonas Fonseca
5d88ea78f9
dom/test: rename get_opt to get_test_opt to avoid namespace problems
2007-08-28 20:16:27 +02:00
Petr Baudis
e133941206
document/html: struct text_attrib_style -> struct text_style
2007-08-28 20:15:30 +02:00
Jonas Fonseca
0f53941fef
Introduce test library in util/test.h containing the die() function
...
Fix the die() function to exit with EXIT_FAILURE value as pointed
out by Kalle on elinks-dev in <87tzqkxhlp.fsf@Astalo.kon.iki.fi>.
2007-08-28 20:14:08 +02:00
Petr Baudis
46e44f9298
document/dom: Move renderer-specific data from the generic struct dom_renderer
...
This is hopefully the final step to have the specific renderers completely
separated and self-contained.
2007-08-28 19:58:08 +02:00
Miciah Dashiel Butler Masters
8a8be53452
parse_set and parse_unset: restore stomped char before returning
...
The parsing in parse_set and parse_unset saves, overwrites with a NUL, and restores a character in the string that is being parsed. If there is a malloc failure between overwriting and restoring, the restore is not done. This commit changes that behaviour to restore before returning.
2007-08-28 17:47:59 +00:00
Petr Baudis
91e512cca8
document/dom: Move URL regexp setup from general code to source renderer
2007-08-28 19:40:30 +02:00
Petr Baudis
afb9b6daa5
document/dom: Move styles initialization out of init_dom_renderer()
...
Now, CSS is initialized separately for each of the renderers, so that
also RSS doesn't just choose styles of random DOM node types.
init_template_by_style() is introduced as the common backend for
loading CSS properties.
2007-08-28 19:38:13 +02:00
Miciah Dashiel Butler Masters
fa12b10e26
Introduce session- (tab-)specific options
...
Introduce session-specific options for those options that have toggle-... actions.
2007-08-28 17:29:41 +00:00
Miciah Dashiel Butler Masters
fd22173b29
Introduce option tree shadowing
...
Introduce get_option_shadow. This routine takes an option, the tree under which that option resides, and another tree. It returns a corresponding option with parallel ancestry in the second tree, creating that option and ancestry if it does not already exist.
Add enum copy_option_flags.
Add the CO_NO_LISTBOX_ITEM flag, which is used to suppress listbox creation for shadowed trees.
Add the CO_SHALLOW flag, which is used to suppress the duplication of unwanted children for shadowed trees.
Add a flags parameter to copy_option and tree_dup (and out of necessity, struct option_type_info and str_dup).
2007-08-28 17:25:24 +00:00
Miciah Dashiel Butler Masters
ea372bd0cd
get_opt_*: Add ses parameter
...
Add a session parameter to get_opt_ and its wrappers in preparation for session-specific and domain-specific options.
2007-08-28 17:24:59 +00:00
Petr Baudis
494e4a1019
document/dom/rss.c: Explain what normalizing is
...
As insighted by Jonas.
2007-08-28 18:12:41 +02:00
Petr Baudis
2480d1ae0a
Merge branch 'master' of /srv/git/elinks
2007-08-28 17:43:14 +02:00
Petr Baudis
445a0ae600
document/dom: Some symbols should be static
2007-08-28 17:43:01 +02:00
Petr Baudis
4003e6decf
document/dom: Split SGML (HTML) source renderer to source.*
2007-08-28 17:41:55 +02:00
Petr Baudis
556ae45b00
document/dom: Split RSS renderer to rss.*
2007-08-28 17:33:22 +02:00
Petr Baudis
144bd77240
document/dom: Split rendering utilities to util.*
...
These are functions that are commonly used by the individual renderers to put stuff on the canvas etc.
2007-08-28 17:12:23 +02:00
Miciah Dashiel Butler Masters
3975d28bce
Merge commit 'origin/elinks-0.12'
...
Conflicts:
doc/Doxyfile.in
src/protocol/bittorrent/common.h
2007-08-28 14:47:39 +00:00
Miciah Dashiel Butler Masters
80259bc53e
Revert "justify_line(): Re-add wordlen == 0 test"
...
This reverts commit 18cdce6c39
.
elinks-0.12 has a different fix, and I will soon merge in that branch.
2007-08-28 13:41:14 +00:00
Petr Baudis
f88f49d955
document/dom: Explain that only renderer lives here
2007-08-28 15:15:13 +02:00
Petr Baudis
4f658b6ec1
gitignore: Add *.o for git status compatibility
...
git status doesn't use default ignore rules like cg status.
2007-08-28 14:57:35 +02:00
Kalle Olavi Niemitalo
40afaae7d6
Doc comments about coordinate systems.
...
So that I may better understand Witek's patches.
2007-08-28 09:52:37 +03:00