[libcroco-list] Libcroco notes



Hi,

  I've just re-started some libcroco coding and found some quirks; I'm
not sure yet how to approach all of these, I'll just list them for now
so I don't forget later. This is for the current code in CVS.

The library does not declare which symbols should be exported, so no
symbols are exported on Win32 (and not imported in client code), so
you have to use static linking on Win32 or write a .def file where the
exports are listed. It would be good to have a macro that takes care
of this, e.g. XMLPUBFUN in libxml2 does this.

It seems the library can't deal with escape sequences, e.g. it errors
for x { font-family: Bj\f6rn } and truncates the identifier after "Bj"
(it should just make an identifier "Björn"); similar for strings, e.g.
x { font-family: "Bj\f6rn" } yields in error and ignoring the property
alltogether.

There is no way to tell the difference between x:3y and x:3.0y which
is important to know since some properties like counter-increment do
not allow numbers but only integers.

The CRNum structure does not scale well to CSS3, since the units are
hardcoded, only known unit identifiers are recognized, so properties
using CSS3 unit identifiers like x:3rem; can't be processed.

The hardcoded handling of rgb() is unfortunate, it seems one cannot
access the location information for the individual numbers and the
values are clamped to integers 0..255. It would be better, and it
seems simpler for libcroco, to simply handle rgb() values as generic
functions. That's probably a bit too late now though, perhaps an
option could be added to treat them that way...

Is there a reason why CRTerm stores operators and such not as simple
values? At the moment x:1+2 would be two terms, it would seem a bit
more intuitive and simpler to make that three terms...

regards,
-- 
Björn Höhrmann · mailto:bjoern hoehrmann de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 



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