summaryrefslogtreecommitdiff
path: root/src/select/select.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Verify parameters to css_select_style.John Mark Bell2009-02-121-1/+1
| | | | svn path=/trunk/libcss/; revision=6459
* Something approximating font-family. This is hideous.John Mark Bell2009-02-111-0/+3
| | | | svn path=/trunk/libcss/; revision=6439
* So, it transpires that we don't need the selection context in the property ↵John Mark Bell2009-02-111-9/+6
| | | | | | | | handlers after all. Remove that, then. Implement handlers for a few properties. svn path=/trunk/libcss/; revision=6414
* Implement sort ordering. Inevitably, this is more comment than code.John Mark Bell2009-02-101-17/+110
| | | | svn path=/trunk/libcss/; revision=6413
* Purge side bits. These cause more trouble than they're worth, and it's not ↵John Mark Bell2009-02-101-16/+27
| | | | | | as if there's a dearth of opcode space. svn path=/trunk/libcss/; revision=6410
* Much API cleanup.John Mark Bell2009-02-101-23/+141
| | | | | | | | Dispatch property handling through a table. Implement cascade_style. All property handlers are stubs at present. svn path=/trunk/libcss/; revision=6409
* Distinguish between pseudo classes and pseudo elementsJohn Mark Bell2009-02-101-2/+5
| | | | svn path=/trunk/libcss/; revision=6406
* Musings about a potential optimisationJohn Mark Bell2009-02-091-0/+6
| | | | svn path=/trunk/libcss/; revision=6405
* Match detailsJohn Mark Bell2009-02-091-5/+42
| | | | svn path=/trunk/libcss/; revision=6404
* This is more likely to handle universal simple_selectors correctly.John Mark Bell2009-02-091-41/+143
| | | | | | | | Refactor stuff while we're at it. Selector chains containing universal simple components are expensive to match/reject, as they require matching details on every previous sibling/ancestor (depending on the combinator type). Thus, we aim to handle the universal case last, to have the best chance of avoiding it. svn path=/trunk/libcss/; revision=6403
* Match selector chains. Universal selectors will probably break this.John Mark Bell2009-02-091-6/+107
| | | | svn path=/trunk/libcss/; revision=6402
* Beginnings of a handler function table.John Mark Bell2009-02-091-8/+11
| | | | svn path=/trunk/libcss/; revision=6401
* Iterate over the selectors in a stylesheet which match the current node's name.John Mark Bell2009-02-091-3/+76
| | | | svn path=/trunk/libcss/; revision=6400
* Traverse stylesheet tree iteratively.John Mark Bell2009-02-091-22/+60
| | | | svn path=/trunk/libcss/; revision=6399
* Further tweaks. We need to know the <sheet,rule> pair from which a property ↵John Mark Bell2009-02-071-2/+8
| | | | | | got set so that we can determine whether a subsequently defined rule overrides it. svn path=/trunk/libcss/; revision=6395
* Beginnings of a style selection algorithm.John Mark Bell2009-02-071-10/+76
| | | | svn path=/trunk/libcss/; revision=6392
* Fix build.John Mark Bell2009-02-071-1/+18
| | | | | | Sketch out a struct containing the state needed during selection. We need to know the specificity, origin, and importance of the source of the current property value. We also need to know whether the property has been set at all (as this is not available by simply inspecting the computed style struct). svn path=/trunk/libcss/; revision=6391