2003-12-11 Dodji Seketeli * configure.in: updated version numbers for 0.4. * src/layeng/cr-lay-eng.[ch]: (cr_lay_eng_style_to_pango_font_attribute): added this so that the pango dependancy comes into the layout engine. * src/parser/cr-parser.c,src/parser/cr-selector.h, src/parser/cr-stylesheet.h,src/parser/cr-term.[ch], src/parser/cr-utils.h: made sure libcroco headers files are C++ compilers friendly. * src/seleng/Makefile.am: remove pango dependancy from the selection engine. Put it in the layout engine. * src/seleng/cr-style.[ch]: (cr_style_to_pango_font_attributes): removed this function from here and put it in src/layeng/cr-lay-eng.[ch]. This way, we seleng doesn't depend on pango. Only layout engine does. * Makefile.am: big cleanup here. * configure.in: make sure seleng, layeng and tests are disabled by default. Added makefiles in docs/ docs/example tests/ tests/test-inputs tests/test-output-refs * csslint/Makefile.am: cleaned this up. make sure to add seleng,layeng and glib compile flags whenever needed. * docs/Makefile.am,docs/examples/Makefile.am: new makefiles. * src/libcroco.h: removed references to cr-parser-input.h * src/layeng/Makefile.am: cleanup, make distcheck is happier. * src/parser/Makefile.am: cleanup, make distcheck is happier. * src/parser/cr-doc-handler.h: removed reference to cr-parser-input.h * src/parser/cr-layout-eng.h,src/parser/cr-parser-input.h: removed these. * src/parser/cr-parser.c: (cr_parser_new): fixed a typo here. * src/parser/cr-parser.h,src/parser/cr-tknzr.h: removed ref to cr-parser-input.h * src/seleng/Makefile.am: cleanup, make distcheck is happier. * tests/testctl: exclude makefiles when diffing outputs and re outputs. * configure.in,src/layeng/Makefile.am,src/seleng/Makefile.am: Provides libcrseleng and libcrlayeng with version info different from the one of libcroco. * src/layeng/Makefile.am,src/seleng/Makefile.am: Fixed more build system stuffs here. * docs/examples/cssom-example-1.c,docs/examples/sac-example-1.c: Make these compile with g++. * src/layeng/Makefile.am: another build system cleanup. * docs/examples/selection-example-1.c,docs/examples/selection-example-1.css, docs/examples/selection-example-1.xml: added this code example from Stefan Seefeld. 2003-08-17 Gaël CHAMOULAUD * src/layeng/cr-lay-eng.c: (layout_block_box): * src/seleng/cr-sel-eng.c: (put_css_properties_in_hashtable): Applied a patch from Michael Culbertson -> Compilation failed with gcc 2.95.4 due to declarations after calls to g_return_val_if_fail and the like. 2003-07-15 Dodji * src/seleng/cr-sel-eng.c (id_add_sel_matches_node): fixed some stupid error that was making gcc 2.9xxx cry. 2003-07-05 Dodji Seketeli * src/seleng/cr-style.h: rearranged the enum CRNumProp values. * src/seleng/cr-style.c: fixed the border-x: bug. This now support also number and not only symbolic border width like thin,thick etc ... * src/parser/cr-num.c: documented the apis here. * src/layeng/cr-lay-eng.c: Fixed some subtle bugs and finally implemented the width:15% (set percentage to width). 2003-07-01 Dodji Seketeli * src/layeng/cr-lay-eng.c: put the call to style_specified_2_computed_values() in the layout_box() function. It was previously in the create_box_tree_real(). * src/layeng/cr-box-view.c: fixed a compiler warning. * hmmh first commit after 0.2 release. 2003-06-30 Dodji Seketeli * tests/test-output-refs/test4.1.css.out: updated this test reference output. * src/parser/cr-statement.c: fixed a typo that lead to a small regression detected by the non regression test suite. * tests/testctl: made sure no to consider the .cvsignore file during the final diff. * src/layeng/cr-box-view.[ch]: fixed some compiler warnings. 2003-06-28 Gaël Chamoulaud (strider) * csslint/csslint.c (csslint_show_version): Added CROCO_LAYENG_ENABLED test in csslint_show_version function. 2003-06-23 Dodji Seketeli * docs/design/parser-architecture.txt: more bits on this. 2003-06-22 Dodji Seketeli * src/parser/cr-statement.c: added parse_font_face_unrecoverable_error_cb(), parse_page_unrecoverable_error_cb() ... to handle parsing error in the cr_statement_xxx_parse() method. These callback method are not called yet. * src/parser/cr-tknzr.c: made the cr_tknzr_parse_important() look somewhat better. * src/parser/cr-parser.c: fixed some bugs in the parser. It does now parse the w3c forward compatible parsing test sheet at http://www.w3.org/Style/CSS/Test/CSS1/current/sec71.htm . * docs/design/parser-architecture.txt: updated this doc. A lot more is still needed. * csslint/csslint.c: fixed some small bugs in csslint. Now, --cssom is set by default. 2003-06-21 dodji * src/parser/cr-statement.[ch]: Changed the prototype of cr_statement_unlink() to harmonize it with cr_declaration_unlink(). 2003-06-20 Dodji Seketeli * src/parser/cr-term.[ch]: added the cr_term_parse_expression_from_buf() function. this is new and still needs to be tested. * src/parser/cr-parser.[hc]: made cr_parser_parse_expr() public. * src/parser/cr-declaration.[ch]: changed cr_declaration_parse() into cr_declaration_parse_parse_from_buf(). * src/parser/cr-statement.[ch]: fixed some typos. added the function cr_statement_does_buf_parses_against_core() and cr_statement_ruleset_get_declarations(). * src/parser/cr-parser.[ch]: made cr_parser_parse_statement_core() public. * src/parser/cr-om-parser.c: fixed a small typo. * src/parser/cr-declaration.[ch] added a new cr_declaration_unlink() function. 2003-06-19 Dodji Seketeli * tests/test4-main.[ch]: updated this to test cr_statement_parse_from_buf(). It seems to work now. Still some memleaks to fix. * src/parser/cr-statement.[ch]: some bug fixes in cr_statement_parse_from_buf() + added a new cr_statement_at_import_rule_parse_from_buf() method. 2003-06-18 Dodji Seketeli * src/parser/cr-statement.[ch]: added cr_statement_font_face_rule_parse_from_buf () . and a generic cr_statement_parse_from_buf () that knows how to a parse virtually any css2 statement. This needs debugging though. * src/parser/cr-parser.c: fixed some possible sigsev that could occur when trying to access a null sac handler. * tests/test4-main.c: updated the test routine to test cr_statement_at_charset_rule_parse_from_buf(). * src/parser/cr-statement.[ch]: added a new cr_statement_at_charset_rule_parse_from_buf() method to to create an "@charset" statement from a buffer text content. * src/parser/cr-parser.c:Fixeds a small possibility of memleak in cr_parser_parse_charse() * tests/test4-main.c: fixed a small typo in the "@page" rule embedded in gv_at_page_buf. * src/parser/cr-parser.c: fixed a small bug in the cr_parser_parse_page () function. 2003-06-17 Dodji Seketeli * tests/test4-main.c: added test_cr_statement_at_page_rule_parse () to test the new cr_statement_at_page_rule_parse_from_buf() function. * src/parser/cr-statement.[ch]: added a first version of cr_statement_at_page_rule_parse_from_buf(). This doesn't work. I need to debug it first. * tests/test4-main.c: updated this to test cr_statement_at_media_rule_parse_from_buf(). * src/parser/cr-statement.[ch]: debuged cr_statement_at_media_rule_parse_from_buf() and the functions it relies on. cr_statement_new_ruleset()=> fixed this so that it properly handles the containing "@media" rule. cr_statement_new_at_media_rule =>fixed this so that it properly handles the contained rulesets. * src/parser/cr-statement.[hc]: coded a first version of cr_statement_at_media_rule_parse_from_buf(). This took the writing of a couple a SAC callback. Pfffew, SAC is a rather tedious api. cr_statement_at_media_rule_parse_from_buf() does not work yet, I still have to debug it. * src/parser/cr-parser.c: use the new cr_tknzr_peek_byte2 () function in the cr_parser_parse_import() method. This is a cleaner, smaller and faster than the older approach. * src/parser/cr-om-parser.c: use the cr_dup_glist_of_string () helper fonction in the start media callback. * src/parser/cr-utils.[ch]: fixed some 'const' omissions here also. * src/parser/cr-enc-handler.[ch]: fixed some "const" omissions. 2003-06-16 dodji * src/parser/cr-parser.[ch]: cr_parser_parse_charset(), cr_parser_parse_import(), cr_parser_parse_page (), cr_parser_parse_font_face(), cr_parser_parse_media(), * src/parser/cr-tknzr.[ch]: added cr_tknzr_peek_byte2() function to export the functionalities of cr_input_peek_byte2(). 2003-06-15 dodji * tests/test4-main.c: updated this to test the new cr_statement_ruleset_parse_from_buf () method. * src/parser/cr-statement.[ch]: Added a cr_statement_ruleset_parse_from_buf () method. This is based on the changes made in cr-parser.[ch]. * src/parser/cr-selector.[ch]: added a method cr_selector_parse_from_buf (). This is based on the changes made in cr-parser.[ch]. * src/parser/cr-parser.[ch]: Some rather important changes occured here ... revisited the way selectors and rulesets are parsed so that one could parse a buffer that contains only a ruleset. A visible implication of this is that cr_parser_parse_selector () and cr_parser_parse_ruleset () become public methods callable independantly. In the past, this was not possible. Only cr_parser_parse_stylesheet () was public. * src/parser/cr-om-parser.c: updated this to comply with the changes made in cr-doc-handler.[ch]. * src/parser/cr-doc-handler.[ch]: 1/ Created an explicitely private field of CRDocHandler to store parsing context, parsing result and any eventually needed private data structure. The privates fields are accessible through getters/setters though. 2/ made sure to increment the ref count of each instance of CRDocHandler at instanciation time. This may introduce some memleaks in the working code. I will fix them in next commits. * src/parser/cr-declaration.c: (cr_declaration_append2() ): modified this so that we can append declaration to a list of declarations that don't belong to a ruleset. 2003-06-14 dodji * src/parser/cr-term.h (struct _CRTerm): fixed a typo. * src/layeng/cr-lay-eng.c, src/seleng/cr-style.[hc]: more fonts selection implementation. * tests/test7-main.c: updated this to test the font selection implem. 2003-06-12 dodji * src/seleng/Makefile.am: added pango stuffs. * configure.in: added pango detection. * src/seleng/cr-fonts.c: a bit more font selection. * src/layeng/cr-lay-eng.c: a bit more font selection. * src/seleng/cr-style.c: font selection code again. 2003-06-09 Dodji * tests/test4-main.c: updated this test to test the new cr_declaration_to_string () api. * src/parser/cr-declaration.[ch] (cr_declaration_to_string ()): Added this new api to allow the serialisation of css declarations. This is not well tested yet, but it works. * src/parser/cr-parser.c (cr_parser_parse_declaration): fixed a bug that prevented this parsing function to be called outside the stylesheet parsing context. * src/seleng/cr-style.[ch]: went forward in the font properties gathering. * src/parser/cr-tknzr.[ch]: fixed some 'const" related compilation warnings. * src/parser/cr-parser.[ch]: exported the declaration parsing api so that cr_declaration_parse () can use it. * src/parser/cr-declaration.[ch]: added cr_declaration_parse () api. Not tested yet. * tests/test7-main.c: updated the test to reflect all the changes that happened today. * src/parser/cr-enc-handler.[ch], src/parser/cr-input.[ch], src/parser/cr-om-parser.[hc], src/parser/cr-parser.[ch]. Add the 'const' keyword in to function prototypes. * src/layeng/cr-lay-eng.c: (compute_text_box_inner_edge_size ()) revisied this function to make it append the text label to it's container so that the size of the text label can be computed. I don't know how to do this otherwise. I would have liked this not to happen since compute_text_box_inner_edge_size () is part of the layout process not the rendering process. Now these two processes are much more tied than I would like. * src/layeng/cr-box.c: updated the cr_box_to_string () method to make it serialise CRBox->inner_edge.max_width for debug purposes. * src/layeng/cr-box-view.c: 1/now, the layout code is called in the "expose-event" signal callback. Trying to isolate the layout from the rendering appears to be too difficult if not impossible. 2/created a cr_box_view_new_from_xml_css_bufs () method to create a box view directly from a css buffer and an xml buffer. 2003-06-04 Dodji * tests/test7-main.c: created a new xml/css document to bring the test to a broader extend. It appeared that libcroco's layout code is damned bugged... I am debugging it... * src/seleng/cr-style.c:changed the default element display property to "block" and not "inline" anymore. Also made the set_prop_background_color () function support hex strings (e.g.: #ffffff or #ee) * src/parser/cr-rgb.[ch]: added cr_rgb_set_from_hex_str () to support hash (hex) strings (#ffffff or #eee). * src/parser/cr-num.c:support of fixed/variable length numbers. * src/layeng/cr-lay-eng.c: a lot of layout fixes. 2003-05-31 Kang Jeong-Hee * src/parser/*.[ch]: s/void */gpointer/ 2003-05-12 Dodji * tests/test7-main.c: updated the test to reflect the new supported css2 properties. * src/layeng/cr-style.c: (set_prop_border_x_width_from_value ()) debugged this. (set_prop_border_x_style_from_value ()) debugged this. * src/layeng/cr-box-view.c: (draw_borders ()) debugged this a lot. 2003-05-07 Dodji * tests/test7-main.c: just added a test for the "background-color" property. * src/layeng/cr-box-view.c: (set_color ()) added this function to manage the setting of rgb color in an easier way than set_background/foreground(). (set_border_line_attrs ()) implemented the border-x-color property setting in this function. This uses the new set_color () function. (draw_padding ()) revisited this function to make it draw a padding area that has "background" color. 2003-05-06 Dodji * src/layeng/cr-style.[ch]: started to add the support of the "color" and "background-color" properties. * src/layeng/cr-lay-eng.c: (style_specified_2_computed_value()) updated this function to compute also the new colors properties (color and background-color). * src/layeng/cr-box-view.c: (set_background_color ()) (set_foreground_color ())added these functions to set the box inner/padding edge color. also started to use these two functions to test them. 2003-05-05 Dodji * tests/test7-main.c: small update for debug purposes. * src/layeng/cr-style.h: cleanup. * src/layeng/cr-lay-eng.c: put in here what is needed to support border-x and border-style-x properties. * src/layeng/cr-box.[ch]: make CRBoxModel inherits CRBox. * src/layeng/cr-box-view.c: start to support the border-style-x and border-x property. I must test this. * configure.in: defined a personal environment where I can set the CFLAGS I want. 2003-05-04 Dodji * src/parser/cr-tknzr.c: (cr_tknzr_get_next_token ()) fixed a small bug in here. * src/layeng/cr-style.[ch]: Deeply Modified the layout of the CRStyle structure for 1/group all numerical properties together in a table. 2/group all color (rgb) properties together in another table. 3/group all border style properties together in another table. That way, accessing those properties is more efficient. 4/make sure that each properties can have 3 values: specified, computed and actual value as specified by the css2 spec. (I doubt actuall value is usefull here though). Modified the file to make this be coherent again. * src/layeng/cr-lay-eng.c : Made this coherent after the change of the CRStyle structure. (normalize_num ()):created this function to normalize numerical properties. (style_specified_2_computed_values ): new function to computed css2 "computed values" from specified values. This is required by the css2 spec in chap 6.1. (create_box_tree_real): updated this to make it call style_specified_2_computed_values () before actually building the box. 2003-05-01 Dodji * configure.in, csslint/Makefile.am, src/parser/Makefile.am, src/seleng/Makefile.am, src/layeng/Makefile.am: fixed #111895 2003-04-28 Dodji * tests/test7-main.c: woohoo, this now shows some text. Okay, it is a crappy design sketch, but this is a milestone. * src/layeng/cr-lay-eng.c: store the created label widget in the cache. box content cache. * src/layeng/cr-box.h:created a box content cache to store the label widget used to calculate text box size. * src/layeng/cr-box-view.[hc]: made this simpler and manage to make it show someting on the screen. Now the box view is just the view port. To render the box model, we just walk thru it and draw each box in the box view. 2003-04-26 dodji * configure.in: made sure to include the libgnomeui clflags and libsflags to croco libs and croco cflags when the layeng is turned on. * csslint/Makefile.am: made sure to use the CROCO_LIBS and CROCO_CLFAGS variables. * src/libcroco.h: added the cr-box-view.h include file * src/layeng/cr-box-view.c: started to write a draw_box() function that will draw the box tree on the screen. * src/layeng/cr-lay-eng.c: removed the adjust_edges_on_inner_edge () function. * tests/Makefile.am: made sure to include libgnomeui clfags and libs when layeng is turned on. * tests/test7-main.c: made started to include a cr-box-view.c test. 2003-04-20 dodji * tests/test7-main.c: updated the test7 code to see the layout in action. * src/layeng/cr-style.[ch]: just modified some rule names for convenience. * src/layeng/cr-lay-eng.[ch]: when forward in normal flow layout code. Have now very basic layout code. Still have to write a canvas code to render the layed out box. * src/layeng/cr-lay-eng.c (compute_text_box_inner_edge_size): started to work on the the inner edge size computation based on pango. * src/layeng/Makefile.am: updated to compile/link against libgnomeui. * configure.in: updated it to test the presence of libgnomeui if and only if the layout engine is enabled. 2003-04-15 Alexander Larsson * Makefile.am: Change _DATA to _HEADERS for header * src/Makefile.am: Only use filename for _HEADERS. remove libcroco-config.h from _HEADERS 2003-04-12 dodji * src/* made a big change of the source tree. Now, the whole thing is divided in 3 parts: the paser, the selection engine and the layout engine. The parser source files produce a libcroco.so shared lib. The selection engine source files produce a libcrseleng.so shared library. The layout engine source fils produce a libcrlayeng.so shared library. The same configure options as before apply. 2003-04-05 Dodji * src/cr-token.h (struct _CRToken): applied a patch from Greg Lee , which solves a compilation error under gcc 2.95.3. Basically, it transforms an implicitly defined union into an explicitly defined one. Modified all the files impacted. 2003-04-03 Dodji * tests/testctl: can now run one single test. This can also run all the tests a run a simple report that summarizes the results of the tests. * configure.in: make sure this generates the libcroco.spec file. make sure to test the presence of glib2 during configure. * libcroco.spec.in: added autoconf magic in this. Can now generate an rpm by typing make rpm. Before that, the user that types make rpm must have write acess to /usr/src . 2003-04-02 Gaël Chamoulaud (strider) * croco-config.1: updated the man page * csslint/csslint.1: updated the man page 2003-04-01 Dodji * tests/testctl: started to code the libcroco test launcher script. it is not useable yet, but work is in progress. 2003-03-31 Dodji * src/cr-lay-eng.c: started to code the tree annotation process. I seriously need to debug this. * configure.in: put in there the list of tests to be compile and the conditions cause AM_CONDITIONAL() is buggy and does not seem to fit my needs. Also modified tests/Makefile.am to take this in account. * tests/test7-main.c: added this file to debug the layout engine related stuffs. * croco-config.1: some minor fixes in the man page. 2003-03-30 Christian Schaller * Fixed disting by adding manpages to EXTRA_DIST * Added spec.in file, this need to be added to build system to generate .spec file. * Remove Makefile.in from CVS, this is a generated file 2003-03-30 Dodji * autogen.sh: Made sure that in dev mode, the configure scripts gets called with --enable-tests=yes --enable-seleng=yes --enable-layeng=yes. This options being set to 'no' by default. * src/cr-lay-eng.c: Started to code a layout engine. This is more a design sketch than real usefull code so far. * src/cr-cascade.c: Started to code a #CRCascade class to abstract a css2 cascade. This is more a placeholder (or a design sketch) than real usefull code today. * tests/Makefile.am: improved the conditional compilation of the tests; e.g if the selection engine feature is disabled the selection engine tests won't be compiled. * configure.in: added --enable-layeng to contionaly compile the layout engine files. Also improved the handling of of the enable-xxx arguments => 'yes' forces the feature to be enabled (the coder knows what he is doing); 'auto' checks if the features xxx depends on are available and then switches xxx on. 2003-03-24 dodji * src/cr-style.c (cr_style_set_style_from_decl): Have a first hot (and bugged) implem of this function. I can now, go and get worried about building the annotated xml tree. 2003-03-20 Gaël Chamoulaud * Makefile.am (SUBDIRS): added man page for croco-config 2003-03-20 Dom Lachowicz * COPYING: replace with contents from COPYING.LIB (GNU LGPL) 2003-03-20 Gaël Chamoulaud * configure.in: added conditional compilation of the unit tests in tests/ subdir * tests/Makefile.am (INCLUDES): conditional compilation of the unit tests in tests/ subdir 2003-03-19 Gaël Chamoulaud * Relicense from GPL -> LGPL 2003-03-18 Gaël Chamoulaud * configure.in: fixed a configure bug. Make sure to properly check the libxml2 versions. 2003-03-18 Dom Lachowicz * autogen.sh: Use gnome-autogen (cvs co gnome-common). Creates libtool and other things properly * configure.in: better check for LIBXML2, conditional compilation of the SELENG module * tests/Makefile.am: disable test5 until I can think of a better work-around 2003-03-16 dodji * src/cr-style.c (set_border_x_style_from_value): new method added to gather 'border_top_style' ... 'border_left_style' properties value from the css stylesheet. (set_border_x_width_from_value): completed this function to properly gather 'border_top_width' ... 'border_left_width' properties values from the css stylesheet. * src/cr-num.c (cr_num_set): new method added. 2003-03-15 dodji * src/cr-utils.[ch] added some new helper functions/did some cleanups. * src/cr-tknzr.[ch]: made the necessary modifs implied by the new CRNum/CRTerm type system. * src/cr-term.[ch]: big cleanup of the CRTerm/CRNum typing system. * src/cr-style.[ch]: went forward in the style data structure population code. * src/rgb.[ch]: made the necessary modifs implied by the new CRNum type system * src/cr-parser.c: made the necessary modifs implied by the new CRNum type system * src/cr-num.[ch]: did some big changes for a better handling of numeric types. 2003-03-05 Dodji * src/cr-parser.c (cr_parser_new_from_buf): new method to parse stylesheets from in memory buffers. 2003-03-04 Dodji * src/cr-input.c (cr_input_new_from_buf): added this new method to instanciate an input stream from an in memory buffer. (cr_input_new_from_uri): modified this method to make it use the new cr_input_new_from_buf() method. 2003-03-03 Dodji * tests/README-description.txt: added this test description file in the project. * src/cr-sel-eng.c (cr_sel_eng_get_matched_rulesets_real): renamed the function cr_sel_eng_get_rulesets_real() into this new one. Modified it memory management model so that 1/ it does not allocate it output array 2/ caller can use it in a incremental way and get the rulesets chunck by chunk. (cr_sel_eng_sel_get_matched_rulesets): added this public interface based on the private interface cr_sel_eng_get_matched_rulesets_real(). 2003-03-02 Dodji * src/cr-sel-eng.c (cr_sel_eng_get_rulesets_real): started to code an implementation of a ruleset "requester". Still have to debug all this. 2002-09-25 dodji * src/cr-utils.h: updated this file to define stuffs needed by other modules. * src/cr-parser-input.c: started to write down code to handle the stacked parser input.