summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libcroco/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
commitc853ffb5b2f75f5a889ed2e3ef89b818a736e87a (patch)
tree7d13a0883bb7936b84d6ecdd7bc332b41ed04bee /src/3rdparty/libcroco/tests
parentInitial commit. (diff)
downloadinkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.tar.xz
inkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.zip
Adding upstream version 1.3+ds.upstream/1.3+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/3rdparty/libcroco/tests')
-rw-r--r--src/3rdparty/libcroco/tests/CMakeLists.txt69
-rw-r--r--src/3rdparty/libcroco/tests/Makefile.am36
-rw-r--r--src/3rdparty/libcroco/tests/README-description.txt125
-rw-r--r--src/3rdparty/libcroco/tests/cr-test-utils.c59
-rw-r--r--src/3rdparty/libcroco/tests/cr-test-utils.h50
-rw-r--r--src/3rdparty/libcroco/tests/global-vars.sh.in10
-rwxr-xr-xsrc/3rdparty/libcroco/tests/test-functional-notation.sh5
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/Makefile.am16
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/functional-notation.css2
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/lots-of-comments.css198
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/parsing-location.css26
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/prop-vendor-ident.css3
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/sel-child-class.css1
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/sel-child-class.xml10
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/several-media.css10
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test0.1.css258
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test1.css316
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test2.1.css47
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test2.2.css686
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test2.css9
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test3.1.css36
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test3.2.css693
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test3.css9
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test4.1.css682
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test4.2.css24
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/test5.1.css14
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/unknown-at-rule.css3
-rw-r--r--src/3rdparty/libcroco/tests/test-inputs/unknown-at-rule2.css3
-rwxr-xr-xsrc/3rdparty/libcroco/tests/test-lots-of-comments.sh5
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/Makefile.am16
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test-functional-notation.out7
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test-lots-of-comments.out26
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test-parsing-location.out219
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test-prop-ident.out3
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test-sel-child-class.out4
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test-several-media.out17
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test-unknown-at-rule.out1
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test-unknown-at-rule2.out2
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test0.1.css.out1
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test1.css.out316
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test2.1.css.out173
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test2.2.css.out3328
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test2.css.out63
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test3.1.css.out0
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test3.2.css.out0
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test3.css.out0
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test4.1.css.out766
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test4.2.css.out24
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test5.1.css.out105
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test6.out8
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test7.out43
-rw-r--r--src/3rdparty/libcroco/tests/test-output-refs/test8.out15
-rwxr-xr-xsrc/3rdparty/libcroco/tests/test-parsing-location.sh5
-rwxr-xr-xsrc/3rdparty/libcroco/tests/test-prop-ident.sh5
-rwxr-xr-xsrc/3rdparty/libcroco/tests/test-sel-child-class.sh5
-rwxr-xr-xsrc/3rdparty/libcroco/tests/test-several-media.sh5
-rwxr-xr-xsrc/3rdparty/libcroco/tests/test-unknown-at-rule.sh5
-rwxr-xr-xsrc/3rdparty/libcroco/tests/test-unknown-at-rule2.sh5
-rw-r--r--src/3rdparty/libcroco/tests/test0-main.c203
-rw-r--r--src/3rdparty/libcroco/tests/test1-main.c197
-rw-r--r--src/3rdparty/libcroco/tests/test2-main.c564
-rw-r--r--src/3rdparty/libcroco/tests/test3-main.c545
-rw-r--r--src/3rdparty/libcroco/tests/test4-main.c435
-rw-r--r--src/3rdparty/libcroco/tests/test5-main.c255
-rw-r--r--src/3rdparty/libcroco/tests/test6-main.c84
-rw-r--r--src/3rdparty/libcroco/tests/test7-main.c95
-rw-r--r--src/3rdparty/libcroco/tests/test8-main.c44
-rwxr-xr-xsrc/3rdparty/libcroco/tests/testctl462
-rwxr-xr-xsrc/3rdparty/libcroco/tests/valgrind-version.sh48
-rw-r--r--src/3rdparty/libcroco/tests/valgrind.log0
-rwxr-xr-xsrc/3rdparty/libcroco/tests/vg24
-rw-r--r--src/3rdparty/libcroco/tests/vg.supp57
72 files changed, 11585 insertions, 0 deletions
diff --git a/src/3rdparty/libcroco/tests/CMakeLists.txt b/src/3rdparty/libcroco/tests/CMakeLists.txt
new file mode 100644
index 0000000..1ffb908
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/CMakeLists.txt
@@ -0,0 +1,69 @@
+set(testprogs
+ test0
+ test1
+ test2
+ test3
+ test4
+ test5
+ test6
+ test7
+ test8
+)
+
+foreach(source ${testprogs})
+ add_executable(${source} ${source}-main.c cr-test-utils.c cr-test-utils.h)
+
+ target_include_directories(${source}
+ PRIVATE
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_BINARY_DIR}/src
+ ${GLIB_INCLUDE_DIRS}
+ ${LIBXML_INCLUDE_DIRS}
+ )
+
+ target_link_libraries(${source}
+ croco_LIB
+ )
+endforeach()
+
+if(1)
+ # Run each test separately
+
+ set(testscripts
+ test-functional-notation.sh
+ test-lots-of-comments.sh
+ test-parsing-location.sh
+ test-prop-ident.sh
+ test-sel-child-class.sh
+ test-several-media.sh
+ test-unknown-at-rule2.sh
+ test-unknown-at-rule.sh
+ )
+
+ add_test(NAME cleantest
+ COMMAND ${CMAKE_SOURCE_DIR}/tests/testctl cleanup
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ )
+
+ foreach(source ${testprogs} ${testscripts})
+ add_test(NAME ${source}
+ COMMAND ${CMAKE_SOURCE_DIR}/tests/testctl run --test-and-report ${source}
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ )
+ set_tests_properties(${source} PROPERTIES DEPENDS "cleantest")
+ endforeach()
+else()
+ # Run all tests at once
+ add_test(NAME all-tests
+ COMMAND ${CMAKE_SOURCE_DIR}/tests/testctl run
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ )
+endif()
+
+get_property(test_names DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY TESTS)
+set_property(TEST ${test_names} PROPERTY ENVIRONMENT
+ "TEST_OUT_DIR=${CMAKE_CURRENT_BINARY_DIR}"
+ "TEST_SOURCE_DIR=${CMAKE_SOURCE_DIR}/tests"
+ "TEST_INPUTS_DIR=${CMAKE_SOURCE_DIR}/tests/test-inputs"
+ "CSSLINT=${CMAKE_BINARY_DIR}/csslint/csslint"
+)
diff --git a/src/3rdparty/libcroco/tests/Makefile.am b/src/3rdparty/libcroco/tests/Makefile.am
new file mode 100644
index 0000000..666eff8
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/Makefile.am
@@ -0,0 +1,36 @@
+SUBDIRS = test-inputs test-output-refs
+EXTRA_DIST = testctl vg.supp global-vars.sh.in valgrind-version.sh \
+test-prop-ident.sh test-unknown-at-rule.sh test-unknown-at-rule2.sh \
+test-several-media.sh
+
+
+#the list of all possible tests goes here.
+
+EXTRALDFLAGS = $(CROCO_LIBS)
+testprogs=test0 test1 test2 test3 test4 test5 test6 test7 test8
+noinst_PROGRAMS = $(testprogs)
+test0_SOURCES = test0-main.c
+test0_LDFLAGS = $(EXTRALDFLAGS)
+test1_SOURCES = test1-main.c
+test1_LDFLAGS = $(EXTRALDFLAGS)
+test2_SOURCES = test2-main.c cr-test-utils.c cr-test-utils.h
+test2_LDFLAGS = $(EXTRALDFLAGS)
+test3_SOURCES = test3-main.c cr-test-utils.c cr-test-utils.h
+test3_LDFLAGS = $(EXTRALDFLAGS)
+test4_SOURCES = test4-main.c cr-test-utils.c cr-test-utils.h
+test4_LDFLAGS = $(EXTRALDFLAGS)
+test5_SOURCES = test5-main.c cr-test-utils.c cr-test-utils.h
+test5_LDFLAGS = $(EXTRALDFLAGS)
+test6_SOURCES = test6-main.c cr-test-utils.c cr-test-utils.h
+test6_LDFLAGS = $(EXTRALDFLAGS)
+test7_SOURCES = test7-main.c cr-test-utils.c cr-test-utils.h
+test7_LDFLAGS = $(EXTRALDFLAGS)
+test8_SOURCES = test8-main.c
+test8_LDFLAGS = $(EXTRALDFLAGS)
+
+croco_lib = $(top_builddir)/src/@CROCO_LIB@
+LDADD = $(croco_lib)
+
+AM_CPPFLAGS = -I$(top_srcdir)/intl -I$(top_srcdir)/src -I$(top_builddir)/src
+
+AM_CFLAGS = -I. $(CROCO_CFLAGS)
diff --git a/src/3rdparty/libcroco/tests/README-description.txt b/src/3rdparty/libcroco/tests/README-description.txt
new file mode 100644
index 0000000..a81336f
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/README-description.txt
@@ -0,0 +1,125 @@
+This file describes the tests present in the libcroro tests directory.
+=====================================================================
+
+Initial author: Dodji Seketeli <dodji@seketeli.org>
+
+Each entry of this file is orgnised as follows:
+
+"""""""""""""""""""""""""""""""""""""""""""""""""
+binary: name-of-the-test-binary-file
+
+source-file: name-of-the-test-source-file
+
+purpose: purpose of the test.
+
+description: description of the test
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+And, in the words of RMS, happy hacking !
+
+ Dodji
+##################################################################
+
+
+"""""""""""""""""""""""""""""""""""""""""""""""""
+binary: test0
+
+source-file: test0-main.c
+
+purpose: Tests the cr_input_read_byte() method of the CRInput class.
+
+description: opens the file located at the path in parameter and
+loads it into an input stream using the cr_input_new_from_uri()
+method of the CRInput class.
+Then, reads the bytes from the input stream using the cr_input_read_byte()
+method and dumps each byte read to stdout.
+Note that the input file must be encoded in utf8.
+
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+
+"""""""""""""""""""""""""""""""""""""""""""""""""
+binary: test1
+
+source-file: test1-main.c
+
+purpose: Test the read_char() method of the CRInput class.
+
+description: opens the file located at the path in parameter and
+loads it into an input stream using the cr_input_new_from_uri()
+method of the CRInput class.
+Then, reads characters from the input stream using the cr_input_read_char()
+method and dumps each character on stdout.
+Note that the input file must be encoded in utf8.
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+"""""""""""""""""""""""""""""""""""""""""""""""""
+binary: test2
+
+source-file: test2-main.c
+
+purpose: tests the sac api of the parser.
+
+description: it loads the file located at the path given
+in argument, instantiates a sac parser, set document
+handlers and parses the file.
+The doc handlers simply dump the name name of the callback
+which is being called and some basic additional information.
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+"""""""""""""""""""""""""""""""""""""""""""""""""
+binary: test3
+
+source-file: test3-main.c
+
+purpose: Test the SAC api core css grammar parsing
+
+description: it loads the file located at the path given
+in argument, instantiates a sac parser, set document
+handlers and parses the file using the css2 core syntax.
+The doc handlers simply dump the name name of the callback
+which is being called and some basic additional information.
+Here, the goal is that nothing is dump on screen because
+during the parsing using the core grammar syntax, no callback
+should be called.
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+"""""""""""""""""""""""""""""""""""""""""""""""""
+binary: test4
+
+source-file: test4-main.c
+
+purpose: tests the cssom parser interface (cr-om-parser.c)
+
+description: parses the file located at the path given in
+parameter and dumps the result of the parsing (the object model)
+on stdout.
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+"""""""""""""""""""""""""""""""""""""""""""""""""
+binary: test5
+
+source-file: test5-main.c
+
+purpose: tests the selector cr-sel-eng.c basic functionalities.
+
+description: parses an in memory xml document hardwired in the
+test5-main.c file; parses the stylesheet given in parameter to
+the test5 binary.
+Walks down the xml document tree and runs the selector engine
+on each xml document node to get the css rule that matches it.
+Displays a report that basically say: "this xml node was matched
+by this set of css rules"
+"""""""""""""""""""""""""""""""""""""""""""""""""
+
+"""""""""""""""""""""""""""""""""""""""""""""""""
+binary: test6
+
+source-file: test6-main.c
+
+purpose: tests the "in memory" css2 parsing capabilities. (cr_om_parser_parse_buf)
+
+
+description: parses an "in memory" hardwired css2 stylesheet
+and dumps it on stdout.
+""""""""""""""""""""""""""""""""""""""""""""""""" \ No newline at end of file
diff --git a/src/3rdparty/libcroco/tests/cr-test-utils.c b/src/3rdparty/libcroco/tests/cr-test-utils.c
new file mode 100644
index 0000000..9435ef7
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/cr-test-utils.c
@@ -0,0 +1,59 @@
+/*
+ * This file is part of The Croco Library
+ *
+ * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#include <string.h>
+#include "cr-test-utils.h"
+
+/**
+ *Parses the command line.
+ *@param a_argc the argc parameter of the main routine.
+ *@param the argv parameter of the main routine.
+ *@param a_options out parameter the parsed options.
+ */
+void
+cr_test_utils_parse_cmd_line (int a_argc, char **a_argv,
+ struct Options *a_options)
+{
+ int i = 0;
+
+ g_return_if_fail (a_options);
+
+ memset (a_options, 0, sizeof (struct Options));
+
+ for (i = 1; i < a_argc; i++) {
+ if (a_argv[i][0] != '-')
+ break;
+
+ if (!strcmp (a_argv[i], "-h")
+ || !strcmp (a_argv[i], "--help")) {
+ a_options->display_help = TRUE;
+ }
+ if (!strcmp (a_argv[i], "--about")) {
+ a_options->display_about = TRUE;
+ }
+ }
+
+ if (i >= a_argc) {
+ /*No file parameter where given */
+ a_options->files_list = NULL;
+ } else {
+ a_options->files_list = &a_argv[i];
+ }
+}
diff --git a/src/3rdparty/libcroco/tests/cr-test-utils.h b/src/3rdparty/libcroco/tests/cr-test-utils.h
new file mode 100644
index 0000000..9219b93
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/cr-test-utils.h
@@ -0,0 +1,50 @@
+/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+/*
+ *$Id$
+ */
+#ifndef __CR_TEST_UTILS_H__
+#define __CR_TEST_UTILS_H__
+
+#include <stdio.h>
+#include <glib.h>
+
+/**
+ *The options data structure.
+ *The variable of this data structure are set
+ *during the parsing the command line by the
+ *parse_command_line() function.
+ */
+struct Options
+{
+ gboolean display_help ;
+ gboolean display_about ;
+ gchar ** files_list ;
+};
+
+
+void
+cr_test_utils_parse_cmd_line (int a_argc, char **a_argv,
+ struct Options *a_options) ;
+
+#endif /*__CR_TEST_UTILS_H__*/
diff --git a/src/3rdparty/libcroco/tests/global-vars.sh.in b/src/3rdparty/libcroco/tests/global-vars.sh.in
new file mode 100644
index 0000000..e291459
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/global-vars.sh.in
@@ -0,0 +1,10 @@
+TEST_INPUTS_DIR=$HERE_DIR/test-inputs
+CSSLINT=$HERE_DIR/../csslint/.libs/csslint-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@
+if ! test -x $CSSLINT ; then
+ echo "Aarg Could not find an executable csslint. I was looking for $CSSLINT"
+ echo $
+fi
+
+if ! test x"$VALGRIND" = x ; then
+ CSSLINT="$VALGRIND $CSSLINT"
+fi
diff --git a/src/3rdparty/libcroco/tests/test-functional-notation.sh b/src/3rdparty/libcroco/tests/test-functional-notation.sh
new file mode 100755
index 0000000..2860092
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-functional-notation.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+test -z "$CSSLINT" && . ./global-test-vars.sh
+
+$CSSLINT $TEST_INPUTS_DIR/functional-notation.css
diff --git a/src/3rdparty/libcroco/tests/test-inputs/Makefile.am b/src/3rdparty/libcroco/tests/test-inputs/Makefile.am
new file mode 100644
index 0000000..3c93d8f
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/Makefile.am
@@ -0,0 +1,16 @@
+EXTRA_DIST= prop-vendor-ident.css \
+test0.1.css \
+test1.css \
+test2.1.css \
+test2.2.css \
+test2.css \
+test3.1.css \
+test3.2.css \
+test3.css \
+test4.1.css \
+test4.2.css \
+test5.1.css \
+unknown-at-rule2.css \
+unknown-at-rule.css \
+several-media.css
+
diff --git a/src/3rdparty/libcroco/tests/test-inputs/functional-notation.css b/src/3rdparty/libcroco/tests/test-inputs/functional-notation.css
new file mode 100644
index 0000000..cd80f18
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/functional-notation.css
@@ -0,0 +1,2 @@
+foo { bar: attr(width, length, calc(70% - 5px)) }
+foo {bar: attr(x,y) }
diff --git a/src/3rdparty/libcroco/tests/test-inputs/lots-of-comments.css b/src/3rdparty/libcroco/tests/test-inputs/lots-of-comments.css
new file mode 100644
index 0000000..87a6e4a
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/lots-of-comments.css
@@ -0,0 +1,198 @@
+
+
+@charset "utf8";
+
+/********************************************
+ * Parsing location information of the @charset rule
+ ********************************************/
+ /*@charset*/
+ /*line:1 column:1 byte offset:0 */
+ /*utf8*/
+ /*line:1 column:10 byte offset:9 */
+
+@import url("http://pouet.com") screen, paper, aural;
+
+/*****************************************************
+ *Parsing location information for the @import rule
+ ******************************************************/
+
+ /*@import*/
+ /*line:3 column:1 byte offset:19 */
+
+ /*http://pouet.com*/
+ /*line:3 column:13 byte offset:31 */
+
+ /*screen*/
+ /*line:3 column:33 byte offset:51 */
+
+ /*paper*/
+ /*line:3 column:41 byte offset:59 */
+
+ /*aural*/
+ /*line:3 column:48 byte offset:66 */
+
+@page coin :pseudo-page
+
+ /*@page*/
+ /*line:5 column:1 byte offset:75 */
+ /*coin*/
+ /*line:5 column:7 byte offset:81 */
+ /*pseudo-page*/
+ /*line:5 column:13 byte offset:87 */
+
+{
+
+
+page-prop0 : page-val0;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*page-prop0*/
+ /*line:6 column:7 byte offset:107 */
+ /*page-val0*/
+ /*line:6 column:19 byte offset:119 */
+
+
+page-prop1 : page-val1;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*page-prop1*/
+ /*line:7 column:7 byte offset:137 */
+ /*page-val1*/
+ /*line:7 column:19 byte offset:149 */
+}
+@media paper, aural
+ /*@media*/
+ /*line:10 column:1 byte offset:164 */
+ /*paper*/
+ /*line:10 column:8 byte offset:171 */
+ /*aural*/
+ /*line:10 column:15 byte offset:178 */
+
+{
+x {
+/************************************************
+ *Parsing location information of the selector
+ ************************************************/
+/*x*/
+/*line:11 column:5 byte offset:190 */
+ /*x*/
+ /*line:11 column:5 byte offset:190 */
+
+
+foo : fooval;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*foo*/
+ /*line:12 column:7 byte offset:200 */
+ /*fooval*/
+ /*line:12 column:12 byte offset:205 */
+
+
+bar : barval;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*bar*/
+ /*line:13 column:7 byte offset:220 */
+ /*barval*/
+ /*line:13 column:12 byte offset:225 */
+ }
+
+}
+@font-face {
+/******************************************************
+ Parsing location information for the @font-face rule
+ ******************************************************/
+
+ /*@font-face*/
+ /*line:17 column:1 byte offset:243 */
+
+
+font-prop1 : font1;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*font-prop1*/
+ /*line:18 column:2 byte offset:257 */
+ /*font1*/
+ /*line:18 column:14 byte offset:269 */
+
+
+font-prop2 : font2;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*font-prop2*/
+ /*line:19 column:2 byte offset:278 */
+ /*font2*/
+ /*line:19 column:14 byte offset:290 */
+}
+x>y[attr="val"].class#tatati z+toto {
+/************************************************
+ *Parsing location information of the selector
+ ************************************************/
+/*x*/
+/*line:21 column:1 byte offset:300 */
+ /*x*/
+ /*line:21 column:1 byte offset:300 */
+/*y[attr="val"].class#tatati*/
+/*line:21 column:5 byte offset:304 */
+ /*y*/
+ /*line:21 column:5 byte offset:304 */
+
+ /*[attr="val"]*/
+ /*line:21 column:6 byte offset:305 */
+
+ /*.class*/
+ /*line:21 column:17 byte offset:316 */
+
+ /*#tatati*/
+ /*line:21 column:22 byte offset:321 */
+/*z*/
+/*line:21 column:30 byte offset:329 */
+ /*z*/
+ /*line:21 column:30 byte offset:329 */
+/*toto*/
+/*line:21 column:34 byte offset:333 */
+ /*toto*/
+ /*line:21 column:34 byte offset:333 */
+
+
+prop1 : function(a);
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*prop1*/
+ /*line:22 column:2 byte offset:340 */
+ /*function(a)*/
+ /*line:22 column:9 byte offset:347 */
+
+
+prop2 : val2;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*prop2*/
+ /*line:23 column:2 byte offset:362 */
+ /*val2*/
+ /*line:23 column:9 byte offset:369 */
+ }
diff --git a/src/3rdparty/libcroco/tests/test-inputs/parsing-location.css b/src/3rdparty/libcroco/tests/test-inputs/parsing-location.css
new file mode 100644
index 0000000..f760b07
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/parsing-location.css
@@ -0,0 +1,26 @@
+@charset "utf8" ;
+
+@import url("http://pouet.com") screen, paper, aural ;
+@import url(http://pouet.com) screen2, paper2, aural2 ;
+
+@page coin :pseudo-page {
+ page-prop0: page-val0 ;
+ page-prop1: page-val1 ;
+}
+
+@media paper, aural {
+ x {
+ foo: fooval ;
+ bar: barval ;
+ }
+}
+
+@font-face {
+ font-prop1: font1 ;
+ font-prop2: font2 ;
+}
+x > y[attr=val].class#tatati z + toto{
+ prop1: function(a) ;
+ prop2: val2
+}
+
diff --git a/src/3rdparty/libcroco/tests/test-inputs/prop-vendor-ident.css b/src/3rdparty/libcroco/tests/test-inputs/prop-vendor-ident.css
new file mode 100644
index 0000000..f7aa8b5
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/prop-vendor-ident.css
@@ -0,0 +1,3 @@
+:-foo-pseudo {
+ -foo-bar-prop: -foobar-value
+}
diff --git a/src/3rdparty/libcroco/tests/test-inputs/sel-child-class.css b/src/3rdparty/libcroco/tests/test-inputs/sel-child-class.css
new file mode 100644
index 0000000..a6ea36b
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/sel-child-class.css
@@ -0,0 +1 @@
+body > div p.process { color: aqua; }
diff --git a/src/3rdparty/libcroco/tests/test-inputs/sel-child-class.xml b/src/3rdparty/libcroco/tests/test-inputs/sel-child-class.xml
new file mode 100644
index 0000000..ee5e23d
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/sel-child-class.xml
@@ -0,0 +1,10 @@
+<test>
+ <body>
+ <div>
+ <div>
+ <p class="process">This should be aqua</p>
+ </div>
+ </div>
+ </body>
+</test>
+
diff --git a/src/3rdparty/libcroco/tests/test-inputs/several-media.css b/src/3rdparty/libcroco/tests/test-inputs/several-media.css
new file mode 100644
index 0000000..79dc336
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/several-media.css
@@ -0,0 +1,10 @@
+@media screen {
+a:link { text-decoration: none; }
+div { width: 50%; }
+}
+
+@media print {
+a { color: red; }
+div { width: 57%; }
+}
+
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test0.1.css b/src/3rdparty/libcroco/tests/test-inputs/test0.1.css
new file mode 100644
index 0000000..f8e842e
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test0.1.css
@@ -0,0 +1,258 @@
+body {
+ margin : 0px 0px 20px 0px;
+ height : 100%;
+ background : #FFF
+}
+
+A {
+ color : #003366;
+ text-decoration : underline
+}
+
+A:link {
+ color : #003366;
+ text-decoration : underline
+}
+
+A:visited {
+ color : #003366;
+ text-decoration : underline
+}
+
+A:active {
+ color : #999999
+}
+
+A:hover {
+ color : #999999
+}
+
+h1, h2, h3 {
+ margin : 0px;
+ padding : 0px
+}
+
+#banner {
+ font-family : palatino, georgia, verdana, arial, sans-serif;
+ color : #333;
+ top:0;
+ font-size : normal;
+ font-weight : normal;
+}
+
+#banner a, #banner a:link, #banner a:visited, #banner a:active, #banner a:hover {
+ font-family : verdana, arial, sans-serif;
+ font-size : xx-large;
+ color : #333;
+ text-decoration : none
+}
+
+.description {
+ font-family : verdana, arial, sans-serif;
+ color : #333;
+ font-size : small;
+ text-transform : none
+}
+
+#content {
+ position : absolute;
+ background : #FFF;
+ top: 20%;
+ left: 20%;
+ border : 1px solid #FFF
+}
+
+#container {
+ background : #FFF;
+ border : 1px solid #FFF
+}
+
+#links {
+ padding : 15px;
+ border : 1px solid #FFF;
+ width : 200px
+}
+
+.blog {
+ padding : 20px;
+ background : #FFF
+}
+
+.blogbody {
+ font-family : verdana, arial, sans-serif;
+ color : #333;
+ font-size : small;
+ font-weight : normal;
+ background : #FFF;
+ line-height : 150%
+}
+
+.blogbody a, .blogbody a:link, .blogbody a:visited, .blogbody a:active, .blogbody a:hover {
+ font-weight : normal;
+ text-decoration : underline
+}
+
+.title {
+ font-family : verdana, arial, sans-serif;
+ font-size : medium;
+ color : #666
+}
+
+.date {
+ font-family : verdana, arial, serif;
+ font-size : large;
+ color : #333;
+ border-bottom : 1px solid #999;
+ margin-bottom : 10px;
+ font-weight : bold
+}
+
+.posted {
+ font-family : verdana, arial, sans-serif;
+ font-size : x-small;
+ color : #000000;
+ margin-bottom : 25px
+}
+
+.calendar {
+ font-family : verdana, arial, sans-serif;
+ color : #333;
+ font-size : x-small;
+ font-weight : normal;
+ background : #FFF;
+ line-height : 140%;
+ padding : 2px;
+ text-align : left
+}
+
+.calendarhead {
+ font-family : palatino, georgia, times new roman, serif;
+ color : #666600;
+ font-size : small;
+ font-weight : normal;
+ padding : 2px;
+ letter-spacing : 0.3em;
+ background : #FFF;
+ text-transform : uppercase;
+ text-align : left
+}
+
+.side {
+ font-family : verdana, arial, sans-serif;
+ color : #333;
+ font-size : x-small;
+ font-weight : normal;
+ background : #FFF;
+ line-height : 140%;
+ padding : 2px
+}
+
+#menubar {
+ font-family : verdana, arial, sans-serif;
+ color : #333;
+ font-size : small;
+ font-weight : normal;
+ position:absolute;
+ top:20%;
+ padding: 2px;
+ letter-spacing : 0.1em;
+ background : #FFF;
+ text-transform : uppercase
+}
+
+.syndicate {
+ font-family : verdana, arial, sans-serif;
+ font-size : xx-small;
+ line-height : 140%;
+ padding : 2px;
+ margin-top : 15px;
+ background : #FFF
+}
+
+.powered {
+ font-family : verdana, arial, sans-serif;
+ color : #666;
+ font-size : x-small;
+ line-height : 140%;
+ text-transform : uppercase;
+ padding : 2px;
+ margin-top : 50px;
+ letter-spacing : 0.2em;
+ background : #FFF
+}
+
+.comments-body {
+ font-family : verdana, arial, sans-serif;
+ color : #666;
+ font-size : small;
+ font-weight : normal;
+ background : #FFF;
+ line-height : 140%;
+ padding-bottom : 10px;
+ padding-top : 10px;
+ border-bottom : 1px dotted #999
+}
+
+.comments-post {
+ font-family : verdana, arial, sans-serif;
+ color : #666;
+ font-size : x-small;
+ font-weight : normal;
+ background : #FFF
+}
+
+.trackback-url {
+ font-family : verdana, arial, sans-serif;
+ color : #666;
+ font-size : small;
+ font-weight : normal;
+ background : #FFF;
+ line-height : 140%;
+ padding : 5px;
+ border : 1px dotted #999
+}
+
+.trackback-body {
+ font-family : verdana, arial, sans-serif;
+ color : #666;
+ font-size : small;
+ font-weight : normal;
+ background : #FFF;
+ line-height : 140%;
+ padding-bottom : 10px;
+ padding-top : 10px;
+ border-bottom : 1px dotted #999
+}
+
+.trackback-post {
+ font-family : verdana, arial, sans-serif;
+ color : #666;
+ font-size : x-small;
+ font-weight : normal;
+ background : #FFF
+}
+
+.comments-head {
+ font-family : verdana, arial, sans-serif;
+ font-size : small;
+ color : #666;
+ border-bottom : 1px solid #999;
+ margin-top : 20px;
+ font-weight : bold;
+ background : #FFF
+}
+
+#banner-commentspop {
+ font-family : verdana, arial, sans-serif;
+ color : #FFF;
+ font-size : large;
+ font-weight : bold;
+ border-left : 1px solid #FFF;
+ border-right : 1px solid #FFF;
+ border-top : 1px solid #FFF;
+ background : #003366;
+ padding-left : 15px;
+ padding-right : 15px;
+ padding-top : 5px;
+ padding-bottom : 5px
+}
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test1.css b/src/3rdparty/libcroco/tests/test-inputs/test1.css
new file mode 100644
index 0000000..b03c8a4
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test1.css
@@ -0,0 +1,316 @@
+body {
+
+ background-color: #E5E5E5;
+
+ scrollbar-face-color: #CCCCCC;
+
+ scrollbar-highlight-color: #FFFFFF;
+
+ scrollbar-shadow-color: #CCCCCC;
+
+ scrollbar-3dlight-color: #D1D7DC;
+
+ scrollbar-arrow-color: #000000;
+
+ scrollbar-track-color: #FFFFFF;
+
+ scrollbar-darkshadow-color: #000000;
+
+}
+
+
+
+font, th, td, p {
+
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+
+ font-size: 11px;
+
+}
+
+
+
+h1, h2 { font-size: 11px; color: #000000; font-weight: bold; }
+
+
+
+a:link, a:active, a:visited { color: #000000; }
+
+
+
+a:hover { color: #CC0000; text-decoration: underline; }
+
+
+
+hr { height: 0px; border: solid #CCCCCC 0px; border-top-width: 1px; }
+
+
+
+small { font-size: 10px; }
+
+
+
+input, textarea, select {
+
+ font: normal 11px Verdana, Arial, Helvetica, sans-serif;
+
+ color: #000000;
+
+ border-color: #000000;
+
+}
+
+
+
+input { text-indent: 2px; }
+
+
+
+
+input.post, textarea.post, select {
+
+ background-color: #FFFFFF;
+
+}
+
+
+
+
+th {
+
+ font-size: 11px; color: #CCCCCC; font-weight: bold;
+
+ background-color: #000000; height: 25px;
+
+ background-image: url(/~wiceyto/test/templates/blacknwhite/images/cellpic3.gif);
+
+}
+
+
+
+
+.fontspec, .tablefont {
+
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+
+ font-size: 11px;
+
+}
+
+
+
+.navbartext, .navbarfont {
+
+ font-size: 11px; color: #000000; font-weight: bold;
+
+}
+
+
+
+.navbartext a, .navbarfont a {
+
+ color: #000000; font-weight: bold; text-decoration: none;
+
+}
+
+
+
+.navbartext a:hover, .navbarfont a:hover {
+
+ color: #CC0000; text-decoration: none;
+
+}
+
+
+
+.tablespec, .guestbook { background-color: #FFFFFF; border: 2px #000000 solid; }
+
+.tablespec th, .tablespec td { color: #000000; background-color: #CCCCCC; }
+
+.tablespec th { background-image: none; }
+
+
+
+.messageblock {
+
+ border: dashed 1px;
+
+ margin-right: 4em; margin-left: 4em;
+
+ padding: 3em;
+
+}
+
+
+
+/* $MessageOpenCode - the body of text of the posts */
+
+.messagebody { font-size: 12px; line-height: 18px; }
+
+.messagebody a { color: #000000; text-decoration: underline; }
+
+.messagebody a:hover { color: #CC0000; text-decoration: underline; }
+
+
+
+
+.newcode { font-size: 11px; color: #CC0000; font-weight: bold; }
+
+.admincode { font-size: 11px; color: #990000; font-style: bold; }
+
+
+
+
+.bodyline { background-color: #FFFFFF; border: 1px #000000 solid; }
+
+
+
+
+.quote, .code {
+
+ background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
+
+ border-top-width: 1px; border-right-width: 1px;
+
+ border-bottom-width: 1px; border-left-width: 1px;
+
+}
+
+
+
+.quote {
+
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+
+ font-size: 11px;
+
+ color: #444444; line-height: 125%;
+
+}
+
+
+
+.code {
+
+ font-family: Courier, 'Courier New', sans-serif;
+
+ font-size: 11px;
+
+ color: #CC0000;
+
+}
+
+
+
+
+input.button {
+
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+
+ font-size: 11px;
+
+ color: #000000;
+
+ background-color: #FFFFFF;
+
+}
+
+
+
+/* Format button rollover help line. Actually it's a text box
+
+ set to the same color as the background so no one will know. */
+
+.helpline { background-color: #CCCCCC; border-style: none; }
+
+
+
+/* additional table cell colors and backgrounds */
+
+td.row2 { background-color: #CCCCCC; }
+
+td.row1 { background-color: #CCCCCC; }
+
+td.row3 { background-color: #D1D7DC; }
+
+
+
+/* additional general text */
+
+.gen { font-size: 12px; }
+
+.genmed { font-size: 11px; }
+
+.gensmall { font-size: 10px; }
+
+.gen, .genmed, .gensmall { color: #000000; }
+
+a.gen, a.genmed, a.gensmall { color: #000000; text-decoration: none; }
+
+a.gen:hover, a.genmed:hover, a.gensmall:hover { color: #CC0000; text-decoration: underline; }
+
+
+
+/* import fancy styles. For IE only. NS4.x doesn't use the @import function */
+
+@import url("/your.site/webbbs/themes/formIE.css");
+
+
+
+/* END of blacknwhite.css */
+
+
+
+
+
+
+
+/* Appendix.2-2: Example fancy styles CSS file
+
+Paste these into a text file and save as formIE.css */
+
+
+
+/* Fancy form styles for IE */
+
+
+
+input, textarea, select {
+
+border-top-width : 1px;
+
+border-right-width : 1px;
+
+border-bottom-width : 1px;
+
+border-left-width : 1px;
+
+}
+
+
+
+input { text-indent : 2px; }
+
+
+
+input.button {
+
+border-top-width : 1px;
+
+border-right-width : 1px;
+
+border-bottom-width : 1px;
+
+border-left-width : 1px;
+
+}
+
+
+
+.postbody { line-height: 18px}
+
+.magic {
+ margin-left: -20px;
+}
+
+/* END of formIE.css */
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test2.1.css b/src/3rdparty/libcroco/tests/test-inputs/test2.1.css
new file mode 100644
index 0000000..ba447fb
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test2.1.css
@@ -0,0 +1,47 @@
+
+/*simple Attribute set selectors*/
+s1[foo] {prop1 : "\53 tring"}
+
+/* line break is invalid */
+s2[foo] {prop1 : "
+tring"}
+
+/*simple exact attribute selector, simple ruleset*/
+s3[foo="warning"] {prop1 : value1}
+
+/**
+ *"space separated value list"
+ *attribute selector, simple ruleset
+ */
+s4[foo~="warning"] {prop1 :value1}
+
+/**
+ *"hyphen separated value list" attribute selector,
+ * simple ruleset
+ */
+
+ /*simple class selector, simple ruleset*/
+ s5.warning {prop1 : value}
+
+ E#myid {prop1 : value1}
+
+
+/*below are tests that we know are working*/
+
+/*simple ident pseudo class selector, simple ruleset test*/
+S6:first-child {prop1 : value1 ; prop2 : value2}
+
+/*function pseudo class selector, simple ruleset test*/
+S7:lang(c) {prop1 : value1}
+
+/*Adjacent selectors, simple ruleset test*/
+S8 + s2 {prop1: value1}
+
+/* quoted strings */
+.quotedstrings {
+ -test-string1: "foo'bar";
+ -test-string2: 'foo\'bar';
+ -test-string3: 'foo"bar';
+ -test-string4: "foo\"bar";
+ -test-string5: 'foo\\bar';
+}
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test2.2.css b/src/3rdparty/libcroco/tests/test-inputs/test2.2.css
new file mode 100644
index 0000000..0a58bbe
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test2.2.css
@@ -0,0 +1,686 @@
+p.commentsbody {
+ border-left-style: solid;
+ border-width: 1px;
+ border-color: rgb(0, 0, 0);
+ padding-left: 10px;
+ margin-right: 20px;
+ text-align: justify;
+}
+
+* {
+ font-family: Verdana, Arial, Helvetica, sans-serif, monospace;
+}
+
+body {
+ background: #606060;
+ color: #000000;
+}
+
+a:link {
+ color: #0000FF;
+ background: transparent;
+ text-decoration: none;
+}
+
+a:visited {
+ color: #990099;
+ background: transparent;
+ text-decoration: none;
+}
+
+
+a:active {
+ color: #000000;
+ background: #ADD8E6;
+ text-decoration: none;
+}
+
+
+h1.rubrique_info {
+ color: #990033;
+ margin: 0px 0px 0px 0px;
+ padding: 0em;
+ border: 0px;
+ font-size: 12px;
+}
+
+
+h1.connexe {
+ font-size: 12px;
+ padding: 0em;
+ margin: 0px 0px 0px 0px;
+ color: #990033;
+}
+
+a.rubrique_infolink {
+ text-decoration: none;
+}
+
+ul.rubrique_infoul {
+ display: inline;
+ list-style-type: square;
+}
+ul.rubrique_infoul * {
+ width: 100%;
+}
+li.rubrique_infoul {
+ margin-left: 15px;
+}
+h1 {
+ color: #990033;
+}
+
+div.main {
+ background: white;
+ color: #000000;
+ margin-left: 5px;
+ margin-right: 5px;
+ border: 1px black solid;
+ text-align: left;
+ font-size: 12px;
+}
+div.lsfnbanner {
+ margin-left: 150px;
+ margin-right: 170px;
+ border-top: none;
+ padding-left: 10px;
+ padding-right: 10px;
+ border-bottom: 1px black solid;
+ border-right: 1px black solid;
+ border-left: 1px black solid;
+ text-align: left;
+ font-size: 11px;
+ padding-top: 2px;
+ background-color: #eeeae6;
+}
+div.footer {
+ padding-top: 5px;
+ padding-bottom: 3px;
+ border-top: 1px black solid;
+ border-left: 1px black solid;
+ border-right: 1px black solid;
+ text-align: left;
+ font-size: 9px;
+ background: #dcdff4;
+ width: 600px;
+ margin-top: 40px;
+ margin-left: 20px;
+}
+div.footer p {
+ margin-left: 10px;
+ margin-top: 2px;
+ margin-bottom: 2px;
+}
+
+a.lsfnlink:link,a.lsfnlink:visited,a.lsfnlink:active {
+ text-decoration: none;
+ color: #333333;
+ font-size: 10px;
+}
+a.lsfnlink:hover {
+ text-decoration: underline;
+ color: black;
+}
+div.menubartop {
+ margin-bottom: 10px;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 0px;
+ font-size: 13px;
+}
+div.smallmenubar {
+ background: white;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ font-weight:bold;
+ font-size: 10px;
+ text-align: right;
+}
+div.menuevent {
+ float: left;
+ width: 350px;
+ font-size: 11px;
+ text-align: left;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ padding-left: 10px;
+ font-weight: bold;
+ margin: 0px;
+}
+div.menubar {
+ background: #cac2a8;
+ border-top: 1px black solid;
+ border-bottom: 1px black solid;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 3px;
+ padding-bottom: 2px;
+ font-weight:bold;
+ font-size: 13px;
+}
+div.menubar a {
+ text-decoration: none;
+}
+div.menudate {
+ float: left;
+ width: 130px;
+ padding-top: 5px;
+}
+div.menuaccroche {
+ margin-left: 30px;
+ float: left;
+ text-decoration: underline;
+ font-size: 14px;
+}
+div.menusearch {
+ float: right;
+ text-align: right;
+ padding-top: 5px;
+ width: 170px;
+}
+div.menusearch p {
+ margin: 0px 0px 0px 0px;
+}
+.searchinput {
+ border: solid 1px black;
+}
+a#menulinkselect {
+ color: #ed7e00;
+}
+
+div.leftbox {
+ width: 200px;
+ float: left;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-bottom: 5px;
+ border-right: 1px black solid;
+ border-bottom: 1px black solid;
+ background: white;
+ margin-bottom: 10px;
+}
+div.leftbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.leftbox h2 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.leftbox ul {
+ list-style-type: square;
+ margin-bottom: 10px;
+ margin-left: 0em;
+ padding-left: 0em;
+}
+div.leftbox li {
+ margin-left: 10px;
+}
+
+div.rightbox {
+ width: 150px;
+ float: right;
+ padding-top: 10px;
+ padding-left: 5px;
+ padding-right: 15px;
+ padding-bottom: 5px;
+ border-left: 1px black solid;
+ border-bottom: 1px black solid;
+ text-align: left;
+}
+div.newjournaldiv {
+ text-align: justify;
+ margin-left: 10%;
+ font-size: 12px;
+ width: 600px;
+}
+div.newjournaldiv p {
+ margin-bottom: 0px;
+ margin-top: 20px;
+}
+div.journaldiv {
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 20px;
+ margin-bottom: 20px;
+ border: 1px black solid;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ padding-right: 10px;
+ padding-left: 10px;
+ background-color: #eef;
+}
+div.journaldiv p {
+ margin-top: 10px;
+ margin-bottom: 0px;
+}
+div.journaldiv h1 {
+ color: #990033;
+ font-size: 14px;
+ margin: 0px;
+}
+div.journaldiv h2 {
+ font-size: 10px;
+ margin: 0px;
+}
+div.tipdiv {
+ margin-left: 220px;
+ margin-right: 50px;
+ margin-top: 20px;
+ padding-top: 5px;
+ padding-right: 10px;
+ padding-left: 10px;
+ text-align: justify;
+ background-color: #eee;
+ border: black solid 1px;
+}
+div.tipdiv h1 {
+ font-weight: bold;
+ font-size: 14px;
+ color: black;
+ margin-top: 0px;
+ margin-bottom: 20px;
+}
+div.tipdiv h2 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 12px;
+ margin: 0px;
+}
+
+div.newsdiv {
+ margin-left: 220px;
+ margin-right: 180px;
+ margin-top: 10px;
+ margin-bottom: 20px;
+ text-align: justify;
+}
+div.newsdiv h1 {
+ font-weight: bold;
+ font-size: 14px;
+ margin: 0px;
+}
+div.newsdiv h2 {
+ font-weight: normal;
+ font-size: 12px;
+ margin: 0px;
+}
+div.newsdiv h3 {
+ font-weight: normal;
+ font-size: 12px;
+ margin-bottom: 20px;
+}
+div.objdiv {
+ margin-left: 220px;
+ margin-right: 20px;
+ margin-top: 10px;
+ margin-bottom: 20px;
+}
+
+h1.newstitle {
+ text-align: left;
+ font-size: 14px;
+ margin: 0px 0px 0px 0px;
+ color: black;
+}
+div.titlediv {
+ border-top: solid #cac2a8 2px;
+ margin-top: 20px;
+ background-color: #eeeae6;
+ padding-left: 10px;
+ font-size: 11px;
+}
+div.bodydiv {
+ border: solid #9e9784 1px;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 10px;
+ padding-bottom: 5px;
+ margin-top: 2px;
+ text-align: justify;
+}
+
+div.comments {
+ padding: 10px;
+ border-top: solid 2px #d37537;
+ border-bottom: solid 2px #d37537;
+ margin-top: 20px;
+ margin-bottom: 10px;
+ background-color: #cacaca;
+ font-size: 12px;
+ line-height: 1.3em;
+}
+
+p.commentsbody {
+ border-left-style: solid;
+ border-width: 1px;
+ border-color: rgb(0, 0, 0);
+ padding-left: 10px;
+ text-align: justify;
+ margin-right: 20px;
+}
+
+div.commentsreply {
+ margin-left: 220px;
+ text-align: center;
+ margin-top: 50px;
+}
+
+ul.commentsul {
+ list-style-type: none;
+ margin-bottom: 10px;
+ margin-left: 1.25em;
+ padding-left: 0em;
+ border-left: 1px solid black;
+}
+ul.commentsli {
+ margin: 10px;
+}
+div.comments li {
+ margin-top: 20px;
+ margin-left: 2px;
+}
+
+div.comments h1 {
+ font-size: 12px;
+ color: black;
+ margin: 0px 20px 3px 0px;
+ background-color: rgb(226, 226, 226);
+ padding-left: 1px;
+ font-weight: none;
+}
+
+div.articlediv {
+ padding-left: 20px;
+ padding-right: 20px;
+ padding-top: 10px;
+ padding-bottom: 20px;
+ margin-right: 10px;
+ margin-left: 220px;
+ border: solid 1px black;
+ margin-top: 10px;
+ text-align: justify;
+ background-color: #E2E2E2;
+}
+img {
+ border: 0px;
+}
+div.sectionimg {
+ float: left;
+ margin-right: 10px;
+ margin-top: 5px;
+}
+p.hautpage {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ margin-left: 10px;
+}
+div.leftcol {
+ width: 202px;
+ width: 202px;
+ float: left;
+ padding: 0px;
+}
+div.logodiv {
+ border-right: 1px black solid;
+ border-bottom: 1px black solid;
+ padding: 0px;
+ line-height: 0px
+}
+div.loginbox {
+ margin-left: 4px;
+ border: solid #a59f8b 1px;
+ margin-top: 2px;
+ padding: 5px;
+ background-color: #fff2e8;
+ font-size: 10px;
+}
+div.loginbox p {
+ margin: 0px;
+ padding: 0px;
+}
+div.loginbox ul {
+ margin-left: 10px;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+ list-style-type: none;
+}
+div.loginbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.loginbox h2 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.loginbox h3 {
+ margin-top: 0px;
+ margin-bottom: 5px;
+ font-size: 12px;
+}
+div.polldivtitle {
+ margin-bottom: 1px;
+ background-color: #cac2a8;
+ margin-left: 4px;
+ margin-top: 15px;
+ padding-left: 5px;
+ font-size: 10px;
+ border-top: solid #a59f8b 1px;
+ border-bottom: solid #a59f8b 1px;
+ text-transform: uppercase;
+}
+div.polldiv {
+ margin-left: 4px;
+ border: 1px #a59f8b solid;
+ margin-top: 0px;
+ padding: 5px;
+ background: #fff2e8;
+}
+div.polldiv p {
+margin: 5px; padding: 0px;
+}
+div.polldiv ul {
+ margin-left: 5px;
+ margin-top: 0px;
+ margin-bottom: 10px;
+ padding: 0px;
+ list-style-type: none;
+}
+div.otherboxtitle {
+ margin-bottom: 2px;
+ background-color: #e3dabc;
+ margin-left: 4px;
+ margin-top: 15px;
+ padding-left: 5px;
+ padding-top: 2px;
+ font-size: 11px;
+ border-top: solid #777364 1px;
+ border-bottom: solid #777364 1px;
+ text-transform: uppercase;
+ font-weight: bold;
+}
+div.otherbox {
+ margin-left: 4px;
+ border: 1px #a59f8b solid;
+ margin-top: 0px;
+ padding: 5px;
+ text-align: justify;
+ background: #fff2e8;
+ font-size: 10px;
+}
+div.otherbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.otherbox h2 {
+ font-weight: bold;
+ font-size: 11px;
+ margin: 0px;
+}
+div.otherbox p {
+ margin-top: 5px;
+ margin-bottom: 10px;
+}
+div.rightlogo {
+ width: 90px;
+ float: right;
+ margin-right: 0px;
+ padding-top: 0px;
+ padding-left: 0px;
+ padding-bottom: 0px;
+}
+div.centraldiv {
+ margin-left: 220px;
+ margin-right: 10px;
+ margin-bottom: 20px;
+ margin-top: 10px;
+}
+div.centraldiv h1 {
+ font-weight: bold;
+ font-size: 14px;
+ margin: 0px;
+}
+div.centraldiv h2 {
+ font-weight: normal;
+ font-size: 12px;
+ margin: 0px;
+}
+div.centraldiv h3 {
+ font-weight: normal;
+ font-size: 12px;
+ margin-bottom: 20px;
+}
+div.centralinfo {
+ position:relative;
+ height:160px;
+}
+div.lefttopbox {
+ position:relative;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-top: 5px;
+ border: 1px #a59f8b solid;
+ text-align: justify;
+ background: #fff2e8;
+ font-size: 12px;
+ width: 47%;
+ float: left;
+}
+div.lefttopbox p {
+ margin-top: 5px; margin-bottom: 10px;
+}
+div.lefttopbox h1 {
+ font-size: 13px;
+ font-weight: bold;
+ margin: 0px;
+ text-align: right;
+}
+div.lefttopbox h2 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.lefttopbox h3 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.righttopbox {
+ position:relative;
+ border: 1px #a59f8b solid;
+ background: white;
+ padding: 5px;
+ text-align: justify;
+ font-size: 12px;
+ width: 47%;
+ float: right;
+}
+div.righttopbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.righttopbox h2 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.boardindex {
+ text-align: justify;
+ font-size: 11px;
+ padding: 10px;
+ margin-left: 20px;
+ margin-right: 20px;
+}
+a.boardindex:link,a.boardindex:visited,a.boardindex:active {
+ text-decoration:none;
+ color: red;
+}
+div.boardleftmsg {
+ float: left;
+ margin-top: 3px;
+}
+div.boardrightmsg {
+ margin-left: 130px;
+ margin-top: 3px;
+ padding-left: 5px;
+}
+div.journalbody {
+ margin-left: 40px;
+ margin-top: 40px;
+}
+div.journalbody h1 {
+ font-size: 15px;
+ font-weight: bold;
+}
+div.journalbody p {
+ margin-bottom: 20px;
+}
+.formulaire {
+ border: solid 1px black;
+font-size: 12px;
+background-color: #eef;
+color: #000000;
+}
+.newcomments {
+ color: red;
+ font-weight: bold;
+}
+div.commentsreplythanks {
+ margin-left: 100px;
+ margin-top: 50px;
+ margin-right: 100px;
+ background-color: #eee;
+ border: black solid 1px;
+ padding: 10px;
+}
+div.archivediv {
+ margin-right: 20px;
+}
+.archivedate {
+ color:#f30;
+}
+.archivelink {
+ font-size: 14px;
+ font-weight: bold;
+ text-decoration: underline;
+}
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test2.css b/src/3rdparty/libcroco/tests/test-inputs/test2.css
new file mode 100644
index 0000000..2442048
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test2.css
@@ -0,0 +1,9 @@
+
+/*simple selector and simple rulset test*/
+S1 {prop1 : value1}
+
+/*Simple selector list and simple ruleset test*/
+s1,s2 {color: black ; background: white}
+
+/*descendants and child selector list, simple ruleset test*/
+s1 s2, S3 > s4 {prop1 : value1 ; prop2 : value2}
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test3.1.css b/src/3rdparty/libcroco/tests/test-inputs/test3.1.css
new file mode 100644
index 0000000..9c53843
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test3.1.css
@@ -0,0 +1,36 @@
+S1:lang(c) {prop1 : value1}
+
+/*simple Attribute set selectors*/
+s1[foo] {prop1 : value1}
+
+/*simple exact attribute selector, simple ruleset*/
+s1[foo="warning"] {prop1 : value1}
+
+/**
+ *"space separated value list"
+ *attribute selector, simple ruleset
+ */
+s1[foo~="warning"] {prop1 :value1}
+
+/**
+ *"hyphen separated value list" attribute selector,
+ * simple ruleset
+ */
+
+ /*simple class selector, simple ruleset*/
+ s1.warning {prop1 : value}
+
+ E#myid {prop1 : value1}
+
+
+/*below are tests that we know are working*/
+
+/*simple ident pseudo class selector, simple ruleset test*/
+S1:first-child {prop1 : value1 ; prop2 : value2}
+
+/*function pseudo class selector, simple ruleset test => merdoie*/
+S1:lang(c) {prop1 : value1}
+
+/*Adjacent selectors, simple ruleset test*/
+S1 + s2 {prop1: value1}
+
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test3.2.css b/src/3rdparty/libcroco/tests/test-inputs/test3.2.css
new file mode 100644
index 0000000..2857fc4
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test3.2.css
@@ -0,0 +1,693 @@
+h1.rubrique_info {
+ color: #990033;
+ margin: 0px 0px 0px 0px;
+ padding: 0em;
+ border: 0px;
+ font-size: 12px;
+}
+
+* {
+ font-family: Verdana, Arial, Helvetica, sans-serif, monospace;
+}
+
+body {
+ background: #606060;
+ color: #000000;
+}
+
+a:link {
+ color: #0000FF;
+ background: transparent;
+ text-decoration: none;
+}
+
+a:visited {
+ color: #990099;
+ background: transparent;
+ text-decoration: none;
+}
+
+
+a:active {
+ color: #000000;
+ background: #ADD8E6;
+ text-decoration: none;
+}
+
+
+h1.rubrique_info {
+ color: #990033;
+ margin: 0px 0px 0px 0px;
+ padding: 0em;
+ border: 0px;
+ font-size: 12px;
+}
+
+/*
+h1.connexe {
+ font-size: 12px;
+ padding: 0em;
+ margin: 0px 0px 0px 0px;
+ color: #990033;
+}
+
+
+a.rubrique_infolink {
+ text-decoration: none;
+}
+
+
+ul.rubrique_infoul {
+ display: inline;
+ list-style-type: square;
+}
+
+
+ul.rubrique_infoul * {
+ width: 100%;
+}
+
+li.rubrique_infoul {
+ margin-left: 15px;
+}
+h1 {
+ color: #990033;
+}
+
+div.main {
+ background: white;
+ color: #000000;
+ margin-left: 5px;
+ margin-right: 5px;
+ border: 1px black solid;
+ text-align: left;
+ font-size: 12px;
+}
+div.lsfnbanner {
+ margin-left: 150px;
+ margin-right: 170px;
+ border-top: none;
+ padding-left: 10px;
+ padding-right: 10px;
+ border-bottom: 1px black solid;
+ border-right: 1px black solid;
+ border-left: 1px black solid;
+ text-align: left;
+ font-size: 11px;
+ padding-top: 2px;
+ background-color: #eeeae6;
+}
+div.footer {
+ padding-top: 5px;
+ padding-bottom: 3px;
+ border-top: 1px black solid;
+ border-left: 1px black solid;
+ border-right: 1px black solid;
+ text-align: left;
+ font-size: 9px;
+ background: #dcdff4;
+ width: 600px;
+ margin-top: 40px;
+ margin-left: 20px;
+}
+div.footer p {
+ margin-left: 10px;
+ margin-top: 2px;
+ margin-bottom: 2px;
+}
+
+a.lsfnlink:link,a.lsfnlink:visited,a.lsfnlink:active {
+ text-decoration: none;
+ color: #333333;
+ font-size: 10px;
+}
+a.lsfnlink:hover {
+ text-decoration: underline;
+ color: black;
+}
+div.menubartop {
+ margin-bottom: 10px;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 0px;
+ font-size: 13px;
+}
+div.smallmenubar {
+ background: white;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ font-weight:bold;
+ font-size: 10px;
+ text-align: right;
+}
+
+div.menuevent {
+ float: left;
+ width: 350px;
+ font-size: 11px;
+ text-align: left;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ padding-left: 10px;
+ font-weight: bold;
+ margin: 0px;
+}
+div.menubar {
+ background: #cac2a8;
+ border-top: 1px black solid;
+ border-bottom: 1px black solid;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 3px;
+ padding-bottom: 2px;
+ font-weight:bold;
+ font-size: 13px;
+}
+div.menubar a {
+ text-decoration: none;
+}
+div.menudate {
+ float: left;
+ width: 130px;
+ padding-top: 5px;
+}
+div.menuaccroche {
+ margin-left: 30px;
+ float: left;
+ text-decoration: underline;
+ font-size: 14px;
+}
+div.menusearch {
+ float: right;
+ text-align: right;
+ padding-top: 5px;
+ width: 170px;
+}
+div.menusearch p {
+ margin: 0px 0px 0px 0px;
+}
+.searchinput {
+ border: solid 1px black;
+}
+a#menulinkselect {
+ color: #ed7e00;
+}
+
+div.leftbox {
+ width: 200px;
+ float: left;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-bottom: 5px;
+ border-right: 1px black solid;
+ border-bottom: 1px black solid;
+ background: white;
+ margin-bottom: 10px;
+}
+div.leftbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.leftbox h2 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.leftbox ul {
+ list-style-type: square;
+ margin-bottom: 10px;
+ margin-left: 0em;
+ padding-left: 0em;
+}
+div.leftbox li {
+ margin-left: 10px;
+}
+
+div.rightbox {
+ width: 150px;
+ float: right;
+ padding-top: 10px;
+ padding-left: 5px;
+ padding-right: 15px;
+ padding-bottom: 5px;
+ border-left: 1px black solid;
+ border-bottom: 1px black solid;
+ text-align: left;
+}
+div.newjournaldiv {
+ text-align: justify;
+ margin-left: 10%;
+ font-size: 12px;
+ width: 600px;
+}
+div.newjournaldiv p {
+ margin-bottom: 0px;
+ margin-top: 20px;
+}
+div.journaldiv {
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 20px;
+ margin-bottom: 20px;
+ border: 1px black solid;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ padding-right: 10px;
+ padding-left: 10px;
+ background-color: #eef;
+}
+div.journaldiv p {
+ margin-top: 10px;
+ margin-bottom: 0px;
+}
+div.journaldiv h1 {
+ color: #990033;
+ font-size: 14px;
+ margin: 0px;
+}
+div.journaldiv h2 {
+ font-size: 10px;
+ margin: 0px;
+}
+div.tipdiv {
+ margin-left: 220px;
+ margin-right: 50px;
+ margin-top: 20px;
+ padding-top: 5px;
+ padding-right: 10px;
+ padding-left: 10px;
+ text-align: justify;
+ background-color: #eee;
+ border: black solid 1px;
+}
+div.tipdiv h1 {
+ font-weight: bold;
+ font-size: 14px;
+ color: black;
+ margin-top: 0px;
+ margin-bottom: 20px;
+}
+div.tipdiv h2 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 12px;
+ margin: 0px;
+}
+
+div.newsdiv {
+ margin-left: 220px;
+ margin-right: 180px;
+ margin-top: 10px;
+ margin-bottom: 20px;
+ text-align: justify;
+}
+div.newsdiv h1 {
+ font-weight: bold;
+ font-size: 14px;
+ margin: 0px;
+}
+div.newsdiv h2 {
+ font-weight: normal;
+ font-size: 12px;
+ margin: 0px;
+}
+div.newsdiv h3 {
+ font-weight: normal;
+ font-size: 12px;
+ margin-bottom: 20px;
+}
+div.objdiv {
+ margin-left: 220px;
+ margin-right: 20px;
+ margin-top: 10px;
+ margin-bottom: 20px;
+}
+
+h1.newstitle {
+ text-align: left;
+ font-size: 14px;
+ margin: 0px 0px 0px 0px;
+ color: black;
+}
+div.titlediv {
+ border-top: solid #cac2a8 2px;
+ margin-top: 20px;
+ background-color: #eeeae6;
+ padding-left: 10px;
+ font-size: 11px;
+}
+div.bodydiv {
+ border: solid #9e9784 1px;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 10px;
+ padding-bottom: 5px;
+ margin-top: 2px;
+ text-align: justify;
+}
+
+div.comments {
+ padding: 10px;
+ border-top: solid 2px #d37537;
+ border-bottom: solid 2px #d37537;
+ margin-top: 20px;
+ margin-bottom: 10px;
+ background-color: #cacaca;
+ font-size: 12px;
+ line-height: 1.3em;
+}
+
+p.commentsbody {
+ border-left-style: solid;
+ border-width: 1px;
+ border-color: rgb(0, 0, 0);
+ padding-left: 10px;
+ text-align: justify;
+ margin-right: 20px;
+}
+
+div.commentsreply {
+ margin-left: 220px;
+ text-align: center;
+ margin-top: 50px;
+}
+
+ul.commentsul {
+ list-style-type: none;
+ margin-bottom: 10px;
+ margin-left: 1.25em;
+ padding-left: 0em;
+ border-left: 1px solid black;
+}
+ul.commentsli {
+ margin: 10px;
+}
+div.comments li {
+ margin-top: 20px;
+ margin-left: 2px;
+}
+
+div.comments h1 {
+ font-size: 12px;
+ color: black;
+ margin: 0px 20px 3px 0px;
+ background-color: rgb(226, 226, 226);
+ padding-left: 1px;
+ font-weight: none;
+}
+
+div.articlediv {
+ padding-left: 20px;
+ padding-right: 20px;
+ padding-top: 10px;
+ padding-bottom: 20px;
+ margin-right: 10px;
+ margin-left: 220px;
+ border: solid 1px black;
+ margin-top: 10px;
+ text-align: justify;
+ background-color: #E2E2E2;
+}
+img {
+ border: 0px;
+}
+div.sectionimg {
+ float: left;
+ margin-right: 10px;
+ margin-top: 5px;
+}
+p.hautpage {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ margin-left: 10px;
+}
+div.leftcol {
+ width: 202px;
+ width: 202px;
+ float: left;
+ padding: 0px;
+}
+div.logodiv {
+ border-right: 1px black solid;
+ border-bottom: 1px black solid;
+ padding: 0px;
+ line-height: 0px
+}
+div.loginbox {
+ margin-left: 4px;
+ border: solid #a59f8b 1px;
+ margin-top: 2px;
+ padding: 5px;
+ background-color: #fff2e8;
+ font-size: 10px;
+}
+div.loginbox p {
+ margin: 0px;
+ padding: 0px;
+}
+div.loginbox ul {
+ margin-left: 10px;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+ list-style-type: none;
+}
+div.loginbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.loginbox h2 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.loginbox h3 {
+ margin-top: 0px;
+ margin-bottom: 5px;
+ font-size: 12px;
+}
+div.polldivtitle {
+ margin-bottom: 1px;
+ background-color: #cac2a8;
+ margin-left: 4px;
+ margin-top: 15px;
+ padding-left: 5px;
+ font-size: 10px;
+ border-top: solid #a59f8b 1px;
+ border-bottom: solid #a59f8b 1px;
+ text-transform: uppercase;
+}
+div.polldiv {
+ margin-left: 4px;
+ border: 1px #a59f8b solid;
+ margin-top: 0px;
+ padding: 5px;
+ background: #fff2e8;
+}
+div.polldiv p {
+margin: 5px; padding: 0px;
+}
+div.polldiv ul {
+ margin-left: 5px;
+ margin-top: 0px;
+ margin-bottom: 10px;
+ padding: 0px;
+ list-style-type: none;
+}
+div.otherboxtitle {
+ margin-bottom: 2px;
+ background-color: #e3dabc;
+ margin-left: 4px;
+ margin-top: 15px;
+ padding-left: 5px;
+ padding-top: 2px;
+ font-size: 11px;
+ border-top: solid #777364 1px;
+ border-bottom: solid #777364 1px;
+ text-transform: uppercase;
+ font-weight: bold;
+}
+div.otherbox {
+ margin-left: 4px;
+ border: 1px #a59f8b solid;
+ margin-top: 0px;
+ padding: 5px;
+ text-align: justify;
+ background: #fff2e8;
+ font-size: 10px;
+}
+div.otherbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.otherbox h2 {
+ font-weight: bold;
+ font-size: 11px;
+ margin: 0px;
+}
+div.otherbox p {
+ margin-top: 5px;
+ margin-bottom: 10px;
+}
+div.rightlogo {
+ width: 90px;
+ float: right;
+ margin-right: 0px;
+ padding-top: 0px;
+ padding-left: 0px;
+ padding-bottom: 0px;
+}
+div.centraldiv {
+ margin-left: 220px;
+ margin-right: 10px;
+ margin-bottom: 20px;
+ margin-top: 10px;
+}
+div.centraldiv h1 {
+ font-weight: bold;
+ font-size: 14px;
+ margin: 0px;
+}
+div.centraldiv h2 {
+ font-weight: normal;
+ font-size: 12px;
+ margin: 0px;
+}
+div.centraldiv h3 {
+ font-weight: normal;
+ font-size: 12px;
+ margin-bottom: 20px;
+}
+div.centralinfo {
+ position:relative;
+ height:160px;
+}
+div.lefttopbox {
+ position:relative;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-top: 5px;
+ border: 1px #a59f8b solid;
+ text-align: justify;
+ background: #fff2e8;
+ font-size: 12px;
+ width: 47%;
+ float: left;
+}
+div.lefttopbox p {
+ margin-top: 5px; margin-bottom: 10px;
+}
+div.lefttopbox h1 {
+ font-size: 13px;
+ font-weight: bold;
+ margin: 0px;
+ text-align: right;
+}
+div.lefttopbox h2 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.lefttopbox h3 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.righttopbox {
+ position:relative;
+ border: 1px #a59f8b solid;
+ background: white;
+ padding: 5px;
+ text-align: justify;
+ font-size: 12px;
+ width: 47%;
+ float: right;
+}
+div.righttopbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.righttopbox h2 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.boardindex {
+ text-align: justify;
+ font-size: 11px;
+ padding: 10px;
+ margin-left: 20px;
+ margin-right: 20px;
+}
+a.boardindex:link,a.boardindex:visited,a.boardindex:active {
+ text-decoration:none;
+ color: red;
+}
+div.boardleftmsg {
+ float: left;
+ margin-top: 3px;
+}
+div.boardrightmsg {
+ margin-left: 130px;
+ margin-top: 3px;
+ padding-left: 5px;
+}
+div.journalbody {
+ margin-left: 40px;
+ margin-top: 40px;
+}
+div.journalbody h1 {
+ font-size: 15px;
+ font-weight: bold;
+}
+div.journalbody p {
+ margin-bottom: 20px;
+}
+
+.formulaire {
+ border: solid 1px black;
+font-size: 12px;
+background-color: #eef;
+color: #000000;
+}
+.newcomments {
+ color: red;
+ font-weight: bold;
+}
+div.commentsreplythanks {
+ margin-left: 100px;
+ margin-top: 50px;
+ margin-right: 100px;
+ background-color: #eee;
+ border: black solid 1px;
+ padding: 10px;
+}
+div.archivediv {
+ margin-right: 20px;
+}
+.archivedate {
+ color:#f30;
+}
+.archivelink {
+ font-size: 14px;
+ font-weight: bold;
+ text-decoration: underline;
+}
+*/ \ No newline at end of file
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test3.css b/src/3rdparty/libcroco/tests/test-inputs/test3.css
new file mode 100644
index 0000000..2442048
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test3.css
@@ -0,0 +1,9 @@
+
+/*simple selector and simple rulset test*/
+S1 {prop1 : value1}
+
+/*Simple selector list and simple ruleset test*/
+s1,s2 {color: black ; background: white}
+
+/*descendants and child selector list, simple ruleset test*/
+s1 s2, S3 > s4 {prop1 : value1 ; prop2 : value2}
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test4.1.css b/src/3rdparty/libcroco/tests/test-inputs/test4.1.css
new file mode 100644
index 0000000..01bd9d4
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test4.1.css
@@ -0,0 +1,682 @@
+* {
+ font-family: Verdana, Arial, Helvetica, sans-serif, monospace !important;
+}
+
+tutu:class1:class2 {
+ test:ok ;
+}
+
+body {
+ background: #606060;
+ color: #000000;
+}
+
+
+a:link {
+ color: #0000FF;
+ background: transparent;
+ text-decoration: none;
+}
+
+
+a:visited {
+ color: #990099;
+ background: transparent;
+ text-decoration: none;
+}
+
+
+a:active {
+ color: #000000;
+ background: #ADD8E6;
+ text-decoration: none;
+}
+
+h1.rubrique_info {
+ color: #990033;
+ margin: 0px 0px 0px 0px;
+ padding: 0.4em;
+ border: 0px;
+ font-size: 12px;
+}
+h1.connexe {
+ font-size: 12px;
+ padding: 0.9em;
+ margin: 0px 0px 0px 0px;
+ color: #990033;
+}
+
+a.rubrique_infolink {
+ text-decoration: none;
+}
+
+ul.rubrique_infoul {
+ display: inline;
+ list-style-type: square;
+}
+ul.rubrique_infoul * {
+ width: 100%;
+}
+li.rubrique_infoul {
+ margin-left: 15px;
+}
+h1 {
+ color: #990033;
+}
+
+div.main {
+ background: white;
+ color: #000000;
+ margin-left: 5px;
+ margin-right: 5px;
+ border: 1px black solid;
+ text-align: left;
+ font-size: 12px;
+}
+div.lsfnbanner {
+ margin-left: 150px;
+ margin-right: 170px;
+ border-top: none;
+ padding-left: 10px;
+ padding-right: 10px;
+ border-bottom: 1px black solid;
+ border-right: 1px black solid;
+ border-left: 1px black solid;
+ text-align: left;
+ font-size: 11px;
+ padding-top: 2px;
+ background-color: #eeeae6;
+}
+div.footer {
+ padding-top: 5px;
+ padding-bottom: 3px;
+ border-top: 1px black solid;
+ border-left: 1px black solid;
+ border-right: 1px black solid;
+ text-align: left;
+ font-size: 9px;
+ background: #dcdff4;
+ width: 600px;
+ margin-top: 40px;
+ margin-left: 20px;
+}
+div.footer p {
+ margin-left: 10px;
+ margin-top: 2px;
+ margin-bottom: 2px;
+}
+
+a.lsfnlink:link,a.lsfnlink:visited,a.lsfnlink:active {
+ text-decoration: none;
+ color: #333333;
+ font-size: 10px;
+}
+a.lsfnlink:hover {
+ text-decoration: underline;
+ color: black;
+}
+div.menubartop {
+ margin-bottom: 10px;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 0px;
+ font-size: 13px;
+}
+div.smallmenubar {
+ background: white;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ font-weight:bold;
+ font-size: 10px;
+ text-align: right;
+}
+div.menuevent {
+ float: left;
+ width: 350px;
+ font-size: 11px;
+ text-align: left;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ padding-left: 10px;
+ font-weight: bold;
+ margin: 0px;
+}
+div.menubar {
+ background: #cac2a8;
+ border-top: 1px black solid;
+ border-bottom: 1px black solid;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 3px;
+ padding-bottom: 2px;
+ font-weight:bold;
+ font-size: 13px;
+}
+div.menubar a {
+ text-decoration: none;
+}
+div.menudate {
+ float: left;
+ width: 130px;
+ padding-top: 5px;
+}
+div.menuaccroche {
+ margin-left: 30px;
+ float: left;
+ text-decoration: underline;
+ font-size: 14px;
+}
+div.menusearch {
+ float: right;
+ text-align: right;
+ padding-top: 5px;
+ width: 170px;
+}
+div.menusearch p {
+ margin: 0px 0px 0px 0px;
+}
+.searchinput {
+ border: solid 1px black;
+}
+a#menulinkselect {
+ color: #ed7e00;
+}
+
+div.leftbox {
+ width: 200px;
+ float: left;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-bottom: 5px;
+ border-right: 1px black solid;
+ border-bottom: 1px black solid;
+ background: white;
+ margin-bottom: 10px;
+}
+div.leftbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.leftbox h2 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.leftbox ul {
+ list-style-type: square;
+ margin-bottom: 10px;
+ margin-left: 0.3em;
+ padding-left: 0.2em;
+}
+div.leftbox li {
+ margin-left: 10px;
+}
+
+div.rightbox {
+ width: 150px;
+ float: right;
+ padding-top: 10px;
+ padding-left: 5px;
+ padding-right: 15px;
+ padding-bottom: 5px;
+ border-left: 1px black solid;
+ border-bottom: 1px black solid;
+ text-align: left;
+}
+div.newjournaldiv {
+ text-align: justify;
+ margin-left: 10%;
+ font-size: 12px;
+ width: 600px;
+}
+div.newjournaldiv p {
+ margin-bottom: 0px;
+ margin-top: 20px;
+}
+div.journaldiv {
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 20px;
+ margin-bottom: 20px;
+ border: 1px black solid;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ padding-right: 10px;
+ padding-left: 10px;
+ background-color: #eef;
+}
+div.journaldiv p {
+ margin-top: 10px;
+ margin-bottom: 0px;
+}
+div.journaldiv h1 {
+ color: #990033;
+ font-size: 14px;
+ margin: 0px;
+}
+div.journaldiv h2 {
+ font-size: 10px;
+ margin: 0px;
+}
+div.tipdiv {
+ margin-left: 220px;
+ margin-right: 50px;
+ margin-top: 20px;
+ padding-top: 5px;
+ padding-right: 10px;
+ padding-left: 10px;
+ text-align: justify;
+ background-color: #eee;
+ border: black solid 1px;
+}
+div.tipdiv h1 {
+ font-weight: bold;
+ font-size: 14px;
+ color: black;
+ margin-top: 0px;
+ margin-bottom: 20px;
+}
+div.tipdiv h2 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 12px;
+ margin: 0px;
+}
+
+div.newsdiv {
+ margin-left: 220px;
+ margin-right: 180px;
+ margin-top: 10px;
+ margin-bottom: 20px;
+ text-align: justify;
+}
+div.newsdiv h1 {
+ font-weight: bold;
+ font-size: 14px;
+ margin: 0px;
+}
+div.newsdiv h2 {
+ font-weight: normal;
+ font-size: 12px;
+ margin: 0px;
+}
+div.newsdiv h3 {
+ font-weight: normal;
+ font-size: 12px;
+ margin-bottom: 20px;
+}
+div.objdiv {
+ margin-left: 220px;
+ margin-right: 20px;
+ margin-top: 10px;
+ margin-bottom: 20px;
+}
+
+h1.newstitle {
+ text-align: left;
+ font-size: 14px;
+ margin: 0px 0px 0px 0px;
+ color: black;
+}
+div.titlediv {
+ border-top: solid #cac2a8 2px;
+ margin-top: 20px;
+ background-color: #eeeae6;
+ padding-left: 10px;
+ font-size: 11px;
+}
+div.bodydiv {
+ border: solid #9e9784 1px;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-top: 10px;
+ padding-bottom: 5px;
+ margin-top: 2px;
+ text-align: justify;
+}
+
+div.comments {
+ padding: 10px;
+ border-top: solid 2px #d37537;
+ border-bottom: solid 2px #d37537;
+ margin-top: 20px;
+ margin-bottom: 10px;
+ background-color: #cacaca;
+ font-size: 12px;
+ line-height: 1.3em;
+}
+
+
+p.commentsbody {
+ border-left-style: solid;
+ border-width: 1px;
+ border-color: rgb(0, 0, 0);
+ padding-left: 10px;
+ text-align: justify;
+ margin-right: 20px;
+}
+
+
+div.commentsreply {
+ margin-left: 220px;
+ text-align: center;
+ margin-top: 50px;
+}
+
+ul.commentsul {
+ list-style-type: none;
+ margin-bottom: 10px;
+ margin-left: 1.25em;
+ padding-left: 0em;
+ border-left: 1px solid black;
+}
+ul.commentsli {
+ margin: 10px;
+}
+div.comments li {
+ margin-top: 20px;
+ margin-left: 2px;
+}
+
+div.comments h1 {
+ font-size: 12px;
+ color: black;
+ margin: 0px 20px 3px 0px;
+ background-color: rgb(226, 226, 226);
+ padding-left: 1px;
+ font-weight: none;
+}
+
+div.articlediv {
+ padding-left: 20px;
+ padding-right: 20px;
+ padding-top: 10px;
+ padding-bottom: 20px;
+ margin-right: 10px;
+ margin-left: 220px;
+ border: solid 1px black;
+ margin-top: 10px;
+ text-align: justify;
+ background-color: #E2E2E2;
+}
+img {
+ border: 0px;
+}
+div.sectionimg {
+ float: left;
+ margin-right: 10px;
+ margin-top: 5px;
+}
+p.hautpage {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ margin-left: 10px;
+}
+div.leftcol {
+ width: 202px;
+ width: 202px;
+ float: left;
+ padding: 0px;
+}
+div.logodiv {
+ border-right: 1px black solid;
+ border-bottom: 1px black solid;
+ padding: 0px;
+ line-height: 0px
+}
+div.loginbox {
+ margin-left: 4px;
+ border: solid #a59f8b 1px;
+ margin-top: 2px;
+ padding: 5px;
+ background-color: #fff2e8;
+ font-size: 10px;
+}
+div.loginbox p {
+ margin: 0px;
+ padding: 0px;
+}
+div.loginbox ul {
+ margin-left: 10px;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+ list-style-type: none;
+}
+div.loginbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.loginbox h2 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.loginbox h3 {
+ margin-top: 0px;
+ margin-bottom: 5px;
+ font-size: 12px;
+}
+div.polldivtitle {
+ margin-bottom: 1px;
+ background-color: #cac2a8;
+ margin-left: 4px;
+ margin-top: 15px;
+ padding-left: 5px;
+ font-size: 10px;
+ border-top: solid #a59f8b 1px;
+ border-bottom: solid #a59f8b 1px;
+ text-transform: uppercase;
+}
+div.polldiv {
+ margin-left: 4px;
+ border: 1px #a59f8b solid;
+ margin-top: 0px;
+ padding: 5px;
+ background: #fff2e8;
+}
+div.polldiv p {
+margin: 5px; padding: 0px;
+}
+div.polldiv ul {
+ margin-left: 5px;
+ margin-top: 0px;
+ margin-bottom: 10px;
+ padding: 0px;
+ list-style-type: none;
+}
+div.otherboxtitle {
+ margin-bottom: 2px;
+ background-color: #e3dabc;
+ margin-left: 4px;
+ margin-top: 15px;
+ padding-left: 5px;
+ padding-top: 2px;
+ font-size: 11px;
+ border-top: solid #777364 1px;
+ border-bottom: solid #777364 1px;
+ text-transform: uppercase;
+ font-weight: bold;
+}
+div.otherbox {
+ margin-left: 4px;
+ border: 1px #a59f8b solid;
+ margin-top: 0px;
+ padding: 5px;
+ text-align: justify;
+ background: #fff2e8;
+ font-size: 10px;
+}
+div.otherbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.otherbox h2 {
+ font-weight: bold;
+ font-size: 11px;
+ margin: 0px;
+}
+div.otherbox p {
+ margin-top: 5px;
+ margin-bottom: 10px;
+}
+div.rightlogo {
+ width: 90px;
+ float: right;
+ margin-right: 0px;
+ padding-top: 0px;
+ padding-left: 0px;
+ padding-bottom: 0px;
+}
+div.centraldiv {
+ margin-left: 220px;
+ margin-right: 10px;
+ margin-bottom: 20px;
+ margin-top: 10px;
+}
+div.centraldiv h1 {
+ font-weight: bold;
+ font-size: 14px;
+ margin: 0px;
+}
+div.centraldiv h2 {
+ font-weight: normal;
+ font-size: 12px;
+ margin: 0px;
+}
+div.centraldiv h3 {
+ font-weight: normal;
+ font-size: 12px;
+ margin-bottom: 20px;
+}
+div.centralinfo {
+ position:relative;
+ height:160px;
+}
+div.lefttopbox {
+ position:relative;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-top: 5px;
+ border: 1px #a59f8b solid;
+ text-align: justify;
+ background: #fff2e8;
+ font-size: 12px;
+ width: 47%;
+ float: left;
+}
+div.lefttopbox p {
+ margin-top: 5px; margin-bottom: 10px;
+}
+div.lefttopbox h1 {
+ font-size: 13px;
+ font-weight: bold;
+ margin: 0px;
+ text-align: right;
+}
+div.lefttopbox h2 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.lefttopbox h3 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.righttopbox {
+ position:relative;
+ border: 1px #a59f8b solid;
+ background: white;
+ padding: 5px;
+ text-align: justify;
+ font-size: 12px;
+ width: 47%;
+ float: right;
+}
+div.righttopbox h1 {
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #ed7e00;
+ font-size: 10px;
+ margin: 0px;
+}
+div.righttopbox h2 {
+ font-weight: bold;
+ font-size: 12px;
+ margin: 0px;
+}
+div.boardindex {
+ text-align: justify;
+ font-size: 11px;
+ padding: 10px;
+ margin-left: 20px;
+ margin-right: 20px;
+}
+a.boardindex:link,a.boardindex:visited,a.boardindex:active {
+ text-decoration:none;
+ color: red;
+}
+div.boardleftmsg {
+ float: left;
+ margin-top: 3px;
+}
+div.boardrightmsg {
+ margin-left: 130px;
+ margin-top: 3px;
+ padding-left: 5px;
+}
+div.journalbody {
+ margin-left: 40px;
+ margin-top: 40px;
+}
+div.journalbody h1 {
+ font-size: 15px;
+ font-weight: bold;
+}
+div.journalbody p {
+ margin-bottom: 20px;
+}
+.formulaire {
+ border: solid 1px black;
+font-size: 12px;
+background-color: #eef;
+color: #000000;
+}
+.newcomments {
+ color: red;
+ font-weight: bold;
+}
+div.commentsreplythanks {
+ margin-left: 100px;
+ margin-top: 50px;
+ margin-right: 100px;
+ background-color: #eee;
+ border: black solid 1px;
+ padding: 10px;
+}
+div.archivediv {
+ margin-right: 20px;
+}
+.archivedate {
+ color:#f30;
+}
+.archivelink {
+ font-size: 14px;
+ font-weight: bold;
+ text-decoration: underline;
+}
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test4.2.css b/src/3rdparty/libcroco/tests/test-inputs/test4.2.css
new file mode 100644
index 0000000..2dafbef
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test4.2.css
@@ -0,0 +1,24 @@
+@charset "ISO-8859-1" ;
+
+@import url("http://www.yahoo.com/css") print , screen ;
+
+@font-face {
+ font-family: "Robson Celtic";
+ src: url("http://site/fonts/rob-celt")
+}
+
+
+
+@page left:one-two {
+ margin: 10pt;
+ border:none
+}
+
+@media print , screen , projection {
+ H1 { font-family: "Robson Celtic", serif }
+
+ P {
+ background: black ;
+ foreground: white ;
+ }
+}
diff --git a/src/3rdparty/libcroco/tests/test-inputs/test5.1.css b/src/3rdparty/libcroco/tests/test-inputs/test5.1.css
new file mode 100644
index 0000000..26c3627
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/test5.1.css
@@ -0,0 +1,14 @@
+.class5 {prop8: val8}
+#id6 {prop9: val9}
+[attr4|=val4] {prop7: val7}
+[attr3~=val3_2] {prop6: val6}
+[attr2=val2] {prop5: val5}
+:first-child {first-child-prop: first-child-value}
+:lang(fr) {lang-prop: lang-value}
+E2[attr2=val2] {prop8: val8}
+E0 {prop0: val0}
+E0+E1{pro1:val1}
+E1 E1-1 {prop2: val2}
+E1 > E1-1 {prop3: val3}
+document E1-1 {prop4: val4}
+
diff --git a/src/3rdparty/libcroco/tests/test-inputs/unknown-at-rule.css b/src/3rdparty/libcroco/tests/test-inputs/unknown-at-rule.css
new file mode 100644
index 0000000..7680999
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/unknown-at-rule.css
@@ -0,0 +1,3 @@
+@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace
+to
+HTML */ \ No newline at end of file
diff --git a/src/3rdparty/libcroco/tests/test-inputs/unknown-at-rule2.css b/src/3rdparty/libcroco/tests/test-inputs/unknown-at-rule2.css
new file mode 100644
index 0000000..0c4a191
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-inputs/unknown-at-rule2.css
@@ -0,0 +1,3 @@
+@namespace url(http://www.w3.org/1999/xhtml); dummyrule { } /* set
+default
+namespace to HTML */ \ No newline at end of file
diff --git a/src/3rdparty/libcroco/tests/test-lots-of-comments.sh b/src/3rdparty/libcroco/tests/test-lots-of-comments.sh
new file mode 100755
index 0000000..f2eae9b
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-lots-of-comments.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+test -z "$CSSLINT" && . ./global-test-vars.sh
+
+$CSSLINT $TEST_INPUTS_DIR/lots-of-comments.css
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/Makefile.am b/src/3rdparty/libcroco/tests/test-output-refs/Makefile.am
new file mode 100644
index 0000000..b113e7f
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/Makefile.am
@@ -0,0 +1,16 @@
+EXTRA_DIST=test0.1.css.out \
+test1.css.out \
+test2.1.css.out \
+test2.2.css.out \
+test2.css.out \
+test3.1.css.out \
+test3.2.css.out \
+test3.css.out \
+test4.1.css.out \
+test4.2.css.out \
+test6.out \
+test-prop-ident.out \
+test-unknown-at-rule.out \
+test-unknown-at-rule2.out \
+test-several-media.out \
+test5.1.css.out
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test-functional-notation.out b/src/3rdparty/libcroco/tests/test-output-refs/test-functional-notation.out
new file mode 100644
index 0000000..7fa05fd
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test-functional-notation.out
@@ -0,0 +1,7 @@
+foo {
+ bar : attr(width, length, calc(70% -5px))
+}
+
+foo {
+ bar : attr(x, y)
+}
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test-lots-of-comments.out b/src/3rdparty/libcroco/tests/test-output-refs/test-lots-of-comments.out
new file mode 100644
index 0000000..59b08ef
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test-lots-of-comments.out
@@ -0,0 +1,26 @@
+@charset "utf8" ;
+
+@import url("http://pouet.com")screen, paper, aural ;
+
+@page coin :pseudo-page {
+ page-prop0 : page-val0;
+ page-prop1 : page-val1
+}
+
+
+@media paper, aural {
+ x {
+ foo : fooval;
+ bar : barval
+ }
+}
+
+@font-face {
+ font-prop1 : font1;
+ font-prop2 : font2
+}
+
+x>y[attr="val"].class#tatati z+toto {
+ prop1 : function(a);
+ prop2 : val2
+}
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test-parsing-location.out b/src/3rdparty/libcroco/tests/test-output-refs/test-parsing-location.out
new file mode 100644
index 0000000..7be4584
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test-parsing-location.out
@@ -0,0 +1,219 @@
+
+
+@charset "utf8";
+
+/********************************************
+ * Parsing location information of the @charset rule
+ ********************************************/
+ /*@charset*/
+ /*line:1 column:1 byte offset:0 */
+ /*utf8*/
+ /*line:1 column:10 byte offset:9 */
+
+@import url("http://pouet.com") screen, paper, aural;
+
+/*****************************************************
+ *Parsing location information for the @import rule
+ ******************************************************/
+
+ /*@import*/
+ /*line:3 column:1 byte offset:19 */
+
+ /*http://pouet.com*/
+ /*line:3 column:9 byte offset:27 */
+
+ /*screen*/
+ /*line:3 column:33 byte offset:51 */
+
+ /*paper*/
+ /*line:3 column:41 byte offset:59 */
+
+ /*aural*/
+ /*line:3 column:48 byte offset:66 */
+
+@import url("http://pouet.com") screen2, paper2, aural2;
+
+/*****************************************************
+ *Parsing location information for the @import rule
+ ******************************************************/
+
+ /*@import*/
+ /*line:4 column:1 byte offset:74 */
+
+ /*http://pouet.com*/
+ /*line:4 column:9 byte offset:82 */
+
+ /*screen2*/
+ /*line:4 column:31 byte offset:104 */
+
+ /*paper2*/
+ /*line:4 column:40 byte offset:113 */
+
+ /*aural2*/
+ /*line:4 column:48 byte offset:121 */
+
+@page coin :pseudo-page
+
+ /*@page*/
+ /*line:6 column:1 byte offset:131 */
+ /*coin*/
+ /*line:6 column:7 byte offset:137 */
+ /*pseudo-page*/
+ /*line:6 column:13 byte offset:143 */
+
+{
+
+
+page-prop0 : page-val0;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*page-prop0*/
+ /*line:7 column:7 byte offset:163 */
+ /*page-val0*/
+ /*line:7 column:19 byte offset:175 */
+
+
+page-prop1 : page-val1;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*page-prop1*/
+ /*line:8 column:7 byte offset:193 */
+ /*page-val1*/
+ /*line:8 column:19 byte offset:205 */
+}
+@media paper, aural
+ /*@media*/
+ /*line:11 column:1 byte offset:220 */
+ /*paper*/
+ /*line:11 column:8 byte offset:227 */
+ /*aural*/
+ /*line:11 column:15 byte offset:234 */
+
+{
+x {
+/************************************************
+ *Parsing location information of the selector
+ ************************************************/
+/*x*/
+/*line:12 column:5 byte offset:246 */
+ /*x*/
+ /*line:12 column:5 byte offset:246 */
+
+
+foo : fooval;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*foo*/
+ /*line:13 column:7 byte offset:256 */
+ /*fooval*/
+ /*line:13 column:12 byte offset:261 */
+
+
+bar : barval;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*bar*/
+ /*line:14 column:7 byte offset:276 */
+ /*barval*/
+ /*line:14 column:12 byte offset:281 */
+ }
+
+}
+@font-face {
+/******************************************************
+ Parsing location information for the @font-face rule
+ ******************************************************/
+
+ /*@font-face*/
+ /*line:18 column:1 byte offset:299 */
+
+
+font-prop1 : font1;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*font-prop1*/
+ /*line:19 column:2 byte offset:313 */
+ /*font1*/
+ /*line:19 column:14 byte offset:325 */
+
+
+font-prop2 : font2;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*font-prop2*/
+ /*line:20 column:2 byte offset:334 */
+ /*font2*/
+ /*line:20 column:14 byte offset:346 */
+}
+x>y[attr="val"].class#tatati z+toto {
+/************************************************
+ *Parsing location information of the selector
+ ************************************************/
+/*x*/
+/*line:22 column:1 byte offset:356 */
+ /*x*/
+ /*line:22 column:1 byte offset:356 */
+/*y[attr="val"].class#tatati*/
+/*line:22 column:5 byte offset:360 */
+ /*y*/
+ /*line:22 column:5 byte offset:360 */
+
+ /*[attr="val"]*/
+ /*line:22 column:6 byte offset:361 */
+
+ /*.class*/
+ /*line:22 column:17 byte offset:372 */
+
+ /*#tatati*/
+ /*line:22 column:22 byte offset:377 */
+/*z*/
+/*line:22 column:30 byte offset:385 */
+ /*z*/
+ /*line:22 column:30 byte offset:385 */
+/*toto*/
+/*line:22 column:34 byte offset:389 */
+ /*toto*/
+ /*line:22 column:34 byte offset:389 */
+
+
+prop1 : function(a);
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*prop1*/
+ /*line:23 column:2 byte offset:396 */
+ /*function(a)*/
+ /*line:23 column:9 byte offset:403 */
+
+
+prop2 : val2;
+
+
+/************************************************
+ *Parsing location information of the property
+ ************************************************/
+ /*prop2*/
+ /*line:24 column:2 byte offset:418 */
+ /*val2*/
+ /*line:24 column:9 byte offset:425 */
+ }
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test-prop-ident.out b/src/3rdparty/libcroco/tests/test-output-refs/test-prop-ident.out
new file mode 100644
index 0000000..149e8f5
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test-prop-ident.out
@@ -0,0 +1,3 @@
+:-foo-pseudo {
+ -foo-bar-prop : -foobar-value
+}
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test-sel-child-class.out b/src/3rdparty/libcroco/tests/test-output-refs/test-sel-child-class.out
new file mode 100644
index 0000000..aadd508
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test-sel-child-class.out
@@ -0,0 +1,4 @@
+Properties of xml element p are:
+ color : aqua
+=====================
+
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test-several-media.out b/src/3rdparty/libcroco/tests/test-output-refs/test-several-media.out
new file mode 100644
index 0000000..4b3cbdd
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test-several-media.out
@@ -0,0 +1,17 @@
+@media screen {
+ a:link {
+ text-decoration : none
+ }
+ div {
+ width : 50%
+ }
+}
+
+@media print {
+ a {
+ color : red
+ }
+ div {
+ width : 57%
+ }
+}
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test-unknown-at-rule.out b/src/3rdparty/libcroco/tests/test-output-refs/test-unknown-at-rule.out
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test-unknown-at-rule.out
@@ -0,0 +1 @@
+
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test-unknown-at-rule2.out b/src/3rdparty/libcroco/tests/test-output-refs/test-unknown-at-rule2.out
new file mode 100644
index 0000000..a356a7d
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test-unknown-at-rule2.out
@@ -0,0 +1,2 @@
+dummyrule {
+}
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test0.1.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test0.1.css.out
new file mode 100644
index 0000000..16475bd
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test0.1.css.out
@@ -0,0 +1 @@
+9811110012132123103232109971141031051103258324811212032481121203250481121203248112120591032321041011051031041163258324948483759103232989799107103114111117110100325832357070701012510106532123103232991111081111143258323548485151545459103232116101120116451001019911111497116105111110325832117110100101114108105110101101251010655810810511010732123103232991111081111143258323548485151545459103232116101120116451001019911111497116105111110325832117110100101114108105110101101251010655811810511510511610110032123103232991111081111143258323548485151545459103232116101120116451001019911111497116105111110325832117110100101114108105110101101251010655897991161051181013212310323299111108111114325832355757575757571012510106558104111118101114321231032329911110811111432583235575757575757101251010104494432104504432104513212310323210997114103105110325832481121205910323211297100100105110103325832481121201012510103598971101101011143212310323210211111011645102971091051081213258321129710897116105110111443210310111111410310597443211810111410097110974432971141059710844321159711011545115101114105102591032329911110811111432583235515151591032321161111125848591032321021111101164511510512210132583211011111410997108591032321021111101164511910110510310411632583211011111410997108591012510103598971101101011143297443235989711011010111432975810810511010744323598971101101011143297581181051151051161011004432359897110110101114329758979911610511810144323598971101101011143297581041111181011143212310323210211111011645102971091051081213258321181011141009711097443297114105971084432115971101154511510111410510259103232102111110116451151051221013258321201204510897114103101591032329911110811111432583235515151591032321161011201164510010199111114971161051111103258321101111101011012510104610010111599114105112116105111110321231032321021111101164510297109105108121325832118101114100971109744329711410597108443211597110115451151011141051025910323299111108111114325832355151515910323210211111011645115105122101325832115109971081085910323211610112011645116114971101151021111141093258321101111101011012510103599111110116101110116321231032321121111151051161051111103258329798115111108117116101591032329897991071031141111171101003258323570707059103232116111112583250483759321032321081011021165832504837591032329811111410010111432583249112120321151111081051003235707070101251010359911111011697105110101114321231032329897991071031141111171101003258323570707059103232981111141001011143258324911212032115111108105100323570707010125101035108105110107115321231032321129710010010511010332583249531121205910323298111114100101114325832491121203211511110810510032357070705910323211910510011610432583250484811212010125101046981081111033212310323211297100100105110103325832504811212059103232989799107103114111117110100325832357070701012510104698108111103981111001213212310323210211111011645102971091051081213258321181011141009711097443297114105971084432115971101154511510111410510259103232991111081111143258323551515159103232102111110116451151051221013258321151099710810859103232102111110116451191011051031041163258321101111141099710859103232989799107103114111117110100325832357070705910323210810511010145104101105103104116325832495348371012510104698108111103981111001213297443246981081111039811110012132975810810511010744324698108111103981111001213297581181051151051161011004432469810811110398111100121329758979911610511810144324698108111103981111001213297581041111181011143212310323210211111011645119101105103104116325832110111114109971085910323211610112011645100101991111149711610511111032583211711010010111410810511010110125101046116105116108101321231032321021111101164510297109105108121325832118101114100971109744329711410597108443211597110115451151011141051025910323210211111011645115105122101325832109101100105117109591032329911110811111432583235545454101251010461009711610132123103232102111110116451029710910510812132583211810111410097110974432971141059710844321151011141051025910323210211111011645115105122101325832108971141031015910323299111108111114325832355151515910323298111114100101114459811111611611110932583249112120321151111081051003235575757591032321099711410310511045981111161161111093258324948112120591032321021111101164511910110510310411632583298111108100101251010461121111151161011003212310323210211111011645102971091051081213258321181011141009711097443297114105971084432115971101154511510111410510259103232102111110116451151051221013258321204511510997108108591032329911110811111432583235484848484848591032321099711410310511045981111161161111093258325053112120101251010469997108101110100971143212310323210211111011645102971091051081213258321181011141009711097443297114105971084432115971101154511510111410510259103232991111081111143258323551515159103232102111110116451151051221013258321204511510997108108591032321021111101164511910110510310411632583211011111410997108591032329897991071031141111171101003258323570707059103232108105110101451041011051031041163258324952483759103232112971001001051101033258325011212059103232116101120116459710810510311032583210810110211610125101046999710810111010097114104101971003212310323210211111011645102971091051081213258321129710897116105110111443210310111111410310597443211610510910111532110101119321141111099711044321151011141051025910323299111108111114325832355454545448485910323210211111011645115105122101325832115109971081085910323210211111011645119101105103104116325832110111114109971085910323211297100100105110103325832501121205910323210810111611610111445115112979910511010332583248465110110959103232989799107103114111117110100325832357070705910323211610112011645116114971101151021111141093258321171121121011149997115101591032321161011201164597108105103110325832108101102116101251010461151051001013212310323210211111011645102971091051081213258321181011141009711097443297114105971084432115971101154511510111410510259103232991111081111143258323551515159103232102111110116451151051221013258321204511510997108108591032321021111101164511910110510310411632583211011111410997108591032329897991071031141111171101003258323570707059103232108105110101451041011051031041163258324952483759103232112971001001051101033258325011212010125101035109101110117989711432123103232102111110116451029710910510812132583211810111410097110974432971141059710844321159711011545115101114105102591032329911110811111432583235515151591032321021111101164511510512210132583211510997108108591032321021111101164511910110510310411632583211011111410997108591032321121111151051161051111105897981151111081171161015910323211611111258504837591032321129710010010511010358325011212059103232108101116116101114451151129799105110103325832484649101109591032329897991071031141111171101003258323570707059103232116101120116451161149711011510211111410932583211711211210111499971151011012510104611512111010010599971161013212310323210211111011645102971091051081213258321181011141009711097443297114105971084432115971101154511510111410510259103232102111110116451151051221013258321201204511510997108108591032321081051101014510410110510310411632583249524837591032321129710010010511010332583250112120591032321099711410310511045116111112325832495311212059103232989799107103114111117110100325832357070701012510104611211111910111410110032123103232102111110116451029710910510812132583211810111410097110974432971141059710844321159711011545115101114105102591032329911110811111432583235545454591032321021111101164511510512210132583212045115109971081085910323210810511010145104101105103104116325832495248375910323211610112011645116114971101151021111141093258321171121121011149997115101591032321129710010010511010332583250112120591032321099711410310511045116111112325832534811212059103232108101116116101114451151129799105110103325832484650101109591032329897991071031141111171101003258323570707010125101046991111091091011101161154598111100121321231032321021111101164510297109105108121325832118101114100971109744329711410597108443211597110115451151011141051025910323299111108111114325832355454545910323210211111011645115105122101325832115109971081085910323210211111011645119101105103104116325832110111114109971085910323298979910710311411111711010032583235707070591032321081051101014510410110510310411632583249524837591032321129710010010511010345981111161161111093258324948112120591032321129710010010511010345116111112325832494811212059103232981111141001011144598111116116111109325832491121203210011111611610110032355757571012510104699111109109101110116115451121111151163212310323210211111011645102971091051081213258321181011141009711097443297114105971084432115971101154511510111410510259103232991111081111143258323554545459103232102111110116451151051221013258321204511510997108108591032321021111101164511910110510310411632583211011111410997108591032329897991071031141111171101003258323570707010125101046116114979910798979910745117114108321231032321021111101164510297109105108121325832118101114100971109744329711410597108443211597110115451151011141051025910323299111108111114325832355454545910323210211111011645115105122101325832115109971081085910323210211111011645119101105103104116325832110111114109971085910323298979910710311411111711010032583235707070591032321081051101014510410110510310411632583249524837591032321129710010010511010332583253112120591032329811111410010111432583249112120321001111161161011003235575757101251010461161149799107989799107459811110012132123103232102111110116451029710910510812132583211810111410097110974432971141059710844321159711011545115101114105102591032329911110811111432583235545454591032321021111101164511510512210132583211510997108108591032321021111101164511910110510310411632583211011111410997108591032329897991071031141111171101003258323570707059103232108105110101451041011051031041163258324952483759103232112971001001051101034598111116116111109325832494811212059103232112971001001051101034511611111232583249481121205910323298111114100101114459811111611611110932583249112120321001111161161011003235575757101251010461161149799107989799107451121111151163212310323210211111011645102971091051081213258321181011141009711097443297114105971084432115971101154511510111410510259103232991111081111143258323554545459103232102111110116451151051221013258321204511510997108108591032321021111101164511910110510310411632583211011111410997108591032329897991071031141111171101003258323570707010125101046991111091091011101161154510410197100321231032321021111101164510297109105108121325832118101114100971109744329711410597108443211597110115451151011141051025910323210211111011645115105122101325832115109971081085910323299111108111114325832355454545910323298111114100101114459811111611611110932583249112120321151111081051003235575757591032321099711410310511045116111112325832504811212059103232102111110116451191011051031041163258329811110810059103232989799107103114111117110100325832357070701012510103598971101101011144599111109109101110116115112111112321231032321021111101164510297109105108121325832118101114100971109744329711410597108443211597110115451151011141051025910323299111108111114325832357070705910323210211111011645115105122101325832108971141031015910323210211111011645119101105103104116325832981111081005910323298111114100101114451081011021163258324911212032115111108105100323570707059103232981111141001011144511410510310411632583249112120321151111081051003235707070591032329811111410010111445116111112325832491121203211511110810510032357070705910323298979910710311411111711010032583235484851515454591032321129710010010511010345108101102116325832495311212059103232112971001001051101034511410510310411632583249531121205910323211297100100105110103451161111123258325311212059103232112971001001051101034598111116116111109325832531121201012510 \ No newline at end of file
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test1.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test1.css.out
new file mode 100644
index 0000000..b03c8a4
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test1.css.out
@@ -0,0 +1,316 @@
+body {
+
+ background-color: #E5E5E5;
+
+ scrollbar-face-color: #CCCCCC;
+
+ scrollbar-highlight-color: #FFFFFF;
+
+ scrollbar-shadow-color: #CCCCCC;
+
+ scrollbar-3dlight-color: #D1D7DC;
+
+ scrollbar-arrow-color: #000000;
+
+ scrollbar-track-color: #FFFFFF;
+
+ scrollbar-darkshadow-color: #000000;
+
+}
+
+
+
+font, th, td, p {
+
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+
+ font-size: 11px;
+
+}
+
+
+
+h1, h2 { font-size: 11px; color: #000000; font-weight: bold; }
+
+
+
+a:link, a:active, a:visited { color: #000000; }
+
+
+
+a:hover { color: #CC0000; text-decoration: underline; }
+
+
+
+hr { height: 0px; border: solid #CCCCCC 0px; border-top-width: 1px; }
+
+
+
+small { font-size: 10px; }
+
+
+
+input, textarea, select {
+
+ font: normal 11px Verdana, Arial, Helvetica, sans-serif;
+
+ color: #000000;
+
+ border-color: #000000;
+
+}
+
+
+
+input { text-indent: 2px; }
+
+
+
+
+input.post, textarea.post, select {
+
+ background-color: #FFFFFF;
+
+}
+
+
+
+
+th {
+
+ font-size: 11px; color: #CCCCCC; font-weight: bold;
+
+ background-color: #000000; height: 25px;
+
+ background-image: url(/~wiceyto/test/templates/blacknwhite/images/cellpic3.gif);
+
+}
+
+
+
+
+.fontspec, .tablefont {
+
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+
+ font-size: 11px;
+
+}
+
+
+
+.navbartext, .navbarfont {
+
+ font-size: 11px; color: #000000; font-weight: bold;
+
+}
+
+
+
+.navbartext a, .navbarfont a {
+
+ color: #000000; font-weight: bold; text-decoration: none;
+
+}
+
+
+
+.navbartext a:hover, .navbarfont a:hover {
+
+ color: #CC0000; text-decoration: none;
+
+}
+
+
+
+.tablespec, .guestbook { background-color: #FFFFFF; border: 2px #000000 solid; }
+
+.tablespec th, .tablespec td { color: #000000; background-color: #CCCCCC; }
+
+.tablespec th { background-image: none; }
+
+
+
+.messageblock {
+
+ border: dashed 1px;
+
+ margin-right: 4em; margin-left: 4em;
+
+ padding: 3em;
+
+}
+
+
+
+/* $MessageOpenCode - the body of text of the posts */
+
+.messagebody { font-size: 12px; line-height: 18px; }
+
+.messagebody a { color: #000000; text-decoration: underline; }
+
+.messagebody a:hover { color: #CC0000; text-decoration: underline; }
+
+
+
+
+.newcode { font-size: 11px; color: #CC0000; font-weight: bold; }
+
+.admincode { font-size: 11px; color: #990000; font-style: bold; }
+
+
+
+
+.bodyline { background-color: #FFFFFF; border: 1px #000000 solid; }
+
+
+
+
+.quote, .code {
+
+ background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
+
+ border-top-width: 1px; border-right-width: 1px;
+
+ border-bottom-width: 1px; border-left-width: 1px;
+
+}
+
+
+
+.quote {
+
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+
+ font-size: 11px;
+
+ color: #444444; line-height: 125%;
+
+}
+
+
+
+.code {
+
+ font-family: Courier, 'Courier New', sans-serif;
+
+ font-size: 11px;
+
+ color: #CC0000;
+
+}
+
+
+
+
+input.button {
+
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+
+ font-size: 11px;
+
+ color: #000000;
+
+ background-color: #FFFFFF;
+
+}
+
+
+
+/* Format button rollover help line. Actually it's a text box
+
+ set to the same color as the background so no one will know. */
+
+.helpline { background-color: #CCCCCC; border-style: none; }
+
+
+
+/* additional table cell colors and backgrounds */
+
+td.row2 { background-color: #CCCCCC; }
+
+td.row1 { background-color: #CCCCCC; }
+
+td.row3 { background-color: #D1D7DC; }
+
+
+
+/* additional general text */
+
+.gen { font-size: 12px; }
+
+.genmed { font-size: 11px; }
+
+.gensmall { font-size: 10px; }
+
+.gen, .genmed, .gensmall { color: #000000; }
+
+a.gen, a.genmed, a.gensmall { color: #000000; text-decoration: none; }
+
+a.gen:hover, a.genmed:hover, a.gensmall:hover { color: #CC0000; text-decoration: underline; }
+
+
+
+/* import fancy styles. For IE only. NS4.x doesn't use the @import function */
+
+@import url("/your.site/webbbs/themes/formIE.css");
+
+
+
+/* END of blacknwhite.css */
+
+
+
+
+
+
+
+/* Appendix.2-2: Example fancy styles CSS file
+
+Paste these into a text file and save as formIE.css */
+
+
+
+/* Fancy form styles for IE */
+
+
+
+input, textarea, select {
+
+border-top-width : 1px;
+
+border-right-width : 1px;
+
+border-bottom-width : 1px;
+
+border-left-width : 1px;
+
+}
+
+
+
+input { text-indent : 2px; }
+
+
+
+input.button {
+
+border-top-width : 1px;
+
+border-right-width : 1px;
+
+border-bottom-width : 1px;
+
+border-left-width : 1px;
+
+}
+
+
+
+.postbody { line-height: 18px}
+
+.magic {
+ margin-left: -20px;
+}
+
+/* END of formIE.css */
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test2.1.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test2.1.css.out
new file mode 100644
index 0000000..4874e68
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test2.1.css.out
@@ -0,0 +1,173 @@
+***************
+start_document
+***************
+
+***************
+start_selector
+s1[foo]
+***************
+
+***************
+property
+prop1: 'String'
+***************
+
+***************
+end_selector
+s1[foo]
+***************
+
+***************
+start_selector
+s2[foo]
+***************
+
+***************
+start_selector
+s3[foo="warning"]
+***************
+
+***************
+property
+prop1: value1
+***************
+
+***************
+end_selector
+s3[foo="warning"]
+***************
+
+***************
+start_selector
+s4[foo~="warning"]
+***************
+
+***************
+property
+prop1: value1
+***************
+
+***************
+end_selector
+s4[foo~="warning"]
+***************
+
+***************
+start_selector
+s5.warning
+***************
+
+***************
+property
+prop1: value
+***************
+
+***************
+end_selector
+s5.warning
+***************
+
+***************
+start_selector
+E#myid
+***************
+
+***************
+property
+prop1: value1
+***************
+
+***************
+end_selector
+E#myid
+***************
+
+***************
+start_selector
+S6:first-child
+***************
+
+***************
+property
+prop1: value1
+***************
+
+***************
+property
+prop2: value2
+***************
+
+***************
+end_selector
+S6:first-child
+***************
+
+***************
+start_selector
+S7:lang(c)
+***************
+
+***************
+property
+prop1: value1
+***************
+
+***************
+end_selector
+S7:lang(c)
+***************
+
+***************
+start_selector
+S8+s2
+***************
+
+***************
+property
+prop1: value1
+***************
+
+***************
+end_selector
+S8+s2
+***************
+
+***************
+start_selector
+.quotedstrings
+***************
+
+***************
+property
+-test-string1: "foo'bar"
+***************
+
+***************
+property
+-test-string2: "foo'bar"
+***************
+
+***************
+property
+-test-string3: 'foo"bar'
+***************
+
+***************
+property
+-test-string4: 'foo"bar'
+***************
+
+***************
+property
+-test-string5: 'foo\\bar'
+***************
+
+***************
+end_selector
+.quotedstrings
+***************
+
+***************
+end_document
+***************
+
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test2.2.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test2.2.css.out
new file mode 100644
index 0000000..f0d631a
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test2.2.css.out
@@ -0,0 +1,3328 @@
+***************
+start_document
+***************
+
+***************
+start_selector
+p.commentsbody
+***************
+
+***************
+property
+border-left-style: solid
+***************
+
+***************
+property
+border-width: 1px
+***************
+
+***************
+property
+border-color: rgb(0, 0, 0)
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+margin-right: 20px
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+end_selector
+p.commentsbody
+***************
+
+***************
+start_selector
+*
+***************
+
+***************
+property
+font-family: Verdana, Arial, Helvetica, sans-serif, monospace
+***************
+
+***************
+end_selector
+*
+***************
+
+***************
+start_selector
+body
+***************
+
+***************
+property
+background: #606060
+***************
+
+***************
+property
+color: #000000
+***************
+
+***************
+end_selector
+body
+***************
+
+***************
+start_selector
+a:link
+***************
+
+***************
+property
+color: #0000FF
+***************
+
+***************
+property
+background: transparent
+***************
+
+***************
+property
+text-decoration: none
+***************
+
+***************
+end_selector
+a:link
+***************
+
+***************
+start_selector
+a:visited
+***************
+
+***************
+property
+color: #990099
+***************
+
+***************
+property
+background: transparent
+***************
+
+***************
+property
+text-decoration: none
+***************
+
+***************
+end_selector
+a:visited
+***************
+
+***************
+start_selector
+a:active
+***************
+
+***************
+property
+color: #000000
+***************
+
+***************
+property
+background: #ADD8E6
+***************
+
+***************
+property
+text-decoration: none
+***************
+
+***************
+end_selector
+a:active
+***************
+
+***************
+start_selector
+h1.rubrique_info
+***************
+
+***************
+property
+color: #990033
+***************
+
+***************
+property
+margin: 0px 0px 0px 0px
+***************
+
+***************
+property
+padding: 0em
+***************
+
+***************
+property
+border: 0px
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+end_selector
+h1.rubrique_info
+***************
+
+***************
+start_selector
+h1.connexe
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+padding: 0em
+***************
+
+***************
+property
+margin: 0px 0px 0px 0px
+***************
+
+***************
+property
+color: #990033
+***************
+
+***************
+end_selector
+h1.connexe
+***************
+
+***************
+start_selector
+a.rubrique_infolink
+***************
+
+***************
+property
+text-decoration: none
+***************
+
+***************
+end_selector
+a.rubrique_infolink
+***************
+
+***************
+start_selector
+ul.rubrique_infoul
+***************
+
+***************
+property
+display: inline
+***************
+
+***************
+property
+list-style-type: square
+***************
+
+***************
+end_selector
+ul.rubrique_infoul
+***************
+
+***************
+start_selector
+ul.rubrique_infoul *
+***************
+
+***************
+property
+width: 100%
+***************
+
+***************
+end_selector
+ul.rubrique_infoul *
+***************
+
+***************
+start_selector
+li.rubrique_infoul
+***************
+
+***************
+property
+margin-left: 15px
+***************
+
+***************
+end_selector
+li.rubrique_infoul
+***************
+
+***************
+start_selector
+h1
+***************
+
+***************
+property
+color: #990033
+***************
+
+***************
+end_selector
+h1
+***************
+
+***************
+start_selector
+div.main
+***************
+
+***************
+property
+background: white
+***************
+
+***************
+property
+color: #000000
+***************
+
+***************
+property
+margin-left: 5px
+***************
+
+***************
+property
+margin-right: 5px
+***************
+
+***************
+property
+border: 1px black solid
+***************
+
+***************
+property
+text-align: left
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+end_selector
+div.main
+***************
+
+***************
+start_selector
+div.lsfnbanner
+***************
+
+***************
+property
+margin-left: 150px
+***************
+
+***************
+property
+margin-right: 170px
+***************
+
+***************
+property
+border-top: none
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+padding-right: 10px
+***************
+
+***************
+property
+border-bottom: 1px black solid
+***************
+
+***************
+property
+border-right: 1px black solid
+***************
+
+***************
+property
+border-left: 1px black solid
+***************
+
+***************
+property
+text-align: left
+***************
+
+***************
+property
+font-size: 11px
+***************
+
+***************
+property
+padding-top: 2px
+***************
+
+***************
+property
+background-color: #eeeae6
+***************
+
+***************
+end_selector
+div.lsfnbanner
+***************
+
+***************
+start_selector
+div.footer
+***************
+
+***************
+property
+padding-top: 5px
+***************
+
+***************
+property
+padding-bottom: 3px
+***************
+
+***************
+property
+border-top: 1px black solid
+***************
+
+***************
+property
+border-left: 1px black solid
+***************
+
+***************
+property
+border-right: 1px black solid
+***************
+
+***************
+property
+text-align: left
+***************
+
+***************
+property
+font-size: 9px
+***************
+
+***************
+property
+background: #dcdff4
+***************
+
+***************
+property
+width: 600px
+***************
+
+***************
+property
+margin-top: 40px
+***************
+
+***************
+property
+margin-left: 20px
+***************
+
+***************
+end_selector
+div.footer
+***************
+
+***************
+start_selector
+div.footer p
+***************
+
+***************
+property
+margin-left: 10px
+***************
+
+***************
+property
+margin-top: 2px
+***************
+
+***************
+property
+margin-bottom: 2px
+***************
+
+***************
+end_selector
+div.footer p
+***************
+
+***************
+start_selector
+a.lsfnlink:link, a.lsfnlink:visited, a.lsfnlink:active
+***************
+
+***************
+property
+text-decoration: none
+***************
+
+***************
+property
+color: #333333
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+end_selector
+a.lsfnlink:link, a.lsfnlink:visited, a.lsfnlink:active
+***************
+
+***************
+start_selector
+a.lsfnlink:hover
+***************
+
+***************
+property
+text-decoration: underline
+***************
+
+***************
+property
+color: black
+***************
+
+***************
+end_selector
+a.lsfnlink:hover
+***************
+
+***************
+start_selector
+div.menubartop
+***************
+
+***************
+property
+margin-bottom: 10px
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+padding-right: 10px
+***************
+
+***************
+property
+padding-top: 0px
+***************
+
+***************
+property
+font-size: 13px
+***************
+
+***************
+end_selector
+div.menubartop
+***************
+
+***************
+start_selector
+div.smallmenubar
+***************
+
+***************
+property
+background: white
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+padding-right: 10px
+***************
+
+***************
+property
+padding-top: 0px
+***************
+
+***************
+property
+padding-bottom: 0px
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+property
+text-align: right
+***************
+
+***************
+end_selector
+div.smallmenubar
+***************
+
+***************
+start_selector
+div.menuevent
+***************
+
+***************
+property
+float: left
+***************
+
+***************
+property
+width: 350px
+***************
+
+***************
+property
+font-size: 11px
+***************
+
+***************
+property
+text-align: left
+***************
+
+***************
+property
+padding-top: 0px
+***************
+
+***************
+property
+padding-bottom: 0px
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.menuevent
+***************
+
+***************
+start_selector
+div.menubar
+***************
+
+***************
+property
+background: #cac2a8
+***************
+
+***************
+property
+border-top: 1px black solid
+***************
+
+***************
+property
+border-bottom: 1px black solid
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+padding-right: 10px
+***************
+
+***************
+property
+padding-top: 3px
+***************
+
+***************
+property
+padding-bottom: 2px
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 13px
+***************
+
+***************
+end_selector
+div.menubar
+***************
+
+***************
+start_selector
+div.menubar a
+***************
+
+***************
+property
+text-decoration: none
+***************
+
+***************
+end_selector
+div.menubar a
+***************
+
+***************
+start_selector
+div.menudate
+***************
+
+***************
+property
+float: left
+***************
+
+***************
+property
+width: 130px
+***************
+
+***************
+property
+padding-top: 5px
+***************
+
+***************
+end_selector
+div.menudate
+***************
+
+***************
+start_selector
+div.menuaccroche
+***************
+
+***************
+property
+margin-left: 30px
+***************
+
+***************
+property
+float: left
+***************
+
+***************
+property
+text-decoration: underline
+***************
+
+***************
+property
+font-size: 14px
+***************
+
+***************
+end_selector
+div.menuaccroche
+***************
+
+***************
+start_selector
+div.menusearch
+***************
+
+***************
+property
+float: right
+***************
+
+***************
+property
+text-align: right
+***************
+
+***************
+property
+padding-top: 5px
+***************
+
+***************
+property
+width: 170px
+***************
+
+***************
+end_selector
+div.menusearch
+***************
+
+***************
+start_selector
+div.menusearch p
+***************
+
+***************
+property
+margin: 0px 0px 0px 0px
+***************
+
+***************
+end_selector
+div.menusearch p
+***************
+
+***************
+start_selector
+.searchinput
+***************
+
+***************
+property
+border: solid 1px black
+***************
+
+***************
+end_selector
+.searchinput
+***************
+
+***************
+start_selector
+a#menulinkselect
+***************
+
+***************
+property
+color: #ed7e00
+***************
+
+***************
+end_selector
+a#menulinkselect
+***************
+
+***************
+start_selector
+div.leftbox
+***************
+
+***************
+property
+width: 200px
+***************
+
+***************
+property
+float: left
+***************
+
+***************
+property
+padding-left: 5px
+***************
+
+***************
+property
+padding-right: 5px
+***************
+
+***************
+property
+padding-bottom: 5px
+***************
+
+***************
+property
+border-right: 1px black solid
+***************
+
+***************
+property
+border-bottom: 1px black solid
+***************
+
+***************
+property
+background: white
+***************
+
+***************
+property
+margin-bottom: 10px
+***************
+
+***************
+end_selector
+div.leftbox
+***************
+
+***************
+start_selector
+div.leftbox h1
+***************
+
+***************
+property
+text-transform: uppercase
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+color: #ed7e00
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.leftbox h1
+***************
+
+***************
+start_selector
+div.leftbox h2
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.leftbox h2
+***************
+
+***************
+start_selector
+div.leftbox ul
+***************
+
+***************
+property
+list-style-type: square
+***************
+
+***************
+property
+margin-bottom: 10px
+***************
+
+***************
+property
+margin-left: 0em
+***************
+
+***************
+property
+padding-left: 0em
+***************
+
+***************
+end_selector
+div.leftbox ul
+***************
+
+***************
+start_selector
+div.leftbox li
+***************
+
+***************
+property
+margin-left: 10px
+***************
+
+***************
+end_selector
+div.leftbox li
+***************
+
+***************
+start_selector
+div.rightbox
+***************
+
+***************
+property
+width: 150px
+***************
+
+***************
+property
+float: right
+***************
+
+***************
+property
+padding-top: 10px
+***************
+
+***************
+property
+padding-left: 5px
+***************
+
+***************
+property
+padding-right: 15px
+***************
+
+***************
+property
+padding-bottom: 5px
+***************
+
+***************
+property
+border-left: 1px black solid
+***************
+
+***************
+property
+border-bottom: 1px black solid
+***************
+
+***************
+property
+text-align: left
+***************
+
+***************
+end_selector
+div.rightbox
+***************
+
+***************
+start_selector
+div.newjournaldiv
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+property
+margin-left: 10%
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+width: 600px
+***************
+
+***************
+end_selector
+div.newjournaldiv
+***************
+
+***************
+start_selector
+div.newjournaldiv p
+***************
+
+***************
+property
+margin-bottom: 0px
+***************
+
+***************
+property
+margin-top: 20px
+***************
+
+***************
+end_selector
+div.newjournaldiv p
+***************
+
+***************
+start_selector
+div.journaldiv
+***************
+
+***************
+property
+margin-left: 0px
+***************
+
+***************
+property
+margin-right: 0px
+***************
+
+***************
+property
+margin-top: 20px
+***************
+
+***************
+property
+margin-bottom: 20px
+***************
+
+***************
+property
+border: 1px black solid
+***************
+
+***************
+property
+padding-top: 5px
+***************
+
+***************
+property
+padding-bottom: 5px
+***************
+
+***************
+property
+padding-right: 10px
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+background-color: #eef
+***************
+
+***************
+end_selector
+div.journaldiv
+***************
+
+***************
+start_selector
+div.journaldiv p
+***************
+
+***************
+property
+margin-top: 10px
+***************
+
+***************
+property
+margin-bottom: 0px
+***************
+
+***************
+end_selector
+div.journaldiv p
+***************
+
+***************
+start_selector
+div.journaldiv h1
+***************
+
+***************
+property
+color: #990033
+***************
+
+***************
+property
+font-size: 14px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.journaldiv h1
+***************
+
+***************
+start_selector
+div.journaldiv h2
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.journaldiv h2
+***************
+
+***************
+start_selector
+div.tipdiv
+***************
+
+***************
+property
+margin-left: 220px
+***************
+
+***************
+property
+margin-right: 50px
+***************
+
+***************
+property
+margin-top: 20px
+***************
+
+***************
+property
+padding-top: 5px
+***************
+
+***************
+property
+padding-right: 10px
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+property
+background-color: #eee
+***************
+
+***************
+property
+border: black solid 1px
+***************
+
+***************
+end_selector
+div.tipdiv
+***************
+
+***************
+start_selector
+div.tipdiv h1
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 14px
+***************
+
+***************
+property
+color: black
+***************
+
+***************
+property
+margin-top: 0px
+***************
+
+***************
+property
+margin-bottom: 20px
+***************
+
+***************
+end_selector
+div.tipdiv h1
+***************
+
+***************
+start_selector
+div.tipdiv h2
+***************
+
+***************
+property
+text-transform: uppercase
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+color: #ed7e00
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.tipdiv h2
+***************
+
+***************
+start_selector
+div.newsdiv
+***************
+
+***************
+property
+margin-left: 220px
+***************
+
+***************
+property
+margin-right: 180px
+***************
+
+***************
+property
+margin-top: 10px
+***************
+
+***************
+property
+margin-bottom: 20px
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+end_selector
+div.newsdiv
+***************
+
+***************
+start_selector
+div.newsdiv h1
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 14px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.newsdiv h1
+***************
+
+***************
+start_selector
+div.newsdiv h2
+***************
+
+***************
+property
+font-weight: normal
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.newsdiv h2
+***************
+
+***************
+start_selector
+div.newsdiv h3
+***************
+
+***************
+property
+font-weight: normal
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+margin-bottom: 20px
+***************
+
+***************
+end_selector
+div.newsdiv h3
+***************
+
+***************
+start_selector
+div.objdiv
+***************
+
+***************
+property
+margin-left: 220px
+***************
+
+***************
+property
+margin-right: 20px
+***************
+
+***************
+property
+margin-top: 10px
+***************
+
+***************
+property
+margin-bottom: 20px
+***************
+
+***************
+end_selector
+div.objdiv
+***************
+
+***************
+start_selector
+h1.newstitle
+***************
+
+***************
+property
+text-align: left
+***************
+
+***************
+property
+font-size: 14px
+***************
+
+***************
+property
+margin: 0px 0px 0px 0px
+***************
+
+***************
+property
+color: black
+***************
+
+***************
+end_selector
+h1.newstitle
+***************
+
+***************
+start_selector
+div.titlediv
+***************
+
+***************
+property
+border-top: solid #cac2a8 2px
+***************
+
+***************
+property
+margin-top: 20px
+***************
+
+***************
+property
+background-color: #eeeae6
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+font-size: 11px
+***************
+
+***************
+end_selector
+div.titlediv
+***************
+
+***************
+start_selector
+div.bodydiv
+***************
+
+***************
+property
+border: solid #9e9784 1px
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+padding-right: 10px
+***************
+
+***************
+property
+padding-top: 10px
+***************
+
+***************
+property
+padding-bottom: 5px
+***************
+
+***************
+property
+margin-top: 2px
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+end_selector
+div.bodydiv
+***************
+
+***************
+start_selector
+div.comments
+***************
+
+***************
+property
+padding: 10px
+***************
+
+***************
+property
+border-top: solid 2px #d37537
+***************
+
+***************
+property
+border-bottom: solid 2px #d37537
+***************
+
+***************
+property
+margin-top: 20px
+***************
+
+***************
+property
+margin-bottom: 10px
+***************
+
+***************
+property
+background-color: #cacaca
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+line-height: 1.3em
+***************
+
+***************
+end_selector
+div.comments
+***************
+
+***************
+start_selector
+p.commentsbody
+***************
+
+***************
+property
+border-left-style: solid
+***************
+
+***************
+property
+border-width: 1px
+***************
+
+***************
+property
+border-color: rgb(0, 0, 0)
+***************
+
+***************
+property
+padding-left: 10px
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+property
+margin-right: 20px
+***************
+
+***************
+end_selector
+p.commentsbody
+***************
+
+***************
+start_selector
+div.commentsreply
+***************
+
+***************
+property
+margin-left: 220px
+***************
+
+***************
+property
+text-align: center
+***************
+
+***************
+property
+margin-top: 50px
+***************
+
+***************
+end_selector
+div.commentsreply
+***************
+
+***************
+start_selector
+ul.commentsul
+***************
+
+***************
+property
+list-style-type: none
+***************
+
+***************
+property
+margin-bottom: 10px
+***************
+
+***************
+property
+margin-left: 1.25em
+***************
+
+***************
+property
+padding-left: 0em
+***************
+
+***************
+property
+border-left: 1px solid black
+***************
+
+***************
+end_selector
+ul.commentsul
+***************
+
+***************
+start_selector
+ul.commentsli
+***************
+
+***************
+property
+margin: 10px
+***************
+
+***************
+end_selector
+ul.commentsli
+***************
+
+***************
+start_selector
+div.comments li
+***************
+
+***************
+property
+margin-top: 20px
+***************
+
+***************
+property
+margin-left: 2px
+***************
+
+***************
+end_selector
+div.comments li
+***************
+
+***************
+start_selector
+div.comments h1
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+color: black
+***************
+
+***************
+property
+margin: 0px 20px 3px 0px
+***************
+
+***************
+property
+background-color: rgb(226, 226, 226)
+***************
+
+***************
+property
+padding-left: 1px
+***************
+
+***************
+property
+font-weight: none
+***************
+
+***************
+end_selector
+div.comments h1
+***************
+
+***************
+start_selector
+div.articlediv
+***************
+
+***************
+property
+padding-left: 20px
+***************
+
+***************
+property
+padding-right: 20px
+***************
+
+***************
+property
+padding-top: 10px
+***************
+
+***************
+property
+padding-bottom: 20px
+***************
+
+***************
+property
+margin-right: 10px
+***************
+
+***************
+property
+margin-left: 220px
+***************
+
+***************
+property
+border: solid 1px black
+***************
+
+***************
+property
+margin-top: 10px
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+property
+background-color: #E2E2E2
+***************
+
+***************
+end_selector
+div.articlediv
+***************
+
+***************
+start_selector
+img
+***************
+
+***************
+property
+border: 0px
+***************
+
+***************
+end_selector
+img
+***************
+
+***************
+start_selector
+div.sectionimg
+***************
+
+***************
+property
+float: left
+***************
+
+***************
+property
+margin-right: 10px
+***************
+
+***************
+property
+margin-top: 5px
+***************
+
+***************
+end_selector
+div.sectionimg
+***************
+
+***************
+start_selector
+p.hautpage
+***************
+
+***************
+property
+margin-top: 20px
+***************
+
+***************
+property
+margin-bottom: 20px
+***************
+
+***************
+property
+margin-left: 10px
+***************
+
+***************
+end_selector
+p.hautpage
+***************
+
+***************
+start_selector
+div.leftcol
+***************
+
+***************
+property
+width: 202px
+***************
+
+***************
+property
+width: 202px
+***************
+
+***************
+property
+float: left
+***************
+
+***************
+property
+padding: 0px
+***************
+
+***************
+end_selector
+div.leftcol
+***************
+
+***************
+start_selector
+div.logodiv
+***************
+
+***************
+property
+border-right: 1px black solid
+***************
+
+***************
+property
+border-bottom: 1px black solid
+***************
+
+***************
+property
+padding: 0px
+***************
+
+***************
+property
+line-height: 0px
+***************
+
+***************
+end_selector
+div.logodiv
+***************
+
+***************
+start_selector
+div.loginbox
+***************
+
+***************
+property
+margin-left: 4px
+***************
+
+***************
+property
+border: solid #a59f8b 1px
+***************
+
+***************
+property
+margin-top: 2px
+***************
+
+***************
+property
+padding: 5px
+***************
+
+***************
+property
+background-color: #fff2e8
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+end_selector
+div.loginbox
+***************
+
+***************
+start_selector
+div.loginbox p
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+property
+padding: 0px
+***************
+
+***************
+end_selector
+div.loginbox p
+***************
+
+***************
+start_selector
+div.loginbox ul
+***************
+
+***************
+property
+margin-left: 10px
+***************
+
+***************
+property
+margin-top: 0px
+***************
+
+***************
+property
+margin-bottom: 0px
+***************
+
+***************
+property
+padding: 0px
+***************
+
+***************
+property
+list-style-type: none
+***************
+
+***************
+end_selector
+div.loginbox ul
+***************
+
+***************
+start_selector
+div.loginbox h1
+***************
+
+***************
+property
+text-transform: uppercase
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+color: #ed7e00
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.loginbox h1
+***************
+
+***************
+start_selector
+div.loginbox h2
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.loginbox h2
+***************
+
+***************
+start_selector
+div.loginbox h3
+***************
+
+***************
+property
+margin-top: 0px
+***************
+
+***************
+property
+margin-bottom: 5px
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+end_selector
+div.loginbox h3
+***************
+
+***************
+start_selector
+div.polldivtitle
+***************
+
+***************
+property
+margin-bottom: 1px
+***************
+
+***************
+property
+background-color: #cac2a8
+***************
+
+***************
+property
+margin-left: 4px
+***************
+
+***************
+property
+margin-top: 15px
+***************
+
+***************
+property
+padding-left: 5px
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+property
+border-top: solid #a59f8b 1px
+***************
+
+***************
+property
+border-bottom: solid #a59f8b 1px
+***************
+
+***************
+property
+text-transform: uppercase
+***************
+
+***************
+end_selector
+div.polldivtitle
+***************
+
+***************
+start_selector
+div.polldiv
+***************
+
+***************
+property
+margin-left: 4px
+***************
+
+***************
+property
+border: 1px #a59f8b solid
+***************
+
+***************
+property
+margin-top: 0px
+***************
+
+***************
+property
+padding: 5px
+***************
+
+***************
+property
+background: #fff2e8
+***************
+
+***************
+end_selector
+div.polldiv
+***************
+
+***************
+start_selector
+div.polldiv p
+***************
+
+***************
+property
+margin: 5px
+***************
+
+***************
+property
+padding: 0px
+***************
+
+***************
+end_selector
+div.polldiv p
+***************
+
+***************
+start_selector
+div.polldiv ul
+***************
+
+***************
+property
+margin-left: 5px
+***************
+
+***************
+property
+margin-top: 0px
+***************
+
+***************
+property
+margin-bottom: 10px
+***************
+
+***************
+property
+padding: 0px
+***************
+
+***************
+property
+list-style-type: none
+***************
+
+***************
+end_selector
+div.polldiv ul
+***************
+
+***************
+start_selector
+div.otherboxtitle
+***************
+
+***************
+property
+margin-bottom: 2px
+***************
+
+***************
+property
+background-color: #e3dabc
+***************
+
+***************
+property
+margin-left: 4px
+***************
+
+***************
+property
+margin-top: 15px
+***************
+
+***************
+property
+padding-left: 5px
+***************
+
+***************
+property
+padding-top: 2px
+***************
+
+***************
+property
+font-size: 11px
+***************
+
+***************
+property
+border-top: solid #777364 1px
+***************
+
+***************
+property
+border-bottom: solid #777364 1px
+***************
+
+***************
+property
+text-transform: uppercase
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+end_selector
+div.otherboxtitle
+***************
+
+***************
+start_selector
+div.otherbox
+***************
+
+***************
+property
+margin-left: 4px
+***************
+
+***************
+property
+border: 1px #a59f8b solid
+***************
+
+***************
+property
+margin-top: 0px
+***************
+
+***************
+property
+padding: 5px
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+property
+background: #fff2e8
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+end_selector
+div.otherbox
+***************
+
+***************
+start_selector
+div.otherbox h1
+***************
+
+***************
+property
+text-transform: uppercase
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+color: #ed7e00
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.otherbox h1
+***************
+
+***************
+start_selector
+div.otherbox h2
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 11px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.otherbox h2
+***************
+
+***************
+start_selector
+div.otherbox p
+***************
+
+***************
+property
+margin-top: 5px
+***************
+
+***************
+property
+margin-bottom: 10px
+***************
+
+***************
+end_selector
+div.otherbox p
+***************
+
+***************
+start_selector
+div.rightlogo
+***************
+
+***************
+property
+width: 90px
+***************
+
+***************
+property
+float: right
+***************
+
+***************
+property
+margin-right: 0px
+***************
+
+***************
+property
+padding-top: 0px
+***************
+
+***************
+property
+padding-left: 0px
+***************
+
+***************
+property
+padding-bottom: 0px
+***************
+
+***************
+end_selector
+div.rightlogo
+***************
+
+***************
+start_selector
+div.centraldiv
+***************
+
+***************
+property
+margin-left: 220px
+***************
+
+***************
+property
+margin-right: 10px
+***************
+
+***************
+property
+margin-bottom: 20px
+***************
+
+***************
+property
+margin-top: 10px
+***************
+
+***************
+end_selector
+div.centraldiv
+***************
+
+***************
+start_selector
+div.centraldiv h1
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 14px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.centraldiv h1
+***************
+
+***************
+start_selector
+div.centraldiv h2
+***************
+
+***************
+property
+font-weight: normal
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.centraldiv h2
+***************
+
+***************
+start_selector
+div.centraldiv h3
+***************
+
+***************
+property
+font-weight: normal
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+margin-bottom: 20px
+***************
+
+***************
+end_selector
+div.centraldiv h3
+***************
+
+***************
+start_selector
+div.centralinfo
+***************
+
+***************
+property
+position: relative
+***************
+
+***************
+property
+height: 160px
+***************
+
+***************
+end_selector
+div.centralinfo
+***************
+
+***************
+start_selector
+div.lefttopbox
+***************
+
+***************
+property
+position: relative
+***************
+
+***************
+property
+padding-left: 5px
+***************
+
+***************
+property
+padding-right: 5px
+***************
+
+***************
+property
+padding-top: 5px
+***************
+
+***************
+property
+border: 1px #a59f8b solid
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+property
+background: #fff2e8
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+width: 47%
+***************
+
+***************
+property
+float: left
+***************
+
+***************
+end_selector
+div.lefttopbox
+***************
+
+***************
+start_selector
+div.lefttopbox p
+***************
+
+***************
+property
+margin-top: 5px
+***************
+
+***************
+property
+margin-bottom: 10px
+***************
+
+***************
+end_selector
+div.lefttopbox p
+***************
+
+***************
+start_selector
+div.lefttopbox h1
+***************
+
+***************
+property
+font-size: 13px
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+property
+text-align: right
+***************
+
+***************
+end_selector
+div.lefttopbox h1
+***************
+
+***************
+start_selector
+div.lefttopbox h2
+***************
+
+***************
+property
+text-transform: uppercase
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+color: #ed7e00
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.lefttopbox h2
+***************
+
+***************
+start_selector
+div.lefttopbox h3
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.lefttopbox h3
+***************
+
+***************
+start_selector
+div.righttopbox
+***************
+
+***************
+property
+position: relative
+***************
+
+***************
+property
+border: 1px #a59f8b solid
+***************
+
+***************
+property
+background: white
+***************
+
+***************
+property
+padding: 5px
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+width: 47%
+***************
+
+***************
+property
+float: right
+***************
+
+***************
+end_selector
+div.righttopbox
+***************
+
+***************
+start_selector
+div.righttopbox h1
+***************
+
+***************
+property
+text-transform: uppercase
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+color: #ed7e00
+***************
+
+***************
+property
+font-size: 10px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.righttopbox h1
+***************
+
+***************
+start_selector
+div.righttopbox h2
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+margin: 0px
+***************
+
+***************
+end_selector
+div.righttopbox h2
+***************
+
+***************
+start_selector
+div.boardindex
+***************
+
+***************
+property
+text-align: justify
+***************
+
+***************
+property
+font-size: 11px
+***************
+
+***************
+property
+padding: 10px
+***************
+
+***************
+property
+margin-left: 20px
+***************
+
+***************
+property
+margin-right: 20px
+***************
+
+***************
+end_selector
+div.boardindex
+***************
+
+***************
+start_selector
+a.boardindex:link, a.boardindex:visited, a.boardindex:active
+***************
+
+***************
+property
+text-decoration: none
+***************
+
+***************
+property
+color: red
+***************
+
+***************
+end_selector
+a.boardindex:link, a.boardindex:visited, a.boardindex:active
+***************
+
+***************
+start_selector
+div.boardleftmsg
+***************
+
+***************
+property
+float: left
+***************
+
+***************
+property
+margin-top: 3px
+***************
+
+***************
+end_selector
+div.boardleftmsg
+***************
+
+***************
+start_selector
+div.boardrightmsg
+***************
+
+***************
+property
+margin-left: 130px
+***************
+
+***************
+property
+margin-top: 3px
+***************
+
+***************
+property
+padding-left: 5px
+***************
+
+***************
+end_selector
+div.boardrightmsg
+***************
+
+***************
+start_selector
+div.journalbody
+***************
+
+***************
+property
+margin-left: 40px
+***************
+
+***************
+property
+margin-top: 40px
+***************
+
+***************
+end_selector
+div.journalbody
+***************
+
+***************
+start_selector
+div.journalbody h1
+***************
+
+***************
+property
+font-size: 15px
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+end_selector
+div.journalbody h1
+***************
+
+***************
+start_selector
+div.journalbody p
+***************
+
+***************
+property
+margin-bottom: 20px
+***************
+
+***************
+end_selector
+div.journalbody p
+***************
+
+***************
+start_selector
+.formulaire
+***************
+
+***************
+property
+border: solid 1px black
+***************
+
+***************
+property
+font-size: 12px
+***************
+
+***************
+property
+background-color: #eef
+***************
+
+***************
+property
+color: #000000
+***************
+
+***************
+end_selector
+.formulaire
+***************
+
+***************
+start_selector
+.newcomments
+***************
+
+***************
+property
+color: red
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+end_selector
+.newcomments
+***************
+
+***************
+start_selector
+div.commentsreplythanks
+***************
+
+***************
+property
+margin-left: 100px
+***************
+
+***************
+property
+margin-top: 50px
+***************
+
+***************
+property
+margin-right: 100px
+***************
+
+***************
+property
+background-color: #eee
+***************
+
+***************
+property
+border: black solid 1px
+***************
+
+***************
+property
+padding: 10px
+***************
+
+***************
+end_selector
+div.commentsreplythanks
+***************
+
+***************
+start_selector
+div.archivediv
+***************
+
+***************
+property
+margin-right: 20px
+***************
+
+***************
+end_selector
+div.archivediv
+***************
+
+***************
+start_selector
+.archivedate
+***************
+
+***************
+property
+color: #f30
+***************
+
+***************
+end_selector
+.archivedate
+***************
+
+***************
+start_selector
+.archivelink
+***************
+
+***************
+property
+font-size: 14px
+***************
+
+***************
+property
+font-weight: bold
+***************
+
+***************
+property
+text-decoration: underline
+***************
+
+***************
+end_selector
+.archivelink
+***************
+
+***************
+end_document
+***************
+
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test2.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test2.css.out
new file mode 100644
index 0000000..f989353
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test2.css.out
@@ -0,0 +1,63 @@
+***************
+start_document
+***************
+
+***************
+start_selector
+S1
+***************
+
+***************
+property
+prop1: value1
+***************
+
+***************
+end_selector
+S1
+***************
+
+***************
+start_selector
+s1, s2
+***************
+
+***************
+property
+color: black
+***************
+
+***************
+property
+background: white
+***************
+
+***************
+end_selector
+s1, s2
+***************
+
+***************
+start_selector
+s1 s2, S3>s4
+***************
+
+***************
+property
+prop1: value1
+***************
+
+***************
+property
+prop2: value2
+***************
+
+***************
+end_selector
+s1 s2, S3>s4
+***************
+
+***************
+end_document
+***************
+
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test3.1.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test3.1.css.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test3.1.css.out
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test3.2.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test3.2.css.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test3.2.css.out
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test3.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test3.css.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test3.css.out
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test4.1.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test4.1.css.out
new file mode 100644
index 0000000..95aa7b7
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test4.1.css.out
@@ -0,0 +1,766 @@
+* {
+ font-family : Verdana, Arial, Helvetica, sans-serif, monospace !important
+}
+
+tutu:class1:class2 {
+ test : ok
+}
+
+body {
+ background : #606060;
+ color : #000000
+}
+
+a:link {
+ color : #0000FF;
+ background : transparent;
+ text-decoration : none
+}
+
+a:visited {
+ color : #990099;
+ background : transparent;
+ text-decoration : none
+}
+
+a:active {
+ color : #000000;
+ background : #ADD8E6;
+ text-decoration : none
+}
+
+h1.rubrique_info {
+ color : #990033;
+ margin : 0px 0px 0px 0px;
+ padding : 0.4em;
+ border : 0px;
+ font-size : 12px
+}
+
+h1.connexe {
+ font-size : 12px;
+ padding : 0.9em;
+ margin : 0px 0px 0px 0px;
+ color : #990033
+}
+
+a.rubrique_infolink {
+ text-decoration : none
+}
+
+ul.rubrique_infoul {
+ display : inline;
+ list-style-type : square
+}
+
+ul.rubrique_infoul * {
+ width : 100%
+}
+
+li.rubrique_infoul {
+ margin-left : 15px
+}
+
+h1 {
+ color : #990033
+}
+
+div.main {
+ background : white;
+ color : #000000;
+ margin-left : 5px;
+ margin-right : 5px;
+ border : 1px black solid;
+ text-align : left;
+ font-size : 12px
+}
+
+div.lsfnbanner {
+ margin-left : 150px;
+ margin-right : 170px;
+ border-top : none;
+ padding-left : 10px;
+ padding-right : 10px;
+ border-bottom : 1px black solid;
+ border-right : 1px black solid;
+ border-left : 1px black solid;
+ text-align : left;
+ font-size : 11px;
+ padding-top : 2px;
+ background-color : #eeeae6
+}
+
+div.footer {
+ padding-top : 5px;
+ padding-bottom : 3px;
+ border-top : 1px black solid;
+ border-left : 1px black solid;
+ border-right : 1px black solid;
+ text-align : left;
+ font-size : 9px;
+ background : #dcdff4;
+ width : 600px;
+ margin-top : 40px;
+ margin-left : 20px
+}
+
+div.footer p {
+ margin-left : 10px;
+ margin-top : 2px;
+ margin-bottom : 2px
+}
+
+a.lsfnlink:link, a.lsfnlink:visited, a.lsfnlink:active {
+ text-decoration : none;
+ color : #333333;
+ font-size : 10px
+}
+
+a.lsfnlink:hover {
+ text-decoration : underline;
+ color : black
+}
+
+div.menubartop {
+ margin-bottom : 10px;
+ padding-left : 10px;
+ padding-right : 10px;
+ padding-top : 0px;
+ font-size : 13px
+}
+
+div.smallmenubar {
+ background : white;
+ padding-left : 10px;
+ padding-right : 10px;
+ padding-top : 0px;
+ padding-bottom : 0px;
+ font-weight : bold;
+ font-size : 10px;
+ text-align : right
+}
+
+div.menuevent {
+ float : left;
+ width : 350px;
+ font-size : 11px;
+ text-align : left;
+ padding-top : 0px;
+ padding-bottom : 0px;
+ padding-left : 10px;
+ font-weight : bold;
+ margin : 0px
+}
+
+div.menubar {
+ background : #cac2a8;
+ border-top : 1px black solid;
+ border-bottom : 1px black solid;
+ padding-left : 10px;
+ padding-right : 10px;
+ padding-top : 3px;
+ padding-bottom : 2px;
+ font-weight : bold;
+ font-size : 13px
+}
+
+div.menubar a {
+ text-decoration : none
+}
+
+div.menudate {
+ float : left;
+ width : 130px;
+ padding-top : 5px
+}
+
+div.menuaccroche {
+ margin-left : 30px;
+ float : left;
+ text-decoration : underline;
+ font-size : 14px
+}
+
+div.menusearch {
+ float : right;
+ text-align : right;
+ padding-top : 5px;
+ width : 170px
+}
+
+div.menusearch p {
+ margin : 0px 0px 0px 0px
+}
+
+.searchinput {
+ border : solid 1px black
+}
+
+a#menulinkselect {
+ color : #ed7e00
+}
+
+div.leftbox {
+ width : 200px;
+ float : left;
+ padding-left : 5px;
+ padding-right : 5px;
+ padding-bottom : 5px;
+ border-right : 1px black solid;
+ border-bottom : 1px black solid;
+ background : white;
+ margin-bottom : 10px
+}
+
+div.leftbox h1 {
+ text-transform : uppercase;
+ font-weight : bold;
+ color : #ed7e00;
+ font-size : 10px;
+ margin : 0px
+}
+
+div.leftbox h2 {
+ font-weight : bold;
+ font-size : 12px;
+ margin : 0px
+}
+
+div.leftbox ul {
+ list-style-type : square;
+ margin-bottom : 10px;
+ margin-left : 0.3em;
+ padding-left : 0.2em
+}
+
+div.leftbox li {
+ margin-left : 10px
+}
+
+div.rightbox {
+ width : 150px;
+ float : right;
+ padding-top : 10px;
+ padding-left : 5px;
+ padding-right : 15px;
+ padding-bottom : 5px;
+ border-left : 1px black solid;
+ border-bottom : 1px black solid;
+ text-align : left
+}
+
+div.newjournaldiv {
+ text-align : justify;
+ margin-left : 10%;
+ font-size : 12px;
+ width : 600px
+}
+
+div.newjournaldiv p {
+ margin-bottom : 0px;
+ margin-top : 20px
+}
+
+div.journaldiv {
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 20px;
+ margin-bottom : 20px;
+ border : 1px black solid;
+ padding-top : 5px;
+ padding-bottom : 5px;
+ padding-right : 10px;
+ padding-left : 10px;
+ background-color : #eef
+}
+
+div.journaldiv p {
+ margin-top : 10px;
+ margin-bottom : 0px
+}
+
+div.journaldiv h1 {
+ color : #990033;
+ font-size : 14px;
+ margin : 0px
+}
+
+div.journaldiv h2 {
+ font-size : 10px;
+ margin : 0px
+}
+
+div.tipdiv {
+ margin-left : 220px;
+ margin-right : 50px;
+ margin-top : 20px;
+ padding-top : 5px;
+ padding-right : 10px;
+ padding-left : 10px;
+ text-align : justify;
+ background-color : #eee;
+ border : black solid 1px
+}
+
+div.tipdiv h1 {
+ font-weight : bold;
+ font-size : 14px;
+ color : black;
+ margin-top : 0px;
+ margin-bottom : 20px
+}
+
+div.tipdiv h2 {
+ text-transform : uppercase;
+ font-weight : bold;
+ color : #ed7e00;
+ font-size : 12px;
+ margin : 0px
+}
+
+div.newsdiv {
+ margin-left : 220px;
+ margin-right : 180px;
+ margin-top : 10px;
+ margin-bottom : 20px;
+ text-align : justify
+}
+
+div.newsdiv h1 {
+ font-weight : bold;
+ font-size : 14px;
+ margin : 0px
+}
+
+div.newsdiv h2 {
+ font-weight : normal;
+ font-size : 12px;
+ margin : 0px
+}
+
+div.newsdiv h3 {
+ font-weight : normal;
+ font-size : 12px;
+ margin-bottom : 20px
+}
+
+div.objdiv {
+ margin-left : 220px;
+ margin-right : 20px;
+ margin-top : 10px;
+ margin-bottom : 20px
+}
+
+h1.newstitle {
+ text-align : left;
+ font-size : 14px;
+ margin : 0px 0px 0px 0px;
+ color : black
+}
+
+div.titlediv {
+ border-top : solid #cac2a8 2px;
+ margin-top : 20px;
+ background-color : #eeeae6;
+ padding-left : 10px;
+ font-size : 11px
+}
+
+div.bodydiv {
+ border : solid #9e9784 1px;
+ padding-left : 10px;
+ padding-right : 10px;
+ padding-top : 10px;
+ padding-bottom : 5px;
+ margin-top : 2px;
+ text-align : justify
+}
+
+div.comments {
+ padding : 10px;
+ border-top : solid 2px #d37537;
+ border-bottom : solid 2px #d37537;
+ margin-top : 20px;
+ margin-bottom : 10px;
+ background-color : #cacaca;
+ font-size : 12px;
+ line-height : 1.3em
+}
+
+p.commentsbody {
+ border-left-style : solid;
+ border-width : 1px;
+ border-color : rgb(0, 0, 0);
+ padding-left : 10px;
+ text-align : justify;
+ margin-right : 20px
+}
+
+div.commentsreply {
+ margin-left : 220px;
+ text-align : center;
+ margin-top : 50px
+}
+
+ul.commentsul {
+ list-style-type : none;
+ margin-bottom : 10px;
+ margin-left : 1.25em;
+ padding-left : 0em;
+ border-left : 1px solid black
+}
+
+ul.commentsli {
+ margin : 10px
+}
+
+div.comments li {
+ margin-top : 20px;
+ margin-left : 2px
+}
+
+div.comments h1 {
+ font-size : 12px;
+ color : black;
+ margin : 0px 20px 3px 0px;
+ background-color : rgb(226, 226, 226);
+ padding-left : 1px;
+ font-weight : none
+}
+
+div.articlediv {
+ padding-left : 20px;
+ padding-right : 20px;
+ padding-top : 10px;
+ padding-bottom : 20px;
+ margin-right : 10px;
+ margin-left : 220px;
+ border : solid 1px black;
+ margin-top : 10px;
+ text-align : justify;
+ background-color : #E2E2E2
+}
+
+img {
+ border : 0px
+}
+
+div.sectionimg {
+ float : left;
+ margin-right : 10px;
+ margin-top : 5px
+}
+
+p.hautpage {
+ margin-top : 20px;
+ margin-bottom : 20px;
+ margin-left : 10px
+}
+
+div.leftcol {
+ width : 202px;
+ width : 202px;
+ float : left;
+ padding : 0px
+}
+
+div.logodiv {
+ border-right : 1px black solid;
+ border-bottom : 1px black solid;
+ padding : 0px;
+ line-height : 0px
+}
+
+div.loginbox {
+ margin-left : 4px;
+ border : solid #a59f8b 1px;
+ margin-top : 2px;
+ padding : 5px;
+ background-color : #fff2e8;
+ font-size : 10px
+}
+
+div.loginbox p {
+ margin : 0px;
+ padding : 0px
+}
+
+div.loginbox ul {
+ margin-left : 10px;
+ margin-top : 0px;
+ margin-bottom : 0px;
+ padding : 0px;
+ list-style-type : none
+}
+
+div.loginbox h1 {
+ text-transform : uppercase;
+ font-weight : bold;
+ color : #ed7e00;
+ font-size : 10px;
+ margin : 0px
+}
+
+div.loginbox h2 {
+ font-weight : bold;
+ font-size : 12px;
+ margin : 0px
+}
+
+div.loginbox h3 {
+ margin-top : 0px;
+ margin-bottom : 5px;
+ font-size : 12px
+}
+
+div.polldivtitle {
+ margin-bottom : 1px;
+ background-color : #cac2a8;
+ margin-left : 4px;
+ margin-top : 15px;
+ padding-left : 5px;
+ font-size : 10px;
+ border-top : solid #a59f8b 1px;
+ border-bottom : solid #a59f8b 1px;
+ text-transform : uppercase
+}
+
+div.polldiv {
+ margin-left : 4px;
+ border : 1px #a59f8b solid;
+ margin-top : 0px;
+ padding : 5px;
+ background : #fff2e8
+}
+
+div.polldiv p {
+ margin : 5px;
+ padding : 0px
+}
+
+div.polldiv ul {
+ margin-left : 5px;
+ margin-top : 0px;
+ margin-bottom : 10px;
+ padding : 0px;
+ list-style-type : none
+}
+
+div.otherboxtitle {
+ margin-bottom : 2px;
+ background-color : #e3dabc;
+ margin-left : 4px;
+ margin-top : 15px;
+ padding-left : 5px;
+ padding-top : 2px;
+ font-size : 11px;
+ border-top : solid #777364 1px;
+ border-bottom : solid #777364 1px;
+ text-transform : uppercase;
+ font-weight : bold
+}
+
+div.otherbox {
+ margin-left : 4px;
+ border : 1px #a59f8b solid;
+ margin-top : 0px;
+ padding : 5px;
+ text-align : justify;
+ background : #fff2e8;
+ font-size : 10px
+}
+
+div.otherbox h1 {
+ text-transform : uppercase;
+ font-weight : bold;
+ color : #ed7e00;
+ font-size : 10px;
+ margin : 0px
+}
+
+div.otherbox h2 {
+ font-weight : bold;
+ font-size : 11px;
+ margin : 0px
+}
+
+div.otherbox p {
+ margin-top : 5px;
+ margin-bottom : 10px
+}
+
+div.rightlogo {
+ width : 90px;
+ float : right;
+ margin-right : 0px;
+ padding-top : 0px;
+ padding-left : 0px;
+ padding-bottom : 0px
+}
+
+div.centraldiv {
+ margin-left : 220px;
+ margin-right : 10px;
+ margin-bottom : 20px;
+ margin-top : 10px
+}
+
+div.centraldiv h1 {
+ font-weight : bold;
+ font-size : 14px;
+ margin : 0px
+}
+
+div.centraldiv h2 {
+ font-weight : normal;
+ font-size : 12px;
+ margin : 0px
+}
+
+div.centraldiv h3 {
+ font-weight : normal;
+ font-size : 12px;
+ margin-bottom : 20px
+}
+
+div.centralinfo {
+ position : relative;
+ height : 160px
+}
+
+div.lefttopbox {
+ position : relative;
+ padding-left : 5px;
+ padding-right : 5px;
+ padding-top : 5px;
+ border : 1px #a59f8b solid;
+ text-align : justify;
+ background : #fff2e8;
+ font-size : 12px;
+ width : 47%;
+ float : left
+}
+
+div.lefttopbox p {
+ margin-top : 5px;
+ margin-bottom : 10px
+}
+
+div.lefttopbox h1 {
+ font-size : 13px;
+ font-weight : bold;
+ margin : 0px;
+ text-align : right
+}
+
+div.lefttopbox h2 {
+ text-transform : uppercase;
+ font-weight : bold;
+ color : #ed7e00;
+ font-size : 10px;
+ margin : 0px
+}
+
+div.lefttopbox h3 {
+ font-weight : bold;
+ font-size : 12px;
+ margin : 0px
+}
+
+div.righttopbox {
+ position : relative;
+ border : 1px #a59f8b solid;
+ background : white;
+ padding : 5px;
+ text-align : justify;
+ font-size : 12px;
+ width : 47%;
+ float : right
+}
+
+div.righttopbox h1 {
+ text-transform : uppercase;
+ font-weight : bold;
+ color : #ed7e00;
+ font-size : 10px;
+ margin : 0px
+}
+
+div.righttopbox h2 {
+ font-weight : bold;
+ font-size : 12px;
+ margin : 0px
+}
+
+div.boardindex {
+ text-align : justify;
+ font-size : 11px;
+ padding : 10px;
+ margin-left : 20px;
+ margin-right : 20px
+}
+
+a.boardindex:link, a.boardindex:visited, a.boardindex:active {
+ text-decoration : none;
+ color : red
+}
+
+div.boardleftmsg {
+ float : left;
+ margin-top : 3px
+}
+
+div.boardrightmsg {
+ margin-left : 130px;
+ margin-top : 3px;
+ padding-left : 5px
+}
+
+div.journalbody {
+ margin-left : 40px;
+ margin-top : 40px
+}
+
+div.journalbody h1 {
+ font-size : 15px;
+ font-weight : bold
+}
+
+div.journalbody p {
+ margin-bottom : 20px
+}
+
+.formulaire {
+ border : solid 1px black;
+ font-size : 12px;
+ background-color : #eef;
+ color : #000000
+}
+
+.newcomments {
+ color : red;
+ font-weight : bold
+}
+
+div.commentsreplythanks {
+ margin-left : 100px;
+ margin-top : 50px;
+ margin-right : 100px;
+ background-color : #eee;
+ border : black solid 1px;
+ padding : 10px
+}
+
+div.archivediv {
+ margin-right : 20px
+}
+
+.archivedate {
+ color : #f30
+}
+
+.archivelink {
+ font-size : 14px;
+ font-weight : bold;
+ text-decoration : underline
+} \ No newline at end of file
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test4.2.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test4.2.css.out
new file mode 100644
index 0000000..b67ae23
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test4.2.css.out
@@ -0,0 +1,24 @@
+@charset "ISO-8859-1" ;
+
+@import url("http://www.yahoo.com/css")print, screen ;
+
+@font-face {
+ font-family : 'Robson Celtic';
+ src : url(http://site/fonts/rob-celt)
+}
+
+@page left :one-two {
+ margin : 10pt;
+ border : none
+}
+
+
+@media print, screen, projection {
+ H1 {
+ font-family : 'Robson Celtic', serif
+ }
+ P {
+ background : black;
+ foreground : white
+ }
+} \ No newline at end of file
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test5.1.css.out b/src/3rdparty/libcroco/tests/test-output-refs/test5.1.css.out
new file mode 100644
index 0000000..2f0bc54
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test5.1.css.out
@@ -0,0 +1,105 @@
+'''''''''''''''''''''''''
+xml start element: document
+
+ :first-child {
+ first-child-prop : first-child-value
+ }
+
+xml end element: document
+'''''''''''''''''''''''''
+'''''''''''''''''''''''''
+xml start element: E0
+
+ :first-child {
+ first-child-prop : first-child-value
+ }
+ E0 {
+ prop0 : val0
+ }
+
+xml end element: E0
+'''''''''''''''''''''''''
+'''''''''''''''''''''''''
+xml start element: E1
+
+ E0+E1 {
+ pro1 : val1
+ }
+
+xml end element: E1
+'''''''''''''''''''''''''
+'''''''''''''''''''''''''
+xml start element: E1-1
+
+ :first-child {
+ first-child-prop : first-child-value
+ }
+ E1 E1-1 {
+ prop2 : val2
+ }
+ E1>E1-1 {
+ prop3 : val3
+ }
+ document E1-1 {
+ prop4 : val4
+ }
+
+xml end element: E1-1
+'''''''''''''''''''''''''
+'''''''''''''''''''''''''
+xml start element: E2
+
+ [attr2="val2"] {
+ prop5 : val5
+ }
+ E2[attr2="val2"] {
+ prop8 : val8
+ }
+
+xml end element: E2
+'''''''''''''''''''''''''
+'''''''''''''''''''''''''
+xml start element: E3
+
+ [attr3~="val3_2"] {
+ prop6 : val6
+ }
+
+xml end element: E3
+'''''''''''''''''''''''''
+'''''''''''''''''''''''''
+xml start element: E4
+
+ [attr4|="val4"] {
+ prop7 : val7
+ }
+
+xml end element: E4
+'''''''''''''''''''''''''
+'''''''''''''''''''''''''
+xml start element: E5
+
+ .class5 {
+ prop8 : val8
+ }
+
+xml end element: E5
+'''''''''''''''''''''''''
+'''''''''''''''''''''''''
+xml start element: E6
+
+ #id6 {
+ prop9 : val9
+ }
+
+xml end element: E6
+'''''''''''''''''''''''''
+'''''''''''''''''''''''''
+xml start element: E7
+
+ :lang(fr) {
+ lang-prop : lang-value
+ }
+
+xml end element: E7
+'''''''''''''''''''''''''
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test6.out b/src/3rdparty/libcroco/tests/test-output-refs/test6.out
new file mode 100644
index 0000000..cdc81db
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test6.out
@@ -0,0 +1,8 @@
+.str0 {
+ stroke : #007844;
+ stroke-width : 44
+}
+
+.fil0 {
+ fill : url(#id0)
+} \ No newline at end of file
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test7.out b/src/3rdparty/libcroco/tests/test-output-refs/test7.out
new file mode 100644
index 0000000..21d10d7
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test7.out
@@ -0,0 +1,43 @@
+.exp1n1 {
+ stroke-width : 4000000
+}
+
+.exp1n2 {
+ stroke-width : 4000000
+}
+
+.exp1n3 {
+ stroke-width : 4000000
+}
+
+.exp2n1 {
+ stroke-width : 0.000004
+}
+
+.exp2n2 {
+ stroke-width : 0.000004
+}
+
+.exp3n1 {
+ stroke-width : 4000000em
+}
+
+.exp3n2 {
+ stroke-width : 4000000ex
+}
+
+.exp3n3 {
+ stroke-width : 4000000in
+}
+
+.exp4n1 {
+ stroke-width : 31400
+}
+
+.exp4n2 {
+ stroke-width : 0.000314
+}
+
+.e4n2 {
+ stroke-width : 0.000024
+}
diff --git a/src/3rdparty/libcroco/tests/test-output-refs/test8.out b/src/3rdparty/libcroco/tests/test-output-refs/test8.out
new file mode 100644
index 0000000..9e25188
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-output-refs/test8.out
@@ -0,0 +1,15 @@
+****************
+Parsing 'foo'
+foo
+****************
+Parsing 'foo,bar'
+foo, bar
+****************
+Parsing 'foo , bar '
+foo, bar
+****************
+Parsing 'foo > bar'
+foo>bar
+****************
+Parsing '.foo .bar'
+.foo.bar
diff --git a/src/3rdparty/libcroco/tests/test-parsing-location.sh b/src/3rdparty/libcroco/tests/test-parsing-location.sh
new file mode 100755
index 0000000..4d7af34
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-parsing-location.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+test -z "$CSSLINT" && . ./global-test-vars.sh
+
+$CSSLINT --dump-location $TEST_INPUTS_DIR/parsing-location.css
diff --git a/src/3rdparty/libcroco/tests/test-prop-ident.sh b/src/3rdparty/libcroco/tests/test-prop-ident.sh
new file mode 100755
index 0000000..31e6127
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-prop-ident.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+test -z "$CSSLINT" && . ./global-test-vars.sh
+
+$CSSLINT "$TEST_INPUTS_DIR"/prop-vendor-ident.css
diff --git a/src/3rdparty/libcroco/tests/test-sel-child-class.sh b/src/3rdparty/libcroco/tests/test-sel-child-class.sh
new file mode 100755
index 0000000..ebfbb96
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-sel-child-class.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+test -z "$CSSLINT" && . ./global-test-vars.sh
+
+$CSSLINT -e --user-sheet $TEST_INPUTS_DIR/sel-child-class.css --xml $TEST_INPUTS_DIR/sel-child-class.xml --xpath /test/body/div/div/p
diff --git a/src/3rdparty/libcroco/tests/test-several-media.sh b/src/3rdparty/libcroco/tests/test-several-media.sh
new file mode 100755
index 0000000..c0a0c9d
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-several-media.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+test -z "$CSSLINT" && . ./global-test-vars.sh
+
+$CSSLINT "$TEST_INPUTS_DIR"/several-media.css
diff --git a/src/3rdparty/libcroco/tests/test-unknown-at-rule.sh b/src/3rdparty/libcroco/tests/test-unknown-at-rule.sh
new file mode 100755
index 0000000..08ceff6
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-unknown-at-rule.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+test -z "$CSSLINT" && . ./global-test-vars.sh
+
+$CSSLINT "$TEST_INPUTS_DIR"/unknown-at-rule.css
diff --git a/src/3rdparty/libcroco/tests/test-unknown-at-rule2.sh b/src/3rdparty/libcroco/tests/test-unknown-at-rule2.sh
new file mode 100755
index 0000000..fe58731
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test-unknown-at-rule2.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+test -z "$CSSLINT" && . ./global-test-vars.sh
+
+$CSSLINT "$TEST_INPUTS_DIR"/unknown-at-rule2.css
diff --git a/src/3rdparty/libcroco/tests/test0-main.c b/src/3rdparty/libcroco/tests/test0-main.c
new file mode 100644
index 0000000..993c983
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test0-main.c
@@ -0,0 +1,203 @@
+/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+/*
+ *$Id$
+ */
+
+#include <stdio.h>
+#include "cr-input.h"
+#include "string.h"
+
+/**
+ *@file
+ *Some test facilities for the #CRInput class.
+ */
+
+/**
+ *The options data structure.
+ *The variable of this data structure are set
+ *during the parsing the command line by the
+ *parse_command_line() function.
+ */
+struct Options {
+ gboolean display_help;
+ gboolean display_about;
+ gchar **files_list;
+};
+
+static void
+ display_help (char *prg_name);
+
+static void
+ display_about (char *prg_name);
+
+static void
+ parse_command_line (int a_argc, char **a_argv, struct Options *a_options);
+
+static enum CRStatus
+ test_cr_input_read_byte (guchar * a_file_uri);
+
+/**
+ *Displays the usage of the test
+ *facility.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_help (char *prg_name)
+{
+ g_print ("\n\n");
+ g_print ("usage: %s <file-to-parse>\n", prg_name);
+ g_print ("\t <file-to-parse>: the file to parse\n");
+ g_print ("\n\n");
+ g_print ("This test just reads the file byte per byte\nand sends each byte to stdout\n");
+ g_print ("\n\n");
+}
+
+/**
+ *Displays the about text.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_about (char *prg_name)
+{
+ g_print ("\n\n");
+ g_print ("%s is a libcroco CRInput class test program.\n", prg_name);
+ g_print ("It should run on GNU compliants systems.\n");
+ g_print ("\n\n");
+ g_print ("Initial author: Dodji Seketeli <dodji@seketeli.org>.\n");
+ g_print ("\n\n");
+}
+
+/**
+ *Parses the command line and updates an abstract "options" data structure.
+ *@param a_argc the argc variable passed to the main function by the OS.
+ *@param a_argv the argv variable passed to the main function by the OS.
+ *@param a_options out parameter. The abstraction of the parsed the options.
+ */
+static void
+parse_command_line (int a_argc, char **a_argv, struct Options *a_options)
+{
+ int i = 0;
+
+ g_return_if_fail (a_options);
+
+ memset (a_options, 0, sizeof (struct Options));
+
+ for (i = 1; i < a_argc; i++) {
+ if (a_argv[i][0] != '-')
+ break;
+
+ if (!strcmp (a_argv[i], "-h")
+ || !strcmp (a_argv[i], "--help")) {
+ a_options->display_help = TRUE;
+ }
+ if (!strcmp (a_argv[i], "--about")) {
+ a_options->display_about = TRUE;
+ }
+ }
+
+ if (i >= a_argc) {
+ /*No file parameter where given */
+ a_options->files_list = NULL;
+ } else {
+ a_options->files_list = &a_argv[i];
+ }
+}
+
+/**
+ *The test of the cr_input_read_byte() method.
+ *Reads the each byte of a_file_uri using the
+ *cr_input_read_byte() method. Each byte is send to
+ *stdout.
+ *@param a_file_uri the file to read.
+ *@return CR_OK upon successful completion of the
+ *function, an error code otherwise.
+ */
+static enum CRStatus
+test_cr_input_read_byte (guchar * a_file_uri)
+{
+ enum CRStatus status = CR_OK;
+ CRInput *input = NULL;
+ guchar byte = 0;
+ guint c = 0;
+
+ g_return_val_if_fail (a_file_uri, CR_BAD_PARAM_ERROR);
+
+ input = cr_input_new_from_uri ((const gchar *) a_file_uri, CR_UTF_8);
+
+ if (!input) {
+ cr_utils_trace_debug ("Input Stream creation failed.");
+ return CR_ERROR;
+ }
+
+ for (status = CR_OK; status == CR_OK;) {
+ status = cr_input_read_byte (input, &byte);
+
+ if (status == CR_OK) {
+ c = byte;
+ printf ("%d", c);
+ fflush (stdout);
+ }
+ }
+
+ if (status == CR_END_OF_INPUT_ERROR) {
+ status = CR_OK;
+ }
+
+ cr_input_destroy (input);
+ input = NULL;
+
+ return status;
+}
+
+/**
+ *The entry point of the testing routine.
+ */
+int
+main (int argc, char **argv)
+{
+ struct Options options;
+
+ parse_command_line (argc, argv, &options);
+
+ if (options.display_help == TRUE) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ if (options.display_about == TRUE) {
+ display_about (argv[0]);
+ return 0;
+ }
+
+ if (options.files_list == NULL) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ test_cr_input_read_byte ((guchar *) options.files_list[0]);
+
+ return 0;
+}
diff --git a/src/3rdparty/libcroco/tests/test1-main.c b/src/3rdparty/libcroco/tests/test1-main.c
new file mode 100644
index 0000000..1c5f127
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test1-main.c
@@ -0,0 +1,197 @@
+/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * See COPYRIGHTS file for copyright information
+ */
+
+#include <stdio.h>
+#include "cr-input.h"
+#include "string.h"
+
+/**
+ *@file
+ *Some test facilities for the #CRInput class.
+ */
+
+/**
+ *The options data structure.
+ *The variable of this data structure are set
+ *during the parsing the command line by the
+ *parse_command_line() function.
+ */
+struct Options {
+ gboolean display_help;
+ gboolean display_about;
+ gchar **files_list;
+};
+
+static void
+ display_help (char *prg_name);
+
+static void
+ display_about (char *prg_name);
+
+static void
+ parse_command_line (int a_argc, char **a_argv, struct Options *a_options);
+
+static enum CRStatus
+ test_cr_input_read_char (guchar * a_file_uri);
+
+/**
+ *Displays the usage of the test
+ *facility.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_help (char *prg_name)
+{
+ g_print ("\n\n");
+ g_print ("usage: %s <file-to-parse>\n", prg_name);
+ g_print ("\t <file-to-parse>: the file to parse\n");
+ g_print ("\n\n");
+ g_print ("This test just reads the file character per character\nand sends each character to stdout\n");
+ g_print ("\n\n");
+}
+
+/**
+ *Displays the about text.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_about (char *prg_name)
+{
+ g_print ("\n\n");
+ g_print ("%s is a libcroco CRInput class test program.\n", prg_name);
+ g_print ("It should run on GNU compliants systems.\n");
+ g_print ("\n\n");
+ g_print ("Initial author: Dodji Seketeli <dodji@seketeli.org>.\n");
+ g_print ("\n\n");
+}
+
+/**
+ *Parses the command line and updates an abstract "options" data structure.
+ *@param a_argc the argc variable passed to the main function by the OS.
+ *@param a_argv the argv variable passed to the main function by the OS.
+ *@param a_options out parameter. The abstraction of the parsed the options.
+ */
+static void
+parse_command_line (int a_argc, char **a_argv, struct Options *a_options)
+{
+ int i = 0;
+
+ g_return_if_fail (a_options);
+
+ memset (a_options, 0, sizeof (struct Options));
+
+ for (i = 1; i < a_argc; i++) {
+ if (a_argv[i][0] != '-')
+ break;
+
+ if (!strcmp (a_argv[i], "-h")
+ || !strcmp (a_argv[i], "--help")) {
+ a_options->display_help = TRUE;
+ }
+ if (!strcmp (a_argv[i], "--about")) {
+ a_options->display_about = TRUE;
+ }
+ }
+
+ if (i >= a_argc) {
+ /*No file parameter where given */
+ a_options->files_list = NULL;
+ } else {
+ a_options->files_list = &a_argv[i];
+ }
+}
+
+/**
+ *The test of the cr_input_read_byte() method.
+ *Reads the each byte of a_file_uri using the
+ *cr_input_read_byte() method. Each byte is send to
+ *stdout.
+ *@param a_file_uri the file to read.
+ *@return CR_OK upon successful completion of the
+ *function, an error code otherwise.
+ */
+enum CRStatus
+test_cr_input_read_char (guchar * a_file_uri)
+{
+ enum CRStatus status = CR_OK;
+ CRInput *input = NULL;
+ guint32 c = 0;
+
+ g_return_val_if_fail (a_file_uri, CR_BAD_PARAM_ERROR);
+
+ input = cr_input_new_from_uri ((const gchar *) a_file_uri, CR_UTF_8);
+
+ if (!input) {
+ cr_utils_trace_debug ("Input Stream creation failed.");
+ return CR_ERROR;
+ }
+
+ for (status = CR_OK; status == CR_OK;) {
+ status = cr_input_read_char (input, &c);
+
+ if (status == CR_OK) {
+ printf ("%c", c);
+ fflush (stdout);
+ }
+ }
+
+ if (status == CR_END_OF_INPUT_ERROR) {
+ status = CR_OK;
+ }
+
+ cr_input_destroy (input);
+ input = NULL;
+
+ return status;
+}
+
+/**
+ *The entry point of the testing routine.
+ */
+int
+main (int argc, char **argv)
+{
+ struct Options options;
+
+ parse_command_line (argc, argv, &options);
+
+ if (options.display_help == TRUE) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ if (options.display_about == TRUE) {
+ display_about (argv[0]);
+ return 0;
+ }
+
+ if (options.files_list == NULL) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ test_cr_input_read_char ((guchar *) options.files_list[0]);
+
+ return 0;
+}
diff --git a/src/3rdparty/libcroco/tests/test2-main.c b/src/3rdparty/libcroco/tests/test2-main.c
new file mode 100644
index 0000000..5268ed3
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test2-main.c
@@ -0,0 +1,564 @@
+/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms
+ * of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the
+ * GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * See COPYRIGHTS file for copyright information.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include "cr-test-utils.h"
+#include "cr-parser.h"
+
+/**
+ *@file
+ *Some test facilities for the #CRParser class.
+ */
+
+CRDocHandler *gv_test_handler = { 0 };
+
+static void
+ display_help (char *prg_name);
+
+static void
+ display_about (char *prg_name);
+
+static enum CRStatus
+ test_cr_parser_parse (guchar * a_file_uri);
+
+/**
+ *Displays the usage of the test
+ *facility.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_help (char *prg_name)
+{
+ fprintf (stdout, "\n\n");
+ fprintf (stdout, "usage: %s <file-to-parse>\n", prg_name);
+ fprintf (stdout, "\t <file-to-parse>: the file to parse\n");
+ fprintf (stdout, "\n\n");
+ fprintf (stdout, "Tests the cr_parser_parse () method.\n");
+ fprintf (stdout, "Returns OK if the status is CR_OK, KO otherwise\n");
+ fprintf (stdout, "\n\n");
+}
+
+/**
+ *Displays the about text.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_about (char *prg_name)
+{
+ fprintf (stdout, "\n\n");
+ fprintf (stdout, "%s is a libcroco CRParser class test program.\n",
+ prg_name);
+ fprintf (stdout, "It should run on GNU compliants systems.\n");
+ fprintf (stdout, "\n\n");
+ fprintf (stdout,
+ "Initial author: Dodji Seketeli <dodji@seketeli.org>.\n");
+ fprintf (stdout, "\n\n");
+}
+
+/***************************
+ *Some SAC document handlers
+ *for TEST PURPOSES.
+ ***************************/
+
+static void
+test_start_document (CRDocHandler * a_handler)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_document\n");
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_end_document (CRDocHandler * a_handler)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_document\n");
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_import_style (CRDocHandler * a_handler,
+ GList * a_media_list,
+ CRString * a_uri,
+ CRString * a_uri_default_ns,
+ CRParsingLocation *a_location)
+{
+ (void) a_uri;
+
+ g_return_if_fail (a_handler) ;
+
+ fprintf (stdout, "****************\n");
+ fprintf (stdout, "import_style\n");
+
+ if (a_media_list) {
+ GList *cur = NULL;
+
+ fprintf (stdout, "\nmedia list:\n");
+ fprintf (stdout, "-------------\n");
+
+ for (cur = a_media_list; cur; cur = cur->next) {
+ if (cur->data) {
+ gchar *str =
+ g_strndup
+ (((CRString *) cur->data)->stryng->str,
+ ((CRString *) cur->data)->stryng->len);
+
+ if (str) {
+ fprintf (stdout, "%s\n", str);
+ g_free (str);
+ str = NULL;
+ }
+ }
+ }
+
+ fprintf (stdout, "\ndefault namespace:\n");
+ fprintf (stdout, "--------------------\n");
+
+ if (a_uri_default_ns) {
+ guchar *str = (guchar *) cr_string_dup2
+ (a_uri_default_ns) ;
+ if (str) {
+ fprintf (stdout, "%s\n", str);
+ g_free (str);
+ str = NULL;
+ }
+ }
+ }
+
+ fprintf (stdout, "******************\n\n");
+ a_uri = NULL; /*keep compiler happy */
+}
+
+static void
+test_namespace_declaration (CRDocHandler * a_handler,
+ CRString * a_prefix,
+ CRString * a_uri,
+ CRParsingLocation *a_location)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "namespace_declaration:\n");
+
+ if (a_prefix) {
+ gchar *prefix = NULL;
+
+ prefix = cr_string_dup2 (a_prefix) ;
+ if (prefix) {
+ fprintf (stdout, "prefix: %s\n", prefix);
+ g_free (prefix);
+ prefix = NULL;
+ }
+ }
+ if (a_uri) {
+ gchar *uri = NULL;
+
+ uri = cr_string_dup2 (a_uri) ;
+ if (uri) {
+ fprintf (stdout, "uri: %s\n", uri);
+ g_free (uri);
+ uri = NULL;
+ }
+ }
+ fprintf (stdout, "\n");
+
+ fprintf (stdout, "***************\n\n");
+
+}
+
+static void
+test_comment (CRDocHandler * a_handler,
+ CRString * a_comment)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "comment:\n");
+ if (a_comment) {
+ gchar *comment = NULL;
+
+ comment = cr_string_dup2 (a_comment);
+
+ if (comment) {
+ fprintf (stdout, "\n/*----------------------\n");
+ fprintf (stdout, "%s\n", comment);
+ fprintf (stdout, "-------------------------*/\n");
+ g_free (comment);
+ comment = NULL;
+ }
+ }
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_start_selector (CRDocHandler * a_handler,
+ CRSelector * a_selector_list)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_selector\n");
+
+ if (a_selector_list) {
+ cr_selector_dump (a_selector_list, stdout);
+ fprintf (stdout, "\n");
+ }
+
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_end_selector (CRDocHandler * a_handler,
+ CRSelector * a_selector_list)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_selector\n");
+
+ if (a_selector_list) {
+ cr_selector_dump (a_selector_list, stdout);
+ fprintf (stdout, "\n");
+ }
+
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_property (CRDocHandler * a_handler,
+ CRString * a_name,
+ CRTerm * a_expr,
+ gboolean a_important)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "property\n");
+
+ if (a_name
+ && a_name->stryng
+ && a_name->stryng->str) {
+ gchar *name = g_strndup
+ (a_name->stryng->str,
+ a_name->stryng->len);
+
+ if (name) {
+ fprintf (stdout, "%s", name);
+ }
+ if (a_expr) {
+ fprintf (stdout, ": ");
+ cr_term_dump (a_expr, stdout);
+ }
+ if (name) {
+ g_free (name);
+ name = NULL;
+ }
+ fprintf (stdout, "\n");
+ }
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_start_font_face (CRDocHandler * a_handler,
+ CRParsingLocation *a_location)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_font_face\n");
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_end_font_face (CRDocHandler * a_handler)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_font_face\n");
+ fprintf (stdout, "***************\n\n");
+
+}
+
+static void
+test_start_media (CRDocHandler * a_handler,
+ GList * a_media_list,
+ CRParsingLocation *a_location)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_media\n");
+
+ if (a_media_list) {
+ GList *cur = NULL;
+ gchar *medium = NULL;
+
+ for (cur = a_media_list; cur; cur = cur->next) {
+ if (cur->data == NULL)
+ continue;
+ medium = cr_string_dup2
+ ((CRString *) cur->data);
+ if (medium == NULL)
+ continue;
+ fprintf (stdout, "medium: %s\n", medium);
+ if (medium) {
+ g_free (medium);
+ medium = NULL;
+ }
+ }
+ }
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_end_media (CRDocHandler * a_handler,
+ GList * a_media_list)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_media\n");
+
+ if (a_media_list) {
+ GList *cur = NULL;
+ gchar *medium = NULL;
+
+ for (cur = a_media_list; cur; cur = cur->next) {
+ if (cur->data == NULL)
+ continue;
+
+ medium = g_strndup (((CRString *) cur->data)->stryng->str,
+ ((CRString *) cur->data)->stryng->len);
+ if (medium == NULL)
+ continue;
+ fprintf (stdout, "medium: %s\n", medium);
+ if (medium) {
+ g_free (medium);
+ medium = NULL;
+ }
+ }
+ }
+
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_start_page (CRDocHandler * a_handler,
+ CRString * a_name,
+ CRString * a_pseudo_page,
+ CRParsingLocation *a_location)
+{
+ gchar *name = NULL,
+ *pseudo_page = NULL;
+
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_page\n");
+
+ if (a_name) {
+ name = cr_string_dup2 (a_name) ;
+ }
+ if (a_pseudo_page) {
+ pseudo_page = cr_string_dup2 (a_pseudo_page);
+ }
+ if (name) {
+ fprintf (stdout, "%s", name);
+ }
+ if (pseudo_page) {
+ fprintf (stdout, ": %s\n", pseudo_page);
+ }
+ fprintf (stdout, "***************\n\n");
+ if (name) {
+ g_free (name);
+ name = NULL;
+ }
+ if (pseudo_page) {
+ g_free (pseudo_page);
+ pseudo_page = NULL;
+ }
+}
+
+static void
+test_end_page (CRDocHandler * a_handler,
+ CRString * a_name,
+ CRString * a_pseudo_page)
+{
+ gchar *name = NULL,
+ *pseudo_page = NULL;
+
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_page\n");
+
+ if (a_name) {
+ name = cr_string_dup2 (a_name) ;
+ }
+ if (a_pseudo_page) {
+ pseudo_page = cr_string_dup2 (a_pseudo_page) ;
+ }
+ if (name) {
+ fprintf (stdout, "%s", name);
+ }
+ if (pseudo_page) {
+ fprintf (stdout, ": %s\n", pseudo_page);
+
+ }
+ fprintf (stdout, "***************\n\n");
+ if (name) {
+ g_free (name);
+ name = NULL;
+ }
+ if (pseudo_page) {
+ g_free (pseudo_page);
+ pseudo_page = NULL;
+ }
+}
+
+static void
+test_ignorable_at_rule (CRDocHandler * a_handler,
+ CRString * a_name)
+{
+ gchar *name = NULL;
+
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "*********************\n");
+ fprintf (stdout, "ignorable_at_rule\n");
+
+ if (a_name) {
+ name = cr_string_dup2 (a_name);
+ }
+ if (name) {
+ fprintf (stdout, "%s\n", name);
+ }
+ fprintf (stdout, "*********************\n\n");
+}
+
+static void
+init_test_sac_handler (CRDocHandler * a_handler)
+{
+ a_handler->start_document = test_start_document;
+ a_handler->end_document = test_end_document;
+ a_handler->import_style = test_import_style;
+ a_handler->namespace_declaration = test_namespace_declaration;
+ a_handler->comment = test_comment;
+ a_handler->start_selector = test_start_selector;
+ a_handler->end_selector = test_end_selector;
+ a_handler->property = test_property;
+ a_handler->start_font_face = test_start_font_face;
+ a_handler->end_font_face = test_end_font_face;
+ a_handler->start_media = test_start_media;
+ a_handler->end_media = test_end_media;
+ a_handler->start_page = test_start_page;
+ a_handler->end_page = test_end_page;
+ a_handler->ignorable_at_rule = test_ignorable_at_rule;
+}
+
+/***************************
+ *END of TEST SAC document
+ *handlers.
+ ***************************/
+
+/**
+ *The test of the cr_input_read_byte() method.
+ *Reads the each byte of a_file_uri using the
+ *cr_input_read_byte() method. Each byte is send to
+ *stdout.
+ *@param a_file_uri the file to read.
+ *@return CR_OK upon successful completion of the
+ *function, an error code otherwise.
+ */
+static enum CRStatus
+test_cr_parser_parse (guchar * a_file_uri)
+{
+ enum CRStatus status = CR_OK;
+ CRParser *parser = NULL;
+
+ g_return_val_if_fail (a_file_uri, CR_BAD_PARAM_ERROR);
+
+ gv_test_handler = cr_doc_handler_new ();
+ init_test_sac_handler (gv_test_handler);
+
+ parser = cr_parser_new (NULL);
+
+ status = cr_parser_set_sac_handler (parser, gv_test_handler);
+
+ if (status != CR_OK) {
+ cr_parser_destroy (parser);
+ g_return_val_if_fail (status == CR_OK, CR_ERROR);
+ }
+
+ status = cr_parser_parse_file (parser, a_file_uri, CR_ASCII);
+
+ cr_parser_destroy (parser);
+
+ gv_test_handler = NULL;
+
+ return status;
+}
+
+/**
+ *The entry point of the testing routine.
+ */
+int
+main (int argc, char **argv)
+{
+ struct Options options;
+ enum CRStatus status = CR_OK;
+
+ cr_test_utils_parse_cmd_line (argc, argv, &options);
+
+ if (options.display_help == TRUE) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ if (options.display_about == TRUE) {
+ display_about (argv[0]);
+ return 0;
+ }
+
+ if (options.files_list == NULL) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ status = test_cr_parser_parse ((guchar *) options.files_list[0]);
+
+ if (status != CR_OK) {
+ fprintf (stdout, "KO\n");
+ }
+
+ return 0;
+}
diff --git a/src/3rdparty/libcroco/tests/test3-main.c b/src/3rdparty/libcroco/tests/test3-main.c
new file mode 100644
index 0000000..1979778
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test3-main.c
@@ -0,0 +1,545 @@
+/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * Author: Dodji Seketeli
+ * See COPYRIGHTS file for copyright information.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include "cr-test-utils.h"
+#include "cr-parser.h"
+
+/**
+ *@file
+ *Some test facilities for the #CRParser class.
+ */
+
+CRDocHandler *gv_test_handler = { 0 };
+
+static void display_help (char *prg_name);
+
+static void display_about (char *prg_name);
+
+static enum CRStatus test_cr_parser_parse (guchar * a_file_uri);
+
+/**
+ *Displays the usage of the test
+ *facility.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_help (char *prg_name)
+{
+ fprintf (stdout, "\n\n");
+ fprintf (stdout, "usage: %s <file-to-parse>\n", prg_name);
+ fprintf (stdout, "\t <file-to-parse>: the file to parse\n");
+ fprintf (stdout, "\n\n");
+ fprintf (stdout, "Tests the cr_parser_parse () method.\n");
+ fprintf (stdout, "Tests the parsing following the css core syntax\n");
+ fprintf (stdout, "Returns OK if the status is CR_OK, KO otherwise\n");
+ fprintf (stdout, "\n\n");
+}
+
+/**
+ *Displays the about text.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_about (char *prg_name)
+{
+ fprintf (stdout, "\n\n");
+ fprintf (stdout, "%s is a libcroco CRParser class test program.\n",
+ prg_name);
+ fprintf (stdout, "It should run on GNU compliants systems.\n");
+ fprintf (stdout, "\n\n");
+ fprintf (stdout,
+ "Initial author: Dodji Seketeli <dodji@seketeli.org>.\n");
+ fprintf (stdout, "\n\n");
+}
+
+/***************************
+ *Some SAC document handlers
+ *for TEST PURPOSES.
+ ***************************/
+
+static void
+test_start_document (CRDocHandler * a_handler)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_document\n");
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_end_document (CRDocHandler * a_handler)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_document\n");
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_import_style (CRDocHandler * a_handler,
+ GList * a_media_list, CRString * a_uri,
+ CRString * a_uri_default_ns,
+ CRParsingLocation *a_location)
+{
+ g_return_if_fail (a_handler);
+
+ (void) a_uri;
+
+ fprintf (stdout, "****************\n");
+ fprintf (stdout, "import_style\n");
+
+ if (a_media_list) {
+ GList *cur = NULL;
+
+ fprintf (stdout, "\nmedia list:\n");
+ fprintf (stdout, "-------------\n");
+
+ for (cur = a_media_list; cur; cur = cur->next) {
+ if (cur->data) {
+ gchar *str =
+ cr_string_dup2 ((CRString *) cur->data);
+ if (str) {
+ fprintf (stdout, "%s\n", str);
+ g_free (str);
+ str = NULL;
+ }
+ }
+ }
+ fprintf (stdout, "\ndefault namespace:\n");
+ fprintf (stdout, "--------------------\n");
+
+ if (a_uri_default_ns) {
+ gchar *str = cr_string_dup2 (a_uri_default_ns) ;
+ if (str) {
+ fprintf (stdout, "%s\n", str);
+ g_free (str);
+ str = NULL;
+ }
+ }
+ }
+
+ fprintf (stdout, "******************\n\n");
+ a_uri = NULL; /*keep compiler happy */
+}
+
+static void
+test_namespace_declaration (CRDocHandler * a_handler,
+ CRString * a_prefix,
+ CRString * a_uri,
+ CRParsingLocation *a_location)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "namespace_declaration:\n");
+
+ if (a_prefix) {
+ gchar *prefix = NULL;
+
+ prefix = cr_string_dup2 (a_prefix);
+ if (prefix) {
+ fprintf (stdout, "prefix: %s\n", prefix);
+ g_free (prefix);
+ prefix = NULL;
+ }
+ }
+
+ if (a_uri) {
+ gchar *uri = NULL;
+ uri = cr_string_dup2 (a_uri) ;
+ if (uri) {
+ fprintf (stdout, "uri: %s\n", uri);
+ g_free (uri);
+ uri = NULL;
+ }
+ }
+ fprintf (stdout, "\n");
+
+ fprintf (stdout, "***************\n\n");
+
+}
+
+static void
+test_comment (CRDocHandler * a_handler,
+ CRString * a_comment)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "comment:\n");
+
+ if (a_comment) {
+ gchar *comment = NULL;
+
+ comment = cr_string_dup2 (a_comment);
+
+ if (comment) {
+ fprintf (stdout, "\n/*----------------------\n");
+ fprintf (stdout, "%s\n", comment);
+ fprintf (stdout, "-------------------------*/\n");
+ g_free (comment);
+ comment = NULL;
+ }
+ }
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_start_selector (CRDocHandler * a_handler,
+ CRSelector * a_selector_list)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_selector\n");
+
+ if (a_selector_list) {
+ cr_selector_dump (a_selector_list, stdout);
+ fprintf (stdout, "\n");
+ }
+
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_end_selector (CRDocHandler * a_handler,
+ CRSelector * a_selector_list)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_selector\n");
+
+ if (a_selector_list) {
+ cr_selector_dump (a_selector_list, stdout);
+ fprintf (stdout, "\n");
+ }
+
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_property (CRDocHandler * a_handler, CRString * a_name,
+ CRTerm * a_expr, gboolean a_important)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "property\n");
+
+ if (a_name) {
+ gchar *name = cr_string_dup2 (a_name);
+ if (name) {
+ fprintf (stdout, "%s", name);
+ }
+ if (a_expr) {
+ fprintf (stdout, ": ");
+ cr_term_dump (a_expr, stdout);
+ }
+ if (name) {
+ g_free (name);
+ name = NULL;
+ }
+ fprintf (stdout, "\n");
+ }
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_start_font_face (CRDocHandler * a_handler,
+ CRParsingLocation *a_location)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_font_face\n");
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_end_font_face (CRDocHandler * a_handler)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_font_face\n");
+ fprintf (stdout, "***************\n\n");
+
+}
+
+static void
+test_start_media (CRDocHandler * a_handler,
+ GList * a_media_list,
+ CRParsingLocation *a_location)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_media\n");
+
+ if (a_media_list) {
+ GList *cur = NULL;
+ gchar *medium = NULL;
+
+ for (cur = a_media_list; cur; cur = cur->next) {
+ if (cur->data == NULL)
+ continue;
+ medium = cr_string_dup2 ((CRString *) cur->data);
+ if (medium == NULL)
+ continue;
+ fprintf (stdout, "medium: %s\n", medium);
+ if (medium) {
+ g_free (medium);
+ medium = NULL;
+ }
+ }
+ }
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_end_media (CRDocHandler * a_handler,
+ GList * a_media_list)
+{
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_media\n");
+
+ if (a_media_list) {
+ GList *cur = NULL;
+ gchar *medium = NULL;
+
+ for (cur = a_media_list; cur; cur = cur->next) {
+ if (cur->data == NULL)
+ continue;
+ medium = cr_string_dup2 ((CRString *) cur->data);
+ if (medium == NULL)
+ continue;
+ fprintf (stdout, "medium: %s\n", medium);
+ if (medium) {
+ g_free (medium);
+ medium = NULL;
+ }
+ }
+ }
+ fprintf (stdout, "***************\n\n");
+}
+
+static void
+test_start_page (CRDocHandler * a_handler,
+ CRString * a_name,
+ CRString * a_pseudo_page,
+ CRParsingLocation *a_location)
+{
+ gchar *name = NULL,
+ *pseudo_page = NULL;
+
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "start_page\n");
+
+ if (a_name) {
+ name = cr_string_dup2 (a_name);
+ }
+ if (a_pseudo_page) {
+ pseudo_page = cr_string_dup2 (a_pseudo_page);
+ }
+ if (name) {
+ fprintf (stdout, "%s", name);
+ }
+ if (pseudo_page) {
+ fprintf (stdout, ": %s\n", pseudo_page);
+ }
+ fprintf (stdout, "***************\n\n");
+ if (name) {
+ g_free (name);
+ name = NULL;
+ }
+ if (pseudo_page) {
+ g_free (pseudo_page);
+ pseudo_page = NULL;
+ }
+}
+
+static void
+test_end_page (CRDocHandler * a_handler,
+ CRString * a_name,
+ CRString * a_pseudo_page)
+{
+ gchar *name = NULL,
+ *pseudo_page = NULL;
+
+ g_return_if_fail (a_handler);
+ fprintf (stdout, "***************\n");
+ fprintf (stdout, "end_page\n");
+
+ if (a_name) {
+ name = cr_string_dup2 (a_name);
+ }
+ if (a_pseudo_page) {
+ pseudo_page = cr_string_dup2 (a_pseudo_page) ;
+ }
+ if (name) {
+ fprintf (stdout, "%s", name);
+ }
+ if (pseudo_page) {
+ fprintf (stdout, ": %s\n", pseudo_page);
+
+ }
+ fprintf (stdout, "***************\n\n");
+ if (name) {
+ g_free (name);
+ name = NULL;
+ }
+ if (pseudo_page) {
+ g_free (pseudo_page);
+ pseudo_page = NULL;
+ }
+}
+
+static void
+test_ignorable_at_rule (CRDocHandler * a_handler,
+ CRString * a_name)
+{
+ gchar *name = NULL;
+
+ g_return_if_fail (a_handler);
+
+ fprintf (stdout, "*********************\n");
+ fprintf (stdout, "ignorable_at_rule\n");
+
+ if (a_name) {
+ name = cr_string_dup2 (a_name);
+ }
+ if (name) {
+ fprintf (stdout, "%s\n", name);
+ }
+ fprintf (stdout, "*********************\n\n");
+}
+
+static void
+init_test_sac_handler (CRDocHandler * a_handler)
+{
+ a_handler->start_document = test_start_document;
+ a_handler->end_document = test_end_document;
+ a_handler->import_style = test_import_style;
+ a_handler->namespace_declaration = test_namespace_declaration;
+ a_handler->comment = test_comment;
+ a_handler->start_selector = test_start_selector;
+ a_handler->end_selector = test_end_selector;
+ a_handler->property = test_property;
+ a_handler->start_font_face = test_start_font_face;
+ a_handler->end_font_face = test_end_font_face;
+ a_handler->start_media = test_start_media;
+ a_handler->end_media = test_end_media;
+ a_handler->start_page = test_start_page;
+ a_handler->end_page = test_end_page;
+ a_handler->ignorable_at_rule = test_ignorable_at_rule;
+}
+
+/***************************
+ *END of TEST SAC document
+ *handlers.
+ ***************************/
+
+/**
+ *The test of the cr_input_read_byte() method.
+ *Reads the each byte of a_file_uri using the
+ *cr_input_read_byte() method. Each byte is send to
+ *stdout.
+ *@param a_file_uri the file to read.
+ *@return CR_OK upon successful completion of the
+ *function, an error code otherwise.
+ */
+static enum CRStatus
+test_cr_parser_parse (guchar * a_file_uri)
+{
+ enum CRStatus status = CR_OK;
+ CRParser *parser = NULL;
+
+ g_return_val_if_fail (a_file_uri, CR_BAD_PARAM_ERROR);
+
+ gv_test_handler = cr_doc_handler_new ();
+ init_test_sac_handler (gv_test_handler);
+
+ parser = cr_parser_new (NULL);
+
+ status = cr_parser_set_sac_handler (parser, gv_test_handler);
+
+ if (status != CR_OK) {
+ cr_parser_destroy (parser);
+ g_return_val_if_fail (status == CR_OK, CR_ERROR);
+ }
+
+ status = cr_parser_set_use_core_grammar (parser, TRUE);
+ status = cr_parser_parse_file (parser, a_file_uri, CR_ASCII);
+
+ cr_parser_destroy (parser);
+
+ gv_test_handler = NULL;
+
+ return status;
+}
+
+/**
+ *The entry point of the testing routine.
+ */
+int
+main (int argc, char **argv)
+{
+ struct Options options;
+ enum CRStatus status = CR_OK;
+
+ cr_test_utils_parse_cmd_line (argc, argv, &options);
+
+ if (options.display_help == TRUE) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ if (options.display_about == TRUE) {
+ display_about (argv[0]);
+ return 0;
+ }
+
+ if (options.files_list == NULL) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ status = test_cr_parser_parse ((guchar *) options.files_list[0]);
+
+ if (status != CR_OK) {
+ fprintf (stdout, "KO\n");
+ }
+
+ return 0;
+}
diff --git a/src/3rdparty/libcroco/tests/test4-main.c b/src/3rdparty/libcroco/tests/test4-main.c
new file mode 100644
index 0000000..5cca6ef
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test4-main.c
@@ -0,0 +1,435 @@
+/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * Author: Dodji Seketeli
+ * See COPYRIGHTS file for copyrights information.
+ */
+
+
+#include "cr-test-utils.h"
+#include "libcroco.h"
+
+/**
+ *@file
+ *Some test facilities for the #CROMParser class.
+ */
+
+CRDocHandler *gv_test_handler = { 0 };
+
+const guchar *gv_term_buf = (const guchar *) "106";
+
+const guchar *gv_decl_buf = (const guchar *) "toto: tutu, tata";
+
+const guchar *gv_decl_list_buf = (const guchar *) "toto: titi; prop1:val1 ; prop2:val2;";
+
+const guchar *gv_ruleset_buf = (const guchar *) "s1 > s2 {toto: tutu, tata} ";
+
+const guchar *gv_at_media_buf =
+ (const guchar *) "@media print, toto {" " BODY { font-size: 10pt }" " }";
+
+const guchar *gv_at_page_buf = (const guchar *) "@page { size :8.5in 11in; margin: 2cm }";
+
+const guchar *gv_at_charset_buf = (const guchar *) "@charset \"ISO-8859-1\" ; ";
+
+const guchar *gv_at_font_face_buf =
+ (const guchar *) "@font-face {"
+ " font-family: \"Robson Celtic\";"
+ " src: url(\"http://site/fonts/rob-celt\")" "}";
+
+const guchar *gv_at_import_buf = (const guchar *) "@import \"subs.css\";";
+
+static void display_help (char *prg_name);
+
+static void display_about (char *prg_name);
+
+static enum CRStatus test_cr_parser_parse (guchar * a_file_uri);
+
+/**
+ *Displays the usage of the test
+ *facility.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_help (char *prg_name)
+{
+ g_print ("\n\n");
+ g_print ("usage: %s <file-to-parse>\n", prg_name);
+ g_print ("\t <file-to-parse>: the file to parse\n");
+ g_print ("\n\n");
+ g_print ("Tests the cr_parser_parse () method.\n");
+ g_print ("Tests the parsing following the css core syntax\n");
+ g_print ("Returns OK if the status is CR_OK, KO otherwise\n");
+ g_print ("\n\n");
+}
+
+/**
+ *Displays the about text.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_about (char *prg_name)
+{
+ g_print ("\n\n");
+ g_print ("%s is a libcroco CROMParser class test program.\n",
+ prg_name);
+ g_print ("%s Parses a file and builds a CSS object model", prg_name);
+ g_print ("It should run on GNU compliants systems.\n");
+ g_print ("\n\n");
+ g_print ("Initial author: Dodji Seketeli <dodji@seketeli.org>.\n");
+ g_print ("\n\n");
+}
+
+/**
+ *The test of the cr_input_read_byte() method.
+ *Reads the each byte of a_file_uri using the
+ *cr_input_read_byte() method. Each byte is send to
+ *stdout.
+ *@param a_file_uri the file to read.
+ *@return CR_OK upon successful completion of the
+ *function, an error code otherwise.
+ */
+static enum CRStatus
+test_cr_parser_parse (guchar * a_file_uri)
+{
+ enum CRStatus status = CR_OK;
+ CROMParser *parser = NULL;
+ CRStyleSheet *stylesheet = NULL;
+
+ g_return_val_if_fail (a_file_uri, CR_BAD_PARAM_ERROR);
+
+ parser = cr_om_parser_new (NULL);
+ status = cr_om_parser_parse_file (parser, a_file_uri, CR_ASCII,
+ &stylesheet);
+ if (status == CR_OK && stylesheet) {
+ cr_stylesheet_dump (stylesheet, stdout);
+ cr_stylesheet_destroy (stylesheet);
+ }
+ cr_om_parser_destroy (parser);
+
+ return status;
+}
+
+static enum CRStatus
+test_cr_statement_at_page_rule_parse_from_buf (void)
+{
+ CRStatement *stmt = NULL ;
+
+ stmt = cr_statement_at_page_rule_parse_from_buf
+ (gv_at_page_buf, CR_UTF_8) ;
+ if (!stmt) {
+ return CR_ERROR ;
+ }
+ cr_statement_destroy (stmt) ;
+ return CR_OK ;
+}
+
+static enum CRStatus
+test_cr_term_parse_expression_from_buf (void)
+{
+ guchar *tmp_str = NULL;
+ CRTerm *term = NULL;
+
+ term = cr_term_parse_expression_from_buf (gv_term_buf, CR_UTF_8);
+
+ if (!term)
+ return CR_ERROR;
+ tmp_str = cr_term_to_string (term);
+ if (term) {
+ cr_term_destroy (term);
+ term = NULL;
+ }
+ if (tmp_str) {
+ g_free (tmp_str);
+ tmp_str = NULL;
+ }
+ return CR_OK;
+}
+
+static enum CRStatus
+test_cr_declaration_parse (void)
+{
+ gchar *tmp_str = NULL;
+ CRDeclaration *decl = NULL;
+
+ decl = cr_declaration_parse_from_buf (NULL, gv_decl_buf, CR_UTF_8);
+ if (!decl)
+ return CR_ERROR;
+ tmp_str = cr_declaration_to_string (decl, 2);
+
+ if (decl) {
+ cr_declaration_destroy (decl);
+ }
+
+ if (tmp_str) {
+ g_free (tmp_str);
+ tmp_str = NULL;
+ }
+
+ return CR_OK;
+}
+
+static enum CRStatus
+test_cr_declaration_parse_list (void)
+{
+ GString *str = NULL;
+ gchar *tmp_str = NULL;
+ CRDeclaration *decl = NULL,
+ *cur_decl = NULL;
+
+ decl = cr_declaration_parse_list_from_buf (gv_decl_list_buf,
+ CR_UTF_8);
+ if (!decl)
+ return CR_ERROR;
+ str = g_string_new (NULL);
+ for (cur_decl = decl; cur_decl; cur_decl = cur_decl->next) {
+ tmp_str = cr_declaration_to_string (cur_decl, 2);
+ if (tmp_str) {
+ g_string_append_printf (str, "%s;", tmp_str);
+ g_free (tmp_str);
+ tmp_str = NULL;
+ }
+
+ }
+ if (decl) {
+ cr_declaration_destroy (decl);
+ }
+
+ if (str) {
+ g_string_free (str, TRUE);
+ str = NULL;
+ }
+
+ return CR_OK;
+}
+
+static enum CRStatus
+test_cr_statement_ruleset_parse (void)
+{
+ CRStatement *stmt = NULL;
+
+ stmt = cr_statement_ruleset_parse_from_buf (gv_ruleset_buf, CR_UTF_8);
+ g_return_val_if_fail (stmt, CR_ERROR);
+
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ }
+ return CR_OK;
+}
+
+static enum CRStatus
+test_cr_statement_at_media_rule_parse (void)
+{
+ CRStatement *stmt = NULL;
+
+ stmt = cr_statement_at_media_rule_parse_from_buf (gv_at_media_buf,
+ CR_UTF_8);
+ g_return_val_if_fail (stmt, CR_ERROR);
+
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ }
+
+ return CR_OK;
+}
+
+
+static enum CRStatus
+test_cr_statement_at_charset_rule_parse (void)
+{
+ CRStatement *stmt = NULL;
+
+ stmt = cr_statement_at_charset_rule_parse_from_buf (gv_at_charset_buf,
+ CR_UTF_8);
+ g_return_val_if_fail (stmt, CR_ERROR);
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ }
+
+ return CR_OK;
+}
+
+static enum CRStatus
+test_cr_statement_font_face_rule_parse_from_buf (void)
+{
+ CRStatement *stmt = NULL;
+
+ stmt = cr_statement_font_face_rule_parse_from_buf
+ (gv_at_font_face_buf, CR_UTF_8);
+ g_return_val_if_fail (stmt, CR_ERROR);
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ }
+
+ return CR_OK;
+}
+
+static enum CRStatus
+test_cr_statement_at_import_rule_parse_from_buf (void)
+{
+ CRStatement *stmt = NULL;
+
+ stmt = cr_statement_at_import_rule_parse_from_buf (gv_at_import_buf,
+ CR_UTF_8);
+ g_return_val_if_fail (stmt, CR_ERROR);
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ }
+
+ return CR_OK;
+}
+
+static enum CRStatus
+test_cr_statement_parse_from_buf (void)
+{
+ CRStatement *stmt = NULL;
+
+ stmt = cr_statement_parse_from_buf (gv_ruleset_buf, CR_UTF_8);
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ } else {
+ return CR_ERROR;
+ }
+ stmt = cr_statement_parse_from_buf (gv_at_media_buf, CR_UTF_8);
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ } else {
+ return CR_ERROR;
+ }
+ stmt = cr_statement_parse_from_buf (gv_at_page_buf, CR_UTF_8);
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ } else {
+ return CR_ERROR;
+ }
+ stmt = cr_statement_parse_from_buf (gv_at_charset_buf, CR_UTF_8);
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ } else {
+ return CR_ERROR;
+ }
+ stmt = cr_statement_parse_from_buf (gv_at_font_face_buf, CR_UTF_8);
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ } else {
+ return CR_ERROR;
+ }
+ stmt = cr_statement_parse_from_buf (gv_at_import_buf, CR_UTF_8);
+ if (stmt) {
+ cr_statement_destroy (stmt);
+ stmt = NULL;
+ } else {
+ return CR_ERROR;
+ }
+
+ return CR_OK;
+}
+
+/**
+ *The entry point of the testing routine.
+ */
+int
+main (int argc, char **argv)
+{
+ struct Options options;
+ enum CRStatus status = CR_OK;
+
+ status = test_cr_term_parse_expression_from_buf ();
+ if (status != CR_OK) {
+ g_print ("\ntest \"cr_term_parse_expression_from_buf failed\"");
+ }
+ status = test_cr_declaration_parse ();
+ if (status != CR_OK) {
+ g_print ("\n test \"cr_declaration_parse() failed\"\n");
+ }
+
+ status = test_cr_declaration_parse_list ();
+ if (status != CR_OK) {
+ g_print ("\ntest cr_declaration_parse_list() failed\n");
+ }
+ status = test_cr_statement_ruleset_parse ();
+ if (status != CR_OK) {
+ g_print ("\ntest cr_statement_ruleset_parse() failed\n");
+ }
+
+ status = test_cr_statement_at_media_rule_parse ();
+ if (status != CR_OK) {
+ g_print ("\ntest cr_statement_at_media_rule_parse() failed\n");
+ }
+ test_cr_statement_at_page_rule_parse_from_buf ();
+ if (status != CR_OK) {
+ g_print ("\ntest cr_statement_at_page_rule_parse() failed\n");
+ return 0;
+ }
+
+ status = test_cr_statement_at_charset_rule_parse ();
+ if (status != CR_OK) {
+ g_print ("\ntest cr_statement_at_charset_rule_parse() failed\n");
+ }
+
+ status = test_cr_statement_font_face_rule_parse_from_buf ();
+ if (status != CR_OK) {
+ g_print ("\ntest cr_statement_font_face_rule_parse_from_buf() failed\n");
+ }
+
+ test_cr_statement_at_import_rule_parse_from_buf ();
+ if (status != CR_OK) {
+ g_print ("\ntest cr_statement_at_import_rule() failed\n");
+ }
+
+ status = test_cr_statement_parse_from_buf ();
+ if (status != CR_OK) {
+ g_print ("\ntest cr_statement_parse_from_buf() failed\n");
+ }
+
+ cr_test_utils_parse_cmd_line (argc, argv, &options);
+
+ if (options.display_help == TRUE) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ if (options.display_about == TRUE) {
+ display_about (argv[0]);
+ return 0;
+ }
+
+ if (options.files_list == NULL) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ status = test_cr_parser_parse ((guchar *) options.files_list[0]);
+ if (status != CR_OK) {
+ g_print ("\nKO\n");
+ }
+
+ return 0;
+}
diff --git a/src/3rdparty/libcroco/tests/test5-main.c b/src/3rdparty/libcroco/tests/test5-main.c
new file mode 100644
index 0000000..b10d0b8
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test5-main.c
@@ -0,0 +1,255 @@
+/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#include "cr-test-utils.h"
+#include "cr-libxml-node-iface.h"
+#include "libcroco.h"
+
+#include <libxml/tree.h>
+#include <string.h>
+
+/**
+ *@file
+ *Some test facilities for the #CRParser class.
+ */
+
+CRDocHandler *gv_test_handler = { 0 };
+
+const guchar *xml_content =
+ (const guchar *) "<document>"
+ "<E0>text0</E0> "
+ "<E1><E1-1>text1</E1-1></E1>"
+ "<E2 attr2=\"val2\">text2</E2>"
+ "<E3 attr3=\"val3_1 val3_2 val3_3\">text3</E3>"
+ "<E4 attr4=\"val4_1-val4_2-val4_3\">text4</E4>"
+ "<E5 class=\"class5\">text5</E5>"
+ "<E6 id=\"id6\">text6</E6>"
+ "<E7 lang=\"fr\">text7</E7>" "</document>";
+
+static void
+ display_help (char *prg_name);
+
+static void
+ display_about (char *prg_name);
+static enum CRStatus
+ test_sel_eng (guchar * a_file_uri);
+
+static void
+ walk_xml_tree_and_lookup_rules (CRSelEng * a_sel_eng,
+ CRStyleSheet * a_sheet, xmlNode * a_node);
+
+/**
+ *Displays the usage of the test
+ *facility.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_help (char *prg_name)
+{
+ g_print ("\n\n");
+ g_print ("usage: %s <file-to-parse>\n", prg_name);
+ g_print ("\t <file-to-parse>: the file to parse\n");
+ g_print ("\n\n");
+ g_print ("Test the selection engine");
+ g_print ("Returns OK if the status is CR_OK, KO otherwise\n");
+ g_print ("\n\n");
+}
+
+/**
+ *Displays the about text.
+ *@param a_argc the argc variable passed to the main function.
+ *@param a_argv the argv variable passed to the main function.
+ */
+static void
+display_about (char *prg_name)
+{
+ g_print ("\n\n");
+ g_print ("%s is a libcroco CROMParser class test program.\n",
+ prg_name);
+ g_print ("%s Parses a file and builds a CSS object model", prg_name);
+ g_print ("It should run on GNU compliants systems.\n");
+ g_print ("\n\n");
+ g_print ("Initial author: Dodji Seketeli <dodji@seketeli.org>.\n");
+ g_print ("\n\n");
+}
+
+static void
+walk_xml_tree_and_lookup_rules (CRSelEng * a_sel_eng,
+ CRStyleSheet * a_sheet, xmlNode * a_node)
+{
+ CRStatement **stmts_tab = NULL;
+ gulong tab_len = 0,
+ i = 0;
+ enum CRStatus status = CR_OK;
+
+ xmlNode *cur_node = a_node;
+
+ for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
+ status = cr_sel_eng_get_matched_rulesets
+ (a_sel_eng, a_sheet, cur_node, &stmts_tab, &tab_len);
+
+ if (status == CR_OK && tab_len) {
+ g_print ("'''''''''''''''''''''''''\n");
+ g_print ("xml start element: %s\n", cur_node->name);
+
+ for (i = 0; i < tab_len; i++) {
+ if (stmts_tab[i]) {
+ g_print ("\n");
+ cr_statement_dump (stmts_tab[i],
+ stdout, 2);
+ }
+ }
+ g_print ("\n\nxml end element: %s\n", cur_node->name);
+ g_print ("'''''''''''''''''''''''''\n");
+ }
+
+ if (stmts_tab) {
+ g_free (stmts_tab);
+ stmts_tab = NULL;
+ }
+ if (cur_node->children) {
+ walk_xml_tree_and_lookup_rules
+ (a_sel_eng, a_sheet, cur_node->children);
+ }
+ }
+}
+
+/**
+ *The test of the cr_input_read_byte() method.
+ *Reads the each byte of a_file_uri using the
+ *cr_input_read_byte() method. Each byte is send to
+ *stdout.
+ *@param a_file_uri the file to read.
+ *@return CR_OK upon successful completion of the
+ *function, an error code otherwise.
+ */
+static enum CRStatus
+test_sel_eng (guchar * a_file_uri)
+{
+ enum CRStatus status = CR_OK;
+ CROMParser *parser = NULL;
+ CRStyleSheet *stylesheet = NULL;
+ xmlDoc *xml_doc = NULL;
+ xmlNode *cur_node = NULL;
+ CRSelEng *selection_engine = NULL;
+
+ g_return_val_if_fail (a_file_uri, CR_BAD_PARAM_ERROR);
+
+ parser = cr_om_parser_new (NULL);
+ status = cr_om_parser_parse_file (parser, a_file_uri, CR_ASCII,
+ &stylesheet);
+ if (status != CR_OK || !stylesheet) {
+ cr_utils_trace_info ("Could not parse xml content");
+ goto error;
+ }
+
+ xml_doc = xmlParseMemory ((const char *) xml_content, strlen ((const char *) xml_content));
+ if (!xml_doc) {
+ cr_utils_trace_info ("Could not parse xml content");
+ goto error;
+
+ }
+
+ selection_engine = cr_sel_eng_new (&cr_libxml_node_iface);
+
+ cur_node = xml_doc->children;
+
+ walk_xml_tree_and_lookup_rules (selection_engine,
+ stylesheet, cur_node);
+
+ if (parser) {
+ cr_om_parser_destroy (parser);
+ parser = NULL;
+ }
+
+ if (xml_doc) {
+ xmlFreeDoc (xml_doc);
+ xml_doc = NULL;
+ }
+
+ if (stylesheet) {
+ cr_stylesheet_destroy (stylesheet);
+ stylesheet = NULL;
+ }
+ if (selection_engine) {
+ cr_sel_eng_destroy (selection_engine) ;
+ selection_engine = NULL ;
+ }
+ xmlCleanupParser ();
+ return status;
+
+ error:
+
+ if (parser) {
+ cr_om_parser_destroy (parser);
+ parser = NULL;
+ }
+
+ if (xml_doc) {
+ xmlFreeDoc (xml_doc);
+ xml_doc = NULL;
+ }
+
+ if (stylesheet) {
+ cr_stylesheet_destroy (stylesheet);
+ stylesheet = NULL;
+ }
+
+ xmlCleanupParser ();
+ return CR_ERROR;
+}
+
+/**
+ *The entry point of the testing routine.
+ */
+int
+main (int argc, char **argv)
+{
+ struct Options options;
+ enum CRStatus status = CR_OK;
+
+ cr_test_utils_parse_cmd_line (argc, argv, &options);
+
+ if (options.display_help == TRUE) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ if (options.display_about == TRUE) {
+ display_about (argv[0]);
+ return 0;
+ }
+
+ if (options.files_list == NULL) {
+ display_help (argv[0]);
+ return 0;
+ }
+
+ status = test_sel_eng ((guchar *) options.files_list[0]);
+
+ if (status != CR_OK) {
+ g_print ("\nKO\n");
+ }
+
+ return 0;
+}
diff --git a/src/3rdparty/libcroco/tests/test6-main.c b/src/3rdparty/libcroco/tests/test6-main.c
new file mode 100644
index 0000000..4372c5d
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test6-main.c
@@ -0,0 +1,84 @@
+/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms
+ * of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the
+ * GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+/*
+ *$Id$
+ */
+
+#include <string.h>
+#include "libcroco.h"
+#include "cr-test-utils.h"
+
+const guchar *gv_cssbuf =
+ (const guchar *) ".str0 {stroke:#007844;stroke-width:44}" ".fil0 {fill:url(#id0)}";
+
+static enum CRStatus
+ test_cr_parser_parse (void);
+
+/**
+ *The test of the cr_input_read_byte() method.
+ *Reads the each byte of a_file_uri using the
+ *cr_input_read_byte() method. Each byte is send to
+ *stdout.
+ *@param a_file_uri the file to read.
+ *@return CR_OK upon successful completion of the
+ *function, an error code otherwise.
+ */
+static enum CRStatus
+test_cr_parser_parse (void)
+{
+ enum CRStatus status = CR_OK;
+ CROMParser *parser = NULL;
+ CRStyleSheet *stylesheet = NULL;
+
+ parser = cr_om_parser_new (NULL);
+ status = cr_om_parser_parse_buf (parser, (guchar *) gv_cssbuf,
+ strlen ((const char *) gv_cssbuf),
+ CR_ASCII, &stylesheet);
+
+ if (status == CR_OK && stylesheet) {
+ cr_stylesheet_dump (stylesheet, stdout);
+ cr_stylesheet_destroy (stylesheet);
+ }
+ cr_om_parser_destroy (parser);
+
+ return status;
+}
+
+/**
+ *The entry point of the testing routine.
+ */
+int
+main (int argc, char **argv)
+{
+ enum CRStatus status = CR_OK;
+
+ status = test_cr_parser_parse ();
+
+ if (status != CR_OK) {
+ g_print ("\nKO\n");
+ }
+
+ return 0;
+}
diff --git a/src/3rdparty/libcroco/tests/test7-main.c b/src/3rdparty/libcroco/tests/test7-main.c
new file mode 100644
index 0000000..f740bea
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test7-main.c
@@ -0,0 +1,95 @@
+/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms
+ * of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the
+ * GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#include <string.h>
+#include "libcroco.h"
+#include "cr-test-utils.h"
+
+const guchar *gv_cssbuf =
+ (const guchar *) ".exp1n1 {stroke-width:4E6}"
+ ".exp1n2 {stroke-width:4e6}"
+ ".exp1n3 {stroke-width:4e+6}"
+ ".exp2n1 {stroke-width:4E-6}"
+ ".exp2n2 {stroke-width:4e-6}"
+ ".exp3n1 {stroke-width:4e6em}"
+ ".exp3n2 {stroke-width:4e6ex}"
+ ".exp3n3 {stroke-width:4e6in}"
+ ".exp4n1 {stroke-width:3.14e4}"
+ ".exp4n2 {stroke-width:3.14e-4}"
+ ".e4n2 {stroke-width:.24e-4}"
+ ".e4n3 {stroke-width:1.e1}"; // This one should be ignored
+
+static enum CRStatus
+ test_cr_parser_parse (void);
+
+/**
+ *The test of the cr_input_read_byte() method.
+ *Reads the each byte of a_file_uri using the
+ *cr_input_read_byte() method. Each byte is send to
+ *stdout.
+ *@param a_file_uri the file to read.
+ *@return CR_OK upon successful completion of the
+ *function, an error code otherwise.
+ */
+static enum CRStatus
+test_cr_parser_parse (void)
+{
+ enum CRStatus status = CR_OK;
+ CROMParser *parser = NULL;
+ CRStyleSheet *stylesheet = NULL;
+
+ parser = cr_om_parser_new (NULL);
+ status = cr_om_parser_parse_buf (parser, (guchar *) gv_cssbuf,
+ strlen ((const char *) gv_cssbuf),
+ CR_ASCII, &stylesheet);
+
+ if (status == CR_OK && stylesheet) {
+ cr_stylesheet_dump (stylesheet, stdout);
+ // Adding this because my test editor adds a newline character
+ // at the last line, whereas cr_stylesheet_dump doesn't, which
+ // results in a diff error/warning.
+ printf("\n");
+ cr_stylesheet_destroy (stylesheet);
+ }
+ cr_om_parser_destroy (parser);
+
+ return status;
+}
+
+/**
+ *The entry point of the testing routine.
+ */
+int
+main (int argc, char **argv)
+{
+ enum CRStatus status = CR_OK;
+
+ status = test_cr_parser_parse ();
+
+ if (status != CR_OK) {
+ g_print ("\nKO\n");
+ }
+
+ return 0;
+}
diff --git a/src/3rdparty/libcroco/tests/test8-main.c b/src/3rdparty/libcroco/tests/test8-main.c
new file mode 100644
index 0000000..b57c2e4
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/test8-main.c
@@ -0,0 +1,44 @@
+/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset:8 -*- */
+
+/*
+ * This file is part of The Croco Library
+ *
+ * Copyright (C) 2022 Thomas Holder
+ *
+ * SPDX-License-Identifier: GPL-2.1-or-later
+ */
+
+#include "libcroco.h"
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+ unsigned i = 0;
+ CRSelector *selector;
+
+ char const *selector_strings[] = {
+ // must not have leading whitespace!?
+ "foo", "foo,bar", "foo , bar ", "foo > bar", ".foo .bar",
+ };
+
+ for (i = 0; i < G_N_ELEMENTS (selector_strings); ++i) {
+ printf ("****************\n");
+ printf ("Parsing '%s'\n", selector_strings[i]);
+
+ selector = cr_selector_parse_from_buf (
+ (guchar const *) selector_strings[i], CR_UTF_8);
+
+ if (!selector) {
+ printf ("is NULL\n");
+ } else {
+ cr_selector_dump (selector, stdout);
+ cr_selector_unref (selector);
+ printf ("\n");
+ }
+ }
+
+ return 0;
+}
+
+// vi:sw=8:expandtab
diff --git a/src/3rdparty/libcroco/tests/testctl b/src/3rdparty/libcroco/tests/testctl
new file mode 100755
index 0000000..205112b
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/testctl
@@ -0,0 +1,462 @@
+#! /bin/sh
+
+#####################################
+#This script just runs the tests of
+#libcroco, saves their result, diff them
+#against a set of reference results and
+#displays OK/KO.
+#To use it as a tester, the best way is
+#just to run 'testctl run' and see the result.
+####################################
+
+#the directory that contains the tests sources is:
+#$TEST_SOURCE_DIR. User can set this var in the environment
+#before calling this script. Otherwise, we set it to a default value
+if test x$TEST_SOURCE_DIR = x ; then
+ TEST_SOURCE_DIR=`dirname "$0"`
+fi
+
+#the directory that contains the test outputs is:
+#$TEST_OUT_DIR
+#User can set this var in the environment before
+#calling this script. Otherwise, we set it to a default value.
+if test x$TEST_OUT_DIR = x ; then
+ TEST_OUT_DIR=tests
+fi
+
+if [ -d "$TEST_OUT_DIR/.libs" ]; then
+ TEST_BIN_DIR="$TEST_OUT_DIR/.libs"
+else
+ TEST_BIN_DIR="$TEST_OUT_DIR"
+fi
+
+#the list of tests to be run
+TEST_PROG_LIST=
+
+#the test input dirs.
+TEST_INPUT_DIR=test-inputs
+
+#the reference test output dirs.
+TEST_OUT_REF_DIR=test-output-refs
+
+#temporary test result dir
+TEST_OUTPUT_DIR=test-outputs
+
+ERROR_REPORT_FILE=tests-error.log
+COMMAND_LIST=
+COMMAND=
+if test x$RUN_VALGRIND = x ; then
+ RUN_VALGRIND=no
+else
+ RUN_VALGRIND=yes
+fi
+if test "x$CHECKER" = "x" ; then
+ CHECKER="valgrind --tool=memcheck"
+fi
+
+VALGRIND_LOGS_DIR=valgrind-logs
+VALGRIND=
+TEST_PROG=
+EGREP="grep -E"
+
+DIFF=`which diff`
+if test "empty$DIFF" = "empty" ; then
+ echo "You don't have the diff program installed"
+ echo "Please, install is first"
+fi
+
+display_usage ()
+{
+ echo ""
+ echo "usage: $0 [general options] <command> [command option]"
+ echo ""
+ echo "where general options are:"
+ echo "===================="
+ echo "-h|--help displays this help"
+ echo ""
+ echo "commands are:"
+ echo "=============="
+ echo "run run the tests and display their result"
+ echo "ref run the tests but saves their output as a reference"
+ echo "cleanup removes the tmp directories that may have been created"
+ echo ""
+ echo "run command options:"
+ echo "--valgrind runs the test using valgrind"
+ echo "--testprog <test program>"
+}
+
+parse_command_line ()
+{
+ if test "empty$1" = "empty" ; then
+ display_usage ;
+ exit -1
+ fi
+
+ while true ; do
+ arg=$1
+
+ if test "empty$arg" = "empty" ; then
+ break ;
+ fi
+
+ case "$arg" in
+ -h|--help)
+ display_usage $@
+ exit 0
+ ;;
+
+ -*)
+ echo "$0: unknown option: $arg"
+ display_usage $@
+ exit 0
+ ;;
+
+ run|ref|cleanup)
+ COMMAND_LIST=$arg
+ REMAINING_ARGS=$@
+ echo "REMAINING_ARGS=$REMAINING_ARGS"
+ break ;
+ ;;
+
+ *)
+ display_usage $@
+ exit 0
+ ;;
+ esac
+ done
+}
+
+
+#builds the list of available test functions.
+build_tests_list ()
+{
+ for TEST_PROG in "$TEST_SOURCE_DIR"/test*.sh "$TEST_OUT_DIR"/test?; do
+ TEST_PROG=`basename $TEST_PROG`
+ echo "run test: $TEST_PROG"
+ TEST_PROG_LIST="$TEST_PROG_LIST $TEST_PROG"
+ done
+}
+
+#runs a test programs.
+#usage run_test_prog <test-name> <reference> <display-on-stdout>
+#where "test-name" is the name of the test program to run
+#"reference" is a boolean value: yes/no. (the string "yes" or the string no)
+#if yes, means that the output of the test is to be saved as a reference.
+#if no, means that the output of the test is to be saved as a result of a test.
+run_test_prog ()
+{
+ TEST_PROG="$1"
+ REFERENCE="$2"
+ DISPLAY_ON_STDOUT="$3"
+ OUTPUT_DIR=
+ OUTPUT_SUFFIX=
+ TEST_INPUT_LIST=
+ VALGRIND_OPTIONS="--error-limit=no --num-callers=100 --logfile=$TEST_OUT_DIR/$VALGRIND_LOGS_DIR/$TEST_PROG-valgrind.log --leak-check=yes --show-reachable=yes --quiet --suppressions=$TEST_SOURCE_DIR/vg.supp"
+ if test x$RUN_VALGRIND = xno ; then
+ VALGRIND=
+ else
+ if ! test -x "$TEST_SOURCE_DIR"/valgrind-version.sh ; then
+ echo "Argh! Could not find file $TEST_SOURCE_DIR/valgrind-version.sh"
+ exit -1 ;
+ fi
+ version=`"$TEST_SOURCE_DIR"/valgrind-version.sh`
+ if ! test "x$version" = "xokay" ; then
+ echo "You must install a valgrind version greater than 2.1.1"
+ echo "version=$version"
+ exit -1
+ fi
+ if test "x$CHECKER" = "x" ; then
+ VALGRIND=`which valgrind`
+ if test "x$VALGRIND" = x ; then
+ echo "Could not find valgrind in your path"
+ else
+ VALGRIND="$VALGRIND $VALGRIND_OPTIONS"
+ echo "Gonna run the tests with valgrind, using the following options: $VALGRIND_OPTIONS"
+ fi
+ else
+ VALGRIND="$CHECKER $VALGRIND_OPTIONS"
+ echo "Gonna run the tests with valgrind, using the cmd line: $VALGRIND"
+ fi
+ fi
+ export VALGRIND
+ case "$TEST_PROG" in
+ *.sh) is_shell_script=yes ;;
+ *) is_shell_script=no ;;
+ esac
+
+ if ! test -d "$TEST_OUT_DIR/$VALGRIND_LOGS_DIR" ; then
+ mkdir "$TEST_OUT_DIR/$VALGRIND_LOGS_DIR"
+ fi
+
+ for TEST_INPUT in `ls -1 "$TEST_SOURCE_DIR/$TEST_INPUT_DIR" | $EGREP "^${TEST_PROG}"'[.0-9]+css$'` ; do
+ TEST_INPUT_LIST="$TEST_INPUT_LIST $TEST_INPUT"
+ done
+
+ if test "$REFERENCE" = "yes" ; then
+ OUTPUT_DIR="$TEST_SOURCE_DIR/$TEST_OUT_REF_DIR"
+ OUTPUT_SUFFIX=.out
+ else
+ OUTPUT_DIR="$TEST_OUT_DIR/$TEST_OUTPUT_DIR"
+ OUTPUT_SUFFIX=.out
+ if test ! -d "$OUTPUT_DIR" ; then
+ echo "creating tmp directory $OUTPUT_DIR ..."
+ mkdir "$OUTPUT_DIR"
+ echo "done"
+ fi
+ fi
+
+ if test "empty$TEST_INPUT_LIST" != "empty" ; then
+ for TEST_INPUT in $TEST_INPUT_LIST ; do
+ TEST_INPUT_NAME=`basename $TEST_INPUT .sh`
+ if test "$DISPLAY_ON_STDOUT" = "yes" ; then
+ echo "###############################################"
+ echo "launching $VALGRIND $TEST_PROG $TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT"....
+ echo "###############################################"
+ if test x$is_shell_script = xyes ; then
+ "$TEST_SOURCE_DIR/$TEST_PROG" "$TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT"
+ else
+ $VALGRIND "$TEST_BIN_DIR/$TEST_PROG" "$TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT"
+ fi
+ echo "###############################################"
+ echo "done"
+ echo "###############################################"
+ echo ""
+ else
+ echo "executing $VALGRIND $TEST_PROG $TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT > $OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX} ..."
+ $VALGRIND "$TEST_BIN_DIR/$TEST_PROG" "$TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT" > "$OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX}"
+ echo "done"
+ fi
+ done
+ else
+ if test "$DISPLAY_ON_STDOUT" = "yes" ; then
+ echo "####################################################"
+ echo "launching $VALGRIND $TEST_PROG ..."
+ echo "####################################################"
+ if test x$is_shell_script = xyes ; then
+ "$TEST_SOURCE_DIR/$TEST_PROG"
+ else
+ $VALGRIND "$TEST_BIN_DIR/$TEST_PROG"
+ fi
+ echo "####################################################"
+ echo "done"
+ echo "####################################################"
+ echo ""
+ else
+ TEST_INPUT_NAME=`basename "$TEST_PROG" .sh`
+ echo "executing $VALGRIND $TEST_PROG > $OUTPUT_DIR/${TEST_PROG}${OUTPUT_SUFFIX} ..."
+ if test x$is_shell_script = xyes ; then
+ "$TEST_SOURCE_DIR/$TEST_PROG" > "$OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX}"
+ else
+ $VALGRIND "$TEST_BIN_DIR/$TEST_PROG" > "$OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX}"
+ fi
+ echo "done"
+ fi
+ fi
+ unset VALGRIND
+}
+
+cleanup_tests ()
+{
+ if test -d "$TEST_OUT_DIR/$TEST_OUTPUT_DIR" ; then
+ echo "removing $TEST_OUT_DIR/$TEST_OUTPUT_DIR/*"
+ rm -rf "$TEST_OUT_DIR/$TEST_OUTPUT_DIR"
+ rm -rf "$TEST_OUT_DIR/$VALGRIND_LOGS_DIR"
+ fi
+ if test -f "$TEST_OUT_DIR/$ERROR_REPORT_FILE" ; then
+ rm "$TEST_OUT_DIR/$ERROR_REPORT_FILE"
+ fi
+ return 0
+}
+
+run_test_report ()
+{
+ code=0
+ diff -ur --exclude='*CVS*' --exclude='*cvs*' --exclude='Makefile*' --exclude=.arch-ids "$TEST_SOURCE_DIR/$TEST_OUT_REF_DIR" "$TEST_OUT_DIR/$TEST_OUTPUT_DIR" > "$TEST_OUT_DIR/tmpdiff.$$"
+ NB_DIFF=`wc -l < "$TEST_OUT_DIR/tmpdiff.$$"`
+
+ if test "$NB_DIFF" -eq 0 ; then
+ echo "/////////////ALL THE TESTS ARE OK :) //////////////////"
+ rm "$TEST_OUT_DIR/tmpdiff.$$"
+ else
+ echo "SOME TESTS ARE KO :("
+ mv "$TEST_OUT_DIR/tmpdiff.$$" "$TEST_OUT_DIR/$ERROR_REPORT_FILE"
+ echo "See $TEST_OUT_DIR/$ERROR_REPORT_FILE to see what's going on"
+ code=1
+ fi
+
+ ###################
+ #Valgrind errors #
+ ###################
+ memleaks=no
+ for vg_log in `find "$TEST_OUT_DIR/$VALGRIND_LOGS_DIR" -name '*-valgrind.log*' -print` ; do
+ if test -s "$vg_log" ; then
+ leaks=`cat "$vg_log" | grep -i leak | grep -v no`
+ errors=`cat "$vg_log" | grep -w Invalid`
+ if test "x$leaks" = "x" -a "x$errors" = "x" ; then
+ rm -f "$vg_log" ;
+ else
+ echo "valgrind reported some memory leaks/corruptions in $vg_log"
+ memleaks=yes
+ fi
+ else
+ rm "$vg_log"
+ fi
+ done
+ if test "x$RUN_VALGRIND" = "xyes" ; then
+ if test "x$memleaks" = "xno" ; then
+ echo "Oh, YESSSSSS!, VALGRIND DID NOT DETECT ANY MEMLEAK !! You can go have a beer."
+ else
+ echo "Please report these leaks by sending the valgrind logs to the authors of libcroco."
+ code=2
+ fi
+ fi
+ return $code
+}
+
+run_test_report_single ()
+{
+ TEST_BASE=`basename "$1" .sh`
+ code=0
+ for reffile in "$TEST_SOURCE_DIR/$TEST_OUT_REF_DIR/$TEST_BASE".*; do
+ outfile="$TEST_OUT_DIR/$TEST_OUTPUT_DIR/`basename "$reffile"`"
+ diff -u "$reffile" "$outfile" || code=1
+ done
+ if [ $code -ne 0 ]; then
+ echo "TEST $TEST_BASE IS KO :("
+ fi
+ return $code
+}
+
+############################
+#Executes the "run" command along with
+#its command options.
+#For the sake of safety checking
+############################
+execute_run_cmd ()
+{
+ args=$@
+ test_and_report=no
+
+ if test "$1" != "run" ; then
+ echo "internal error: first argument should be \'run\'"
+ return
+ fi
+ shift
+
+ while true ; do
+ cur_arg=$1
+ echo "cur_arg=$cur_arg"
+
+ case $cur_arg in
+ --valgrind)
+ RUN_VALGRIND=yes
+ shift
+ ;;
+
+ "--testprog")
+ shift
+ if test "empty$1" = "empty" ; then
+ echo "--testprog should be followed by a prog name"
+ display_usage
+ exit
+ fi
+ TEST_PROG=$1
+ echo "TEST_PROG=$TEST_PROG"
+ shift
+ ;;
+
+ "--test-and-report")
+ test_and_report=yes
+ shift
+ TEST_PROG="$1"
+ shift
+ if test -z "$TEST_PROG"; then
+ echo "--test-and-report must be followed by a prog name"
+ exit
+ fi
+ ;;
+
+ *)
+ break
+ ;;
+ esac
+ done
+
+ if test "empty$TEST_PROG" = "empty"; then
+
+ cleanup_tests
+
+ build_tests_list ;
+ if test "empty$TEST_PROG_LIST" = "empty" ; then
+ echo "could not find any test to run"
+ exit
+ fi
+
+ for TEST in $TEST_PROG_LIST ; do
+ run_test_prog "$TEST" no no;
+ done
+ run_test_report ;
+ elif test "$test_and_report" = "yes"; then
+ run_test_prog "$TEST_PROG"
+ run_test_report_single "$TEST_PROG"
+ else
+ #run the test and display result on stdout
+ run_test_prog "$TEST_PROG" no yes ;
+ fi
+}
+
+##############################
+#Analyzes a command string "<command> [command option]"
+#and runs the necessary commands.
+#
+#Must be called with the command line
+#starting with a command name.
+#all the previous general argument must
+#have been stripped away.
+#############################
+execute_command ()
+{
+ arg="$1" ;
+
+ case "$arg" in
+
+ run)
+ execute_run_cmd "$@"
+ ;;
+
+ ref)
+ build_tests_list ;
+ if test "empty$TEST_PROG_LIST" = "empty" ; then
+ echo "could not find any test to run"
+ exit
+ fi
+
+ for TEST in $TEST_PROG_LIST ; do
+ run_test_prog "$TEST" yes no;
+ done
+ ;;
+
+ cleanup)
+ cleanup_tests
+ ;;
+
+ *)
+ echo "unknown command"
+ exit ;
+ esac
+
+}
+
+main ()
+{
+ parse_command_line $@
+
+ if test "empty$COMMAND_LIST" = "empty" ; then
+ echo "no test command to execute"
+ exit
+ fi
+
+ execute_command $REMAINING_ARGS
+}
+
+main $@
diff --git a/src/3rdparty/libcroco/tests/valgrind-version.sh b/src/3rdparty/libcroco/tests/valgrind-version.sh
new file mode 100755
index 0000000..55cbfc2
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/valgrind-version.sh
@@ -0,0 +1,48 @@
+#! /bin/sh
+
+valgrind=`which valgrind`
+awk=`which awk`
+if test "x$valgrind" = "x" ; then
+ echo "valgrind-not-present" ;
+ exit ;
+fi
+
+
+valgrind_version=`$valgrind --version`
+if test "x$valgrind_version" = x ; then
+ echo "not-present" ;
+ exit
+fi
+
+if test "x$awk" = x ; then
+ echo "awk-not-present"
+ exit
+fi
+
+string_version=`echo $valgrind_version | $awk -F '-' '{print $2}'`
+
+if test "x$string_version" = "x" ; then
+ echo "valgrind-version-unknown"
+ exit
+fi
+
+major=`echo $string_version | $awk -F '.' '{print $1}'`
+minor=`echo $string_version | $awk -F '.' '{print $2}'`
+micro=`echo $string_version | $awk -F '.' '{print $3}'`
+
+version=`expr $major \* 10000 + $minor \* 100 + $micro`
+
+if test "x$version" = "x" ; then
+ echo "valgrind-version-unknown"
+ exit ;
+fi
+
+if test "$version" -ge "20101" ; then
+ echo "okay"
+ exit ;
+else
+ echo "valgrind-version-lower"
+ exit ;
+fi
+
+
diff --git a/src/3rdparty/libcroco/tests/valgrind.log b/src/3rdparty/libcroco/tests/valgrind.log
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/valgrind.log
diff --git a/src/3rdparty/libcroco/tests/vg b/src/3rdparty/libcroco/tests/vg
new file mode 100755
index 0000000..b1f2c00
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/vg
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+###
+#
+###
+
+OUTPUT_FILE=valgrind.log
+VG=`which valgrind`
+VG_OPTIONS="-q --num-callers=100 --leak-check=yes --show-reachable=yes"
+
+#Some sanity checks
+if test "empty$VG" = "empty" ; then
+ echo "You should install valgrind and set it binary into your"
+ echo "\$PATH env variable"
+ echo "go to http://developer.kde.org/~sewardj/ to download valgrind"
+ exit
+fi
+
+
+if test "empty$1" != "empty" ; then
+ OUTPUT_FILE="$1".vg
+fi
+
+exec $VG $VG_OPTIONS $@ 2>"$OUTPUT_FILE" \ No newline at end of file
diff --git a/src/3rdparty/libcroco/tests/vg.supp b/src/3rdparty/libcroco/tests/vg.supp
new file mode 100644
index 0000000..5a3d109
--- /dev/null
+++ b/src/3rdparty/libcroco/tests/vg.supp
@@ -0,0 +1,57 @@
+{
+ g_print_ALLOC_LEAK
+ Memcheck:Leak
+ fun:malloc
+ fun:realloc
+ fun:g_realloc
+ fun:g_array_maybe_expand
+ fun:g_array_set_size
+ fun:g_static_private_set
+ fun:g_get_charset
+ fun:g_print
+}
+
+{
+ g_slist_prepend_LEAK
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ fun:g_allocator_new
+ fun:_g_slist_alloc
+ fun:g_slist_prepend
+}
+
+{
+ g_print_CONVERT_LEAK
+ Memcheck:Leak
+ fun:malloc
+ obj:*libc-2.3.3.so
+ fun:iconv_open
+ fun:try_conversion
+ fun:g_iconv_open
+ fun:open_converter
+ fun:g_convert
+ fun:g_convert_with_fallback
+ fun:strdup_convert
+ fun:g_print
+}
+
+{
+ g_string_new_CHUNCK_LEAK
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_mem_chunk_new
+ fun:g_string_sized_new
+ fun:g_string_new
+}
+
+{
+ g_list_prepend_LEAK
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ fun:g_allocator_new
+ fun:_g_list_alloc
+ fun:g_list_prepend
+}