about summary refs log tree commit diff stats
path: root/src/css/cascade.nim
Commit message (Collapse)AuthorAgeFilesLines
* cascade: simplifybptato2023-12-091-2/+1
|
* cascade: fix regressionbptato2023-12-091-18/+23
| | | | | Styled children must be added to their parents *before* they are styled, because match expects this to hold.
* sheet: fix a correctness issue, misc refactoringsbptato2023-12-091-2/+2
| | | | | | | * Fix a bug where rules would be sorted incorrectly if retrieved from the cache. * Use withValue where possible * camelCase some variables, de-extern some functions, etc.
* cascade: refactor & optimizebptato2023-12-091-153/+192
| | | | | | * Break up applyRules into smaller functions * Do not call calcRules for every child pseudo element separately; just use parent's DeclarationListMap
* layout: add floatsbptato2023-11-171-2/+2
| | | | | | | | | | | | | yay!!!! * Add support for float: left, float: right Also, misc stuff: * Add support for display: flow-root * Set line width to the maximum allowed width on line wrap * Various refactorings Still todo: support clear
* Add jspropnames, CSSStyleDeclaration stubbptato2023-10-251-5/+3
|
* css: fix list style type presentational hintsbptato2023-10-141-17/+20
| | | | third time's the charm
* css: support more list types, fix <ul/ol type=...bptato2023-10-141-5/+15
| | | | | | | Turns out you can't just throw the value into the CSS value parser. (Also, correction for the previous commit message: it is not LI but UL or OL.)
* css: support alphabetic list types, support <LI TYPE=...bptato2023-10-141-0/+9
|
* update chamebptato2023-09-191-0/+1
| | | | and with that, resolve the unknown input type issue
* move around more modulesbptato2023-09-141-1/+1
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* color: fix parseLegacyColor bugsbptato2023-09-131-6/+10
| | | | | | * lower-case the input string. * do not fall back to black on error. (i.e. remove the special cased parseLegacyColor0 in cascade)
* config: allow modification through JSbptato2023-08-271-9/+12
| | | | | | | This used to be possible until I moved everything under separate headers to their respective objects. Now it works again, mostly; modification of some attributes is still missing.
* Move HTML parsing into Chamebptato2023-08-151-1/+2
| | | | Operation "modularize Chawan somewhat" part 2
* css: very minor optimizationsbptato2023-07-281-5/+5
| | | | probably insignificant overall
* Fix bug in media-query parsingbptato2023-07-041-6/+16
| | | | This fixes interpretation of "@media (min/max-width: 1234px)".
* Use LayoutUnit in layoutbptato2023-07-041-4/+5
| | | | Reduces ugly rendering caused by rounding errors.
* cascade: remove sugar, add DeclarationListMap typebptato2023-06-291-36/+53
| | | | So we don't have to pass each DeclarationList separately.
* input size as presentational hintbptato2023-06-181-0/+8
|
* Fix various layout bugs, prepare for image supportbptato2023-06-121-1/+2
|
* Use width, height for canvas in cssbptato2023-06-101-1/+1
|
* Add support for width, height media querybptato2023-06-071-23/+35
|
* Add support for canvas and multipartbptato2023-06-051-6/+6
| | | | | | | | | | | | | | | Quite incomplete canvas implementation. Crucially, the layout engine can't do much with whatever is drawn because it doesn't support images yet. I've re-introduced multipart as well, with the FormData API. For the append function I've also introduced a hack to the JS binding generator that allows requesting the JSContext pointer in nim procs. Really I should just fix the union generator thing and add support for overloading. In conclusion, for now the only thing canvas can be used for is exporting it as PNG and uploading it somewhere. Also, we now have PNG encoding and decoding too. (Now if only we had sixels as well...)
* css/cascade, layout/engine: add table alignbptato2023-01-081-0/+10
| | | | Also fix margin-left/right: auto, to some extent.
* css/cascade: remove scoped sheetsbptato2023-01-071-32/+2
| | | | ...in favor of handling all style elements like other browsers
* dom: add better attribute reflectionbptato2023-01-021-2/+4
| | | | | Instead of creating a new function for each attribute, use a single magic function for reflected attributes.
* selectorparser: support :link, :visitedbptato2023-01-011-4/+3
| | | | I say "support", but :visited is never matched.
* cascade: document a bitbptato2023-01-011-2/+7
|
* css/cascade: fix stylesheets not being copied in <head>bptato2022-12-311-1/+3
|
* css: fix some bugs and improve cascading a bitbptato2022-12-291-11/+22
|
* layout/engine: get rid of dom dependencybptato2022-12-271-18/+39
| | | | Layout should only depend on cascading.
* Implement DOMTokenList, item functions for collectionsbptato2022-12-261-1/+1
|
* Add font color presentational hintbptato2022-12-251-0/+6
|
* More DOM workbptato2022-12-191-3/+3
|
* Display text for img tag, background-imagebptato2022-12-161-3/+15
|
* Fix color contrast correctionbptato2022-12-121-0/+5
| | | | | Instead of just inverting the color and hoping for the best, convert it to YUV and increase/decrease luminance based on results.
* Add support for q, fix list-item counter behaviorbptato2022-12-121-4/+12
|
* Add div alignbptato2022-12-111-0/+9
|
* Support vertical-align on tdbptato2022-12-111-1/+14
|
* Add textareabptato2022-11-281-5/+18
| | | | Editing is implemented using an external editor (like vi).
* Fix some table layout issuesbptato2022-11-251-0/+2
|
* Add some quirks mode rules + presentational hintsbptato2022-11-251-1/+43
| | | | Only as a POC for now.
* Avoid forking child processes from the main processbptato2022-11-241-1/+3
| | | | Caveat: this breaks piped streams.
* Make it compile...bptato2022-10-191-2/+2
|
* Re-enable media queriesbptato2022-10-191-2/+3
|
* Fix nth-child bugs, rename select to matchbptato2022-08-231-1/+1
|
* Fix incorrect selector parsing, remove httpclient from loaderbptato2022-08-031-9/+24
|
* Implement revert valuebptato2022-07-301-59/+20
|
* Fix cascading bugs & performance issuesbptato2022-07-281-3/+10
|
* Fix StyledNode invalidation & othersbptato2022-07-271-44/+40
|