Re: [libcroco-list] vendor specific declarations



Hi David !

I am sorry for my late reply. I was at the FOSDEM during the 
week-end and I just came back. 

Well, I have thought about this when I
was implementing the parser, but as the CSS 2.0 specification didn't 
formally defined the "vendor-specific" grammar, I decided not to
support in a first time. Now, it seems like someone needs it ;)
So here is what I propose: I will modify the parser so that any 
token that has the pattern -IDENT (dash followed by an identifier)
gets recognized as an identifier. 

What do you think about this ? I will try to do this tomorrow night or
so and commit it.

Thank you for your interest in libcroco.

Regards,

Dodji.


On Mon, Feb 23, 2004 at 08:03:17AM +0000, David A Knight wrote:
> There seems to be a problem with parsing vendor specific properties such
> as -moz-border-radius.
> 
> I've attached a patch which sorts this out, although I don't think it's
> very nice the way I've done it.
> 
> 
> David
> 
> -- 
> Make your website SCREEM - Site Creating & Editing EnvironMent
> 
> URL:  http://www.screem.org/
> Mail: david screem org

> Index: src/cr-tknzr.c
> ===================================================================
> RCS file: /cvs/gnome/libcroco/src/cr-tknzr.c,v
> retrieving revision 1.14
> diff -u -r1.14 cr-tknzr.c
> --- src/cr-tknzr.c	24 Jan 2004 19:24:02 -0000	1.14
> +++ src/cr-tknzr.c	23 Feb 2004 07:57:37 -0000
> @@ -2720,7 +2720,17 @@
>          if (status != CR_OK) return status ;
>          if (token == NULL) return CR_PARSING_ERROR ;
>  
> -        if (token->type == a_type)
> +	/* hack to allow -moz style properties */
> +	if (a_type == IDENT_TK && token->type == DELIM_TK)
> +	{
> +                status = cr_tknzr_parse_token (a_this, a_type, a_et,
> +						a_res, a_extra_res);
> +		if (status == CR_OK && a_res)
> +		{
> +			g_string_prepend_c( *((GString**)a_res), '-' );
> +		}
> +	}
> +	else if (token->type == a_type)
>          {
>                  switch (a_type)
>                  {






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]