summaryrefslogtreecommitdiff
path: root/src/select/select.c
Commit message (Collapse)AuthorAgeFilesLines
...
* The document root element cannot be the child of anythingJohn Mark Bell2011-01-311-12/+25
| | | | svn path=/trunk/libcss/; revision=11572
* Fix specificity calculation for prefix, suffix, and substring attribute ↵John Mark Bell2011-01-311-0/+21
| | | | | | | | selectors. Fix dumping of these selectors when debugging selector chains svn path=/trunk/libcss/; revision=11569
* CSS3 SelectorsJohn Mark Bell2011-01-311-4/+293
| | | | svn path=/trunk/libcss/; revision=11557
* Rename all css_[^_] internal symbols to css__ so that they're nicely namespacedDaniel Silverstone2011-01-261-4/+4
| | | | svn path=/trunk/libcss/; revision=11492
* Ensure there are zero global symbols without css_ or css__ in front of them. ↵Daniel Silverstone2011-01-201-3/+3
| | | | | | 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
* Turns out, we know the size of the styles block up-front.John Mark Bell2011-01-051-3/+1
| | | | svn path=/trunk/libcss/; revision=11214
* Simultaneously select styles for base + pseudo elements.John Mark Bell2011-01-051-118/+195
| | | | svn path=/trunk/libcss/; revision=11211
* Complete the fix for pseudo element selection: inline styles and ↵John Mark Bell2011-01-021-6/+18
| | | | | | presentational hints must not be applied to pseudo elements. svn path=/trunk/libcss/; revision=11181
* When selecting for a node's pseudo elements, only match rules which apply to ↵Michael Drake2011-01-011-11/+24
| | | | | | the pseudo element, and not the raw node as well. svn path=/trunk/libcss/; revision=11177
* Remove ownerNode and ownerRule fields from stylesheet objects.John Mark Bell2010-06-271-3/+11
| | | | | | | | | | | These prevent stylesheets being used in multiple contexts simultaneously. Their values can be inferred from the context in which the stylesheet is used. Replace use of ownerRule to backtrack in style selection with a (fixed-size) stack of rules to process. This prevents crashes when a sheet that was previously imported somewhere is reused as a top-level sheet. svn path=/trunk/libcss/; revision=10581
* Really fix hint leaks. Hint data ownership is passed to libcss.John Mark Bell2010-04-291-0/+3
| | | | | | Ensure that hint is initialised before asking client to populate it (so as to guard against broken clients) svn path=/trunk/libcss/; revision=10520
* Fix libcss to use new libwapcaplet behaviour.Daniel Silverstone2010-03-271-51/+29
| | | | | | | TODO: update the tests to include a refcounting proof svn path=/trunk/libcss/; revision=10162
* Origin and media are not properties of the stylesheet. John Mark Bell2010-01-121-44/+74
| | | | | | | | | They are properties of the context in which the stylesheet is used. Therefore, for top-level sheets, this information must be provided at selection time. For child sheets, the origin is inherited from their parent and the applicable media types are specified on the linking mechanism. svn path=/trunk/libcss/; revision=9802
* Lose redundant assignments.John Mark Bell2009-11-221-3/+0
| | | | | | | | Drop some dead code. Avoid a potential NULL dereference. Add missing "break" in initial substate of block context parser svn path=/trunk/libcss/; revision=9678
* s/opcode/opcode_t/John Mark Bell2009-08-031-1/+1
| | | | svn path=/trunk/libcss/; revision=9020
* Change selector hash to segregate:John Mark Bell2009-07-291-35/+162
| | | | | | | | | | | | | 1) element selectors 2) universal selectors with class names 3) universal selectors with ids 4) universal selectors Only bother looking for matching selectors in 2 & 3 if the node being selected for has class names or an id, respectively. In theory, this should speed up style selection somewhat. svn path=/trunk/libcss/; revision=8882
* Match details before considering combinators.John Mark Bell2009-07-221-14/+13
| | | | svn path=/trunk/libcss/; revision=8667
* Change mechanism for handling case sensitivity of element names. Now has ↵John Mark Bell2009-07-171-13/+2
| | | | | | | | another selection handler callback for this. Change selector hash to use an ASCII case-insensitive hash function. svn path=/trunk/libcss/; revision=8602
* It is necessary to consider the element name when matching selectors. John Mark Bell2009-07-171-6/+27
| | | | | | | Firstly, the chains being processed are from a hashtable, so aren't guaranteed to apply to the element being selected. Secondly, when processing combinators, we have a completely different node object to compare. svn path=/trunk/libcss/; revision=8593
* Ensure that we merge-sort the element and universal selector chains during ↵John Mark Bell2009-07-171-44/+51
| | | | | | selection. svn path=/trunk/libcss/; revision=8592
* Fix matching of named ancestor combinators.John Mark Bell2009-07-171-34/+166
| | | | | | Add some helpful debug -- disabled by default. svn path=/trunk/libcss/; revision=8591
* Fix selection from selectors within @media blocks.John Mark Bell2009-07-151-8/+14
| | | | svn path=/trunk/libcss/; revision=8549
* Fix processing of rules after @import -- previously, they were completely ↵John Mark Bell2009-07-081-1/+1
| | | | | | ignored. svn path=/trunk/libcss/; revision=8386
* Compute absolute values for all length properties.John Mark Bell2009-07-041-1/+1
| | | | | | | Make initial border-*-color match the computed color. Compute correct value of display/float wrt position. svn path=/trunk/libcss/; revision=8317
* Add callback to make client compute the font size.John Mark Bell2009-07-041-5/+13
| | | | | | Some progress towards computing absolute values. svn path=/trunk/libcss/; revision=8311
* Ensure that any properties explicitly set to inherit on the root element are ↵John Mark Bell2009-07-041-53/+71
| | | | | | set to their initial values. svn path=/trunk/libcss/; revision=8309
* Query client for initial values of color, font-family, quotes, and ↵John Mark Bell2009-07-041-4/+4
| | | | | | voice-family properties. svn path=/trunk/libcss/; revision=8306
* Factor out setting of property values from hints or initial values.John Mark Bell2009-07-041-65/+73
| | | | | | Invert logic, so that "continue" does not occur. svn path=/trunk/libcss/; revision=8295
* Merge iterations across computed styleJohn Mark Bell2009-07-041-60/+59
| | | | svn path=/trunk/libcss/; revision=8294
* Similar fix for empty rules in normal stylesheets.John Mark Bell2009-07-011-0/+5
| | | | svn path=/trunk/libcss/; revision=8244
* Blank inline styles, or inline styles that only contain invalid data will ↵John Mark Bell2009-07-011-5/+6
| | | | | | have no bytecode. This is perfectly legitimate, so should not result in an error. svn path=/trunk/libcss/; revision=8243
* Ensure that the root element has its styling set to the initial values.John Mark Bell2009-06-291-3/+10
| | | | svn path=/trunk/libcss/; revision=8158
* Support for parsing inline stylesJohn Mark Bell2009-06-261-0/+25
| | | | svn path=/trunk/libcss/; revision=8024
* Make selection ignore selectors generated by rules in inactive @media blocks.John Mark Bell2009-06-261-6/+44
| | | | svn path=/trunk/libcss/; revision=8015
* Completely change the approach used for presentational hints.John Mark Bell2009-03-231-13/+34
| | | | | | | | This one stands a chance of working sanely. While this compiles, please don't expect it to link. svn path=/trunk/libcss/; revision=6820
* Sketch out something for presentational hints.John Mark Bell2009-03-221-1/+13
| | | | | | | The client will have to maintain some state to be able to calculate this struct for every node selection, but that shouldn't be overly onerous. Also, the mess surrounding centering can only be sensibly solved through the addition of a new, prefixed, property. svn path=/trunk/libcss/; revision=6816
* Some changes. No idea what they are, mind you.John Mark Bell2009-02-151-0/+1
| | | | svn path=/trunk/libcss/; revision=6536
* Move property dispatch table out of select.c so it can be used by the ↵John Mark Bell2009-02-151-185/+14
| | | | | | computed style composition code. svn path=/trunk/libcss/; revision=6523
* Pay attention to the disabled flag on top-level stylesheetsJohn Mark Bell2009-02-151-2/+4
| | | | svn path=/trunk/libcss/; revision=6520
* Port libcss to libwapcaplet.Daniel Silverstone2009-02-141-102/+126
| | | | | | | | | It passes the tests, perhaps we need more of them. Lifetimes of lwc_string objects really need attention before we can consider this finished. svn path=/trunk/libcss/; revision=6517
* I was on crack this morning, it would appear.John Mark Bell2009-02-141-2/+0
| | | | svn path=/trunk/libcss/; revision=6505
* Drop css_error_handler and rename css_alloc to css_allocator_fnDaniel Silverstone2009-02-141-2/+2
| | | | svn path=/trunk/libcss/; revision=6482
* Pseudo classes are now matched by callbacks to the client. This is far ↵John Mark Bell2009-02-141-68/+27
| | | | | | | | | saner, as any node may match a pseudo class, not just the immediate target of the selection. Munge test data to no longer expect :active to match -- there's currently no way to specify which node(s) in the tree have which pseudo classes applying to them. The pseudo classes on @page are no longer supported (namely, :left, :right, :first). These, and @page itself, probably want a dedicated API, as they are nothing to do with normal selection. Probably something like css_error css_select_page_margins(ctx, CSS_PAGE_LEFT, &computed); svn path=/trunk/libcss/; revision=6476
* Handle :first-child within libcssJohn Mark Bell2009-02-141-5/+4
| | | | svn path=/trunk/libcss/; revision=6474
* Flag todoJohn Mark Bell2009-02-141-0/+2
| | | | svn path=/trunk/libcss/; revision=6472
* Fix matching of universal sibling selectors -- siblings must be adjacent.John Mark Bell2009-02-141-3/+5
| | | | svn path=/trunk/libcss/; revision=6471
* A motley selection of changes. Vague summary:John Mark Bell2009-02-141-122/+333
| | | | | | | | | | | | | | | | | | + Add config makefile (not that there's anything to configure at present :) + Fix dumping of UNIT_MS to actually use sprintf and not printf + Extend computed style dumping (still loads of properties missing) + Make result buffer larger in select-auto.c -- avoids buffer overflows when there's way more output than expected + Expand expected test output to contain defaulted properties (more of this will be needed once the computed style dumping is complete) + Store interned string pointers in css_select_state. + Intern pseudo class/element names at start of selecting styles for a sheet + Group properties so we know which ones appear in the extension blocks + Fixup unset properties once the cascade has completed + Implement matching of pseudo class/element selectors + Fix setting of background-image and list-style-image when there's no URL. svn path=/trunk/libcss/; revision=6470
* Ensure pseudo classes/elements fail to match.John Mark Bell2009-02-131-0/+6
| | | | | | Ensure that plain element selectors match. svn path=/trunk/libcss/; revision=6467
* Don't attempt to match details on a NULL pointerJohn Mark Bell2009-02-121-10/+13
| | | | svn path=/trunk/libcss/; revision=6460