summaryrefslogtreecommitdiff
path: root/src/select/select.h
Commit message (Collapse)AuthorAgeFilesLines
* Media queries: Update selection API to support media queries.Michael Drake2019-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | The API changes are: 1. When building a selection context, stylesheets added with `css_select_ctx_{append|insert}_sheet()` now have to have media strings associcated with them. Previously they took a simple bitfield for CSS media type. 2. When selecting for an element, the client needs to specify the current media requirements. Previously it only had to provide the bitfield for CSS media type. 3. Same for the css_select_font_faces API. The selection handling has been updated to handle the new API, however it is currently only looking at the media type when performing selection. Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
* Selection: Inline styles prevent computed style sharing.Michael Drake2016-11-291-8/+9
|
* Enable sharing where pseudo common pseudo classes are the same.Michael Drake2016-11-191-7/+21
|
* Optimisation: Bypass selection by sharing previous sibling's style.Michael Drake2016-11-191-0/+7
|
* Make node data contain list of partial node styles.Michael Drake2016-11-191-0/+1
|
* Allow more than just bloom to be stored on nodes.Michael Drake2016-11-191-1/+5
| | | | | We now have a css_node_data struct which is sored on nodes. It currently contians just the bloom filter.
* Various changes which modify API and ABI:Michael Drake2013-12-131-2/+2
| | | | | | | | | - Remove client allocation function. - Change node_classes callback not to yield array ownership to libcss. - Node bloom filters now built by, during selection libcss. - Added selection callbacks to get and set data on document nodes. Test suite, example, and documentation updated to match.
* Significantly optimise CSS selection performance.Michael Drake2013-12-011-0/+2
| | | | | | | | | | | | | | | | Now we pass a node bloom filter to css_get_style. That node bloom filter is filled with the node's ancestor element, class, and id names. Internally, libcss also generates a bloom filter for each selector chain. If the selector chain's bloom filter is not a subset of the node bloom filter, we know that the selector chain's rule does not apply to the node. This avoids the slow selector chain matching process. Other smaller optimisations to move the ruling out of selector chains for inapplicable media types and other reasons to before we start comparing rules from different sources to find the next rule. All this is now done in hash.c so select.c never sees the trivially ruled out rules.
* Fill reject cache backwards from end.Michael Drake2011-11-071-1/+1
| | | | svn path=/trunk/libcss/; revision=13133
* Cache rejected ancestor class/ID selectors to improve selection efficiencyJohn Mark Bell2011-11-041-0/+11
| | | | svn path=/trunk/libcss/; revision=13118
* Compute node name, id, and classes once, instead of once per stylesheetJohn Mark Bell2011-09-051-0/+5
| | | | svn path=/trunk/libcss/; revision=12743
* Hoist string internment into selection context constructor.John Mark Bell2011-09-051-29/+0
| | | | | | Destroy interned strings from selection context destructor. svn path=/trunk/libcss/; revision=12742
* CSS3 SelectorsJohn Mark Bell2011-01-311-0/+16
| | | | svn path=/trunk/libcss/; revision=11557
* Ensure there are zero global symbols without css_ or css__ in front of them. ↵Daniel Silverstone2011-01-201-1/+1
| | | | | | This helps prevent confusion if someone else wants a function called parse_background or similar svn path=/trunk/libcss/; revision=11416
* Merge parser autogeneration and string handling refactor branch ↵Vincent Sanders2011-01-191-2/+2
| | | | | | r=jmb,kinnison,vince svn path=/trunk/libcss/; revision=11408
* Simultaneously select styles for base + pseudo elements.John Mark Bell2011-01-051-3/+5
| | | | svn path=/trunk/libcss/; revision=11211
* Use unsigned int for bitfields. Apparently, using uint32_t confuses some ↵John Mark Bell2009-08-021-4/+4
| | | | | | compilers. svn path=/trunk/libcss/; revision=8990
* Ensure that any properties explicitly set to inherit on the root element are ↵John Mark Bell2009-07-041-2/+4
| | | | | | set to their initial values. svn path=/trunk/libcss/; revision=8309
* Completely change the approach used for presentational hints.John Mark Bell2009-03-231-1/+1
| | | | | | | | This one stands a chance of working sanely. While this compiles, please don't expect it to link. svn path=/trunk/libcss/; revision=6820
* Move property dispatch table out of select.c so it can be used by the ↵John Mark Bell2009-02-151-0/+67
computed style composition code. svn path=/trunk/libcss/; revision=6523