Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | select: Fix blank pseudo style reversion | Michael Drake | 2022-10-23 | 1 | -0/+8 |
| | |||||
* | Select: Only store UA and USER origin styles if revert is used | Michael Drake | 2022-08-29 | 1 | -5/+13 |
| | |||||
* | Select: Move revert style tracking to separate allocation | Michael Drake | 2022-08-29 | 1 | -7/+17 |
| | | | | It's pretty big and the selection state lives on the stack. | ||||
* | Select: Split out duplicated revert handling | Michael Drake | 2022-08-29 | 1 | -52/+47 |
| | |||||
* | Select: Support CSS property-wide 'revert' value | Michael Drake | 2022-08-29 | 1 | -0/+79 |
| | |||||
* | Select: Clone UA and author styles for revert | Michael Drake | 2022-08-29 | 1 | -0/+30 |
| | |||||
* | Select: Support CSS property-wide 'unset' value | Michael Drake | 2022-08-29 | 1 | -3/+18 |
| | |||||
* | Select: Support CSS property-wide 'initial' value | Michael Drake | 2022-08-29 | 1 | -3/+6 |
| | |||||
* | Select: Make inherit flag handling aware of other default values | Michael Drake | 2022-08-29 | 1 | -4/+5 |
| | |||||
* | Select: MQ: Use interned strings for media features | Michael Drake | 2022-08-28 | 1 | -12/+16 |
| | | | | Avoids some strcmps. | ||||
* | Select: Split out useful strings | Michael Drake | 2022-08-28 | 1 | -288/+32 |
| | |||||
* | Selection: Don't duplicate unit conversion members in media descriptor. | Michael Drake | 2021-05-19 | 1 | -14/+26 |
| | |||||
* | Selection: Remove client callback for unit conversion. | Michael Drake | 2021-05-19 | 1 | -1/+4 |
| | | | | | | | Now clients provide a unit conversion context and libcss provides code to perform unit conversion. This reduces the amount of common code that clients have to write. | ||||
* | Computed styles: Remove last traces of extension blocks. | Michael Drake | 2019-05-12 | 1 | -23/+0 |
| | |||||
* | Computed styles: Drop uncommon extension blocks. | Michael Drake | 2019-05-12 | 1 | -4/+0 |
| | | | | | | | | | | | | | | They were a space saving feature, but they became largely redundant with computed style sharing. They also made the code complex and buggy in many places. E.g. the cascade, inheritance / composition, and intial values all needed to behave corretly when they, or their parent, had or didn't have an uncommon block. Also, only the uncommon block was really used. Fixes: https://bugs.netsurf-browser.org/mantis/view.php?id=2641 | ||||
* | Media queries: Update selection API to support media queries. | Michael Drake | 2019-05-04 | 1 | -16/+38 |
| | | | | | | | | | | | | | | | | | | | | | 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> | ||||
* | Media Queries: Update stylesheet import for media query lists. | Michael Drake | 2019-03-10 | 1 | -2/+4 |
| | |||||
* | Selection: Unify rule good for media helper. | Michael Drake | 2018-07-27 | 1 | -24/+2 |
| | |||||
* | Strip trailing whitespace. | Michael Drake | 2017-09-04 | 1 | -169/+169 |
| | |||||
* | Fix: Read beyond allocated memory when removing sheet from selection context. | Michael Drake | 2017-06-27 | 1 | -2/+2 |
| | | | | Thanks to 'effin' on #netsurf. | ||||
* | Select: Squash error-path leak. | Michael Drake | 2017-02-03 | 1 | -1/+0 |
| | | | | | If we allocated a font-face array previously, and failed to extend it, then we failed to free it on the error path. | ||||
* | Selection: Inline styles prevent computed style sharing. | Michael Drake | 2016-11-29 | 1 | -4/+18 |
| | |||||
* | Selection: Try all previous sibling nodes for sharable styles. | Michael Drake | 2016-11-20 | 1 | -7/+8 |
| | | | | Previously we would only consider the first candidate. | ||||
* | Selection: Turn off style sharing debug output. | Michael Drake | 2016-11-19 | 1 | -1/+0 |
| | |||||
* | Enable sharing where pseudo common pseudo classes are the same. | Michael Drake | 2016-11-19 | 1 | -1/+58 |
| | |||||
* | Selection: Abstract common node flags setting code into helper. | Michael Drake | 2016-11-19 | 1 | -44/+22 |
| | |||||
* | Debug for recording which nodes fail to share style and why. | Michael Drake | 2016-11-19 | 1 | -0/+50 |
| | |||||
* | Documentation: Function param comment fix. | Michael Drake | 2016-11-19 | 1 | -1/+0 |
| | |||||
* | Optimisation: Bypass selection by sharing previous sibling's style. | Michael Drake | 2016-11-19 | 1 | -15/+303 |
| | |||||
* | Selection: Split out selection state {initi|fin}alisation. | Michael Drake | 2016-11-19 | 1 | -95/+149 |
| | |||||
* | Make node data contain list of partial node styles. | Michael Drake | 2016-11-19 | 1 | -2/+24 |
| | |||||
* | Separate node data creation and node bloom creation. | Michael Drake | 2016-11-19 | 1 | -18/+37 |
| | |||||
* | Allow more than just bloom to be stored on nodes. | Michael Drake | 2016-11-19 | 1 | -44/+85 |
| | | | | | We now have a css_node_data struct which is sored on nodes. It currently contians just the bloom filter. | ||||
* | Split bloom filter get/set out into helpers. | Michael Drake | 2016-11-19 | 1 | -93/+148 |
| | |||||
* | Remove redundant API surface. | Michael Drake | 2016-11-19 | 1 | -5/+5 |
| | |||||
* | Intern partial styles. | Michael Drake | 2016-11-19 | 1 | -0/+91 |
| | | | | | Note this changes the public API. We can't compose directly over child style now, since it may be interned. | ||||
* | Move trivially compared parts of computed styles to sub-structures. | Michael Drake | 2016-11-19 | 1 | -2/+2 |
| | |||||
* | Access lwc caseless hash through supported API. | Michael Drake | 2016-10-15 | 1 | -26/+18 |
| | |||||
* | Fix up error path. | Michael Drake | 2016-02-08 | 1 | -1/+1 |
| | |||||
* | Change how presentational hints are handled. | Michael Drake | 2016-02-02 | 1 | -33/+36 |
| | | | | | | | | | | | | | | | Previously, we performed normal selection from CSS sources, and then iterated over all the properties in the populated computed style. If the properties were unset or their values were not from either a UA stylesheet or user stylesheet with !important set, then we asked the client program (e.g. NetSurf) if there were any presentational hints for that node, for each such property. In the worst case this triggered N_PROPERTIES * N_NODES calls back to the client program, even for properties that can't be set via HTML attributes. The new API asks the client to supply a list of all the presentational hints that apply to the given node. For most nodes on modern documents, this is 0. Any presentational hints are applied before selection from CSS sources. | ||||
* | Slight simplification of set_initial group checks. | Michael Drake | 2015-08-19 | 1 | -19/+18 |
| | |||||
* | Use calloc instead of malloc/memset. | Michael Drake | 2015-01-24 | 1 | -3/+1 |
| | |||||
* | Fix leak. Coverity #1137921. | Michael Drake | 2013-12-15 | 1 | -1/+1 |
| | |||||
* | Improve explanation of TODO. | Michael Drake | 2013-12-13 | 1 | -1/+5 |
| | |||||
* | Hideous casing to avoid warning (treated as error) with RO toolchain. | Michael Drake | 2013-12-13 | 1 | -1/+3 |
| | |||||
* | Various changes which modify API and ABI: | Michael Drake | 2013-12-13 | 1 | -61/+200 |
| | | | | | | | | | - 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. | ||||
* | Just match against universal string intern instead of checking strings ↵ | Michael Drake | 2013-12-07 | 1 | -0/+1 |
| | | | | length/data. | ||||
* | Significantly optimise CSS selection performance. | Michael Drake | 2013-12-01 | 1 | -55/+27 |
| | | | | | | | | | | | | | | | | 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. | ||||
* | Fix NULL check of array. Coverity #1127067. | Michael Drake | 2013-11-08 | 1 | -5/+3 |
| | |||||
* | Prioritise id and class hashes over element hash when inserting rules. | Michael Drake | 2012-08-26 | 1 | -22/+83 |
| |