Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions README

This file was deleted.

56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
LibCSS -- a CSS parser and selection engine
===========================================

Overview
--------

LibCSS is a CSS parser and selection engine. It aims to parse the forward
compatible CSS grammar.

Requirements
------------

LibCSS requires the following tools:

* A C99 capable C compiler
* GNU make or compatible
* Pkg-config
* Perl (for the testcases)
* Python3 (minimum 3.6, for generated selection code)

LibCSS also requires the following libraries to be installed:

* LibParserUtils
* LibWapcaplet

Compilation
-----------

If necessary, modify the toolchain settings in the Makefile.
Invoke make:

make

Regenerating generated selection source code
--------------------------------------------

To regenerate the selection sources (computed style data accesses),
note this requires python3:

make select_generator

Verification
------------

To verify that the parser is working, it is necessary to specify a
different makefile target than that used for normal compilation, thus:

make test

API documentation
-----------------

Currently, there is none. However, the code is well commented and the
public API may be found in the "include" directory. The testcase sources
may also be of use in working out how to use it.

77 changes: 0 additions & 77 deletions docs/API-ABI-Changes

This file was deleted.

77 changes: 77 additions & 0 deletions docs/API-ABI-Changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
LibCSS API & ABI Changes
========================

This document explains how to upgrade clients to use new versions of LibCSS.


LibCSS 0.2.0 --> LibCSS 0.3.0
-----------------------------

Both the API and ABI are changed.

LibCSS no longer lets clients provide a memory allocator function.
This change affects the following functions:

| Header | Function |
| ----------------------------- | --------------------------- |
| `include/libcss/computed.h` | css_computed_style_create() |
| `include/libcss/select.h` | css_select_ctx_create() |
| `include/libcss/stylesheet.h` | css_stylesheet_create() |


There are changes to selection handler callback table:

* node_classes
* LibCSS no longer frees the any array of classes passed to the
node_classes callback. It does still unref the individual strings.
This means clients need not allocate a new array each call, but can
keep the array cached on the node.

* set_libcss_node_data
* New selection handler function used to store a private cache belonging
to libcss on document element nodes. When the node is deleted or
modified, clients should call css_libcss_node_data_handler().

* get_libcss_node_data
* New selection handler function used to retrieve private cache belonging
to libcss from document element nodes.


LibCSS 0.3.0 --> LibCSS 0.4.0
-----------------------------

The API is changed.

Due to the change from CSS2 overflow to CSS3 overflow properties, the
computed style access functions for overflow properties have changed.
The overflow property is removed. Added are overflow-x and overflow-y
properties. (The overflow shorthand property now sets overflow-x and
overflow-y.)

This change affects the following functions:

| Change | Header | Function |
| ------- | --------------------------- | --------------------------- |
| Removed | `include/libcss/computed.h` | `css_computed_overflow()` |
| Added | `include/libcss/computed.h` | `css_computed_overflow_x()` |
| Added | `include/libcss/computed.h` | `css_computed_overflow_y()` |


LibCSS 0.5.0 --> LibCSS 0.6.0
-----------------------------

The API is changed.

The way that presentational hints are handled has changed to be more
optimal. Instead of calling the presentational hint callback once
per property per node to get each hint, we now call the callback once
per node to get all the hints that apply to it.

There are changes to selection handler callback table:

* node_presentational_hint
* Rather than asking for any hint for the given node and property,
it now asks for an array of hints that should apply to the node.

The css_hint structure has been changed to include the property which
the hint applies to.
Loading