|
| 1 | +LibCSS API & ABI Changes |
| 2 | +======================== |
| 3 | + |
| 4 | +This document explains how to upgrade clients to use new versions of LibCSS. |
| 5 | + |
| 6 | + |
| 7 | +LibCSS 0.2.0 --> LibCSS 0.3.0 |
| 8 | +----------------------------- |
| 9 | + |
| 10 | +Both the API and ABI are changed. |
| 11 | + |
| 12 | +LibCSS no longer lets clients provide a memory allocator function. |
| 13 | +This change affects the following functions: |
| 14 | + |
| 15 | +| Header | Function | |
| 16 | +| ----------------------------- | --------------------------- | |
| 17 | +| `include/libcss/computed.h` | css_computed_style_create() | |
| 18 | +| `include/libcss/select.h` | css_select_ctx_create() | |
| 19 | +| `include/libcss/stylesheet.h` | css_stylesheet_create() | |
| 20 | + |
| 21 | + |
| 22 | +There are changes to selection handler callback table: |
| 23 | + |
| 24 | +* node_classes |
| 25 | + * LibCSS no longer frees the any array of classes passed to the |
| 26 | + node_classes callback. It does still unref the individual strings. |
| 27 | + This means clients need not allocate a new array each call, but can |
| 28 | + keep the array cached on the node. |
| 29 | + |
| 30 | +* set_libcss_node_data |
| 31 | + * New selection handler function used to store a private cache belonging |
| 32 | + to libcss on document element nodes. When the node is deleted or |
| 33 | + modified, clients should call css_libcss_node_data_handler(). |
| 34 | + |
| 35 | +* get_libcss_node_data |
| 36 | + * New selection handler function used to retrieve private cache belonging |
| 37 | + to libcss from document element nodes. |
| 38 | + |
| 39 | + |
| 40 | +LibCSS 0.3.0 --> LibCSS 0.4.0 |
| 41 | +----------------------------- |
| 42 | + |
| 43 | +The API is changed. |
| 44 | + |
| 45 | +Due to the change from CSS2 overflow to CSS3 overflow properties, the |
| 46 | +computed style access functions for overflow properties have changed. |
| 47 | +The overflow property is removed. Added are overflow-x and overflow-y |
| 48 | +properties. (The overflow shorthand property now sets overflow-x and |
| 49 | +overflow-y.) |
| 50 | + |
| 51 | +This change affects the following functions: |
| 52 | + |
| 53 | +| Change | Header | Function | |
| 54 | +| ------- | --------------------------- | --------------------------- | |
| 55 | +| Removed | `include/libcss/computed.h` | `css_computed_overflow()` | |
| 56 | +| Added | `include/libcss/computed.h` | `css_computed_overflow_x()` | |
| 57 | +| Added | `include/libcss/computed.h` | `css_computed_overflow_y()` | |
| 58 | + |
| 59 | + |
| 60 | +LibCSS 0.5.0 --> LibCSS 0.6.0 |
| 61 | +----------------------------- |
| 62 | + |
| 63 | +The API is changed. |
| 64 | + |
| 65 | +The way that presentational hints are handled has changed to be more |
| 66 | +optimal. Instead of calling the presentational hint callback once |
| 67 | +per property per node to get each hint, we now call the callback once |
| 68 | +per node to get all the hints that apply to it. |
| 69 | + |
| 70 | +There are changes to selection handler callback table: |
| 71 | + |
| 72 | +* node_presentational_hint |
| 73 | + * Rather than asking for any hint for the given node and property, |
| 74 | + it now asks for an array of hints that should apply to the node. |
| 75 | + |
| 76 | +The css_hint structure has been changed to include the property which |
| 77 | +the hint applies to. |
0 commit comments