about summary refs log tree commit diff stats
path: root/src/css/cascade.nim
Commit message (Collapse)AuthorAgeFilesLines
* catom: at -> satbptato2024-03-211-18/+18
| | | | just for consistency
* rudimentary support for <video>, <audio>bptato2024-03-131-0/+14
| | | | | we just treat them as img tags. lazy, but works suprisingly well -- so long as the server sends us a Content-Type, anyway.
* catom: merge TagType with AttrTypebptato2024-03-041-0/+1
| | | | | it's inefficient and pointless to treat them differently, so just derive a new enum from TagType with a macro
* Allow non-RGB colors in CSSbptato2024-02-241-3/+3
| | | | | | | | | | | The -cha-ansi color type now sets ANSI colors in CSS. Also, color correction etc. has been improved a bit: * don't completely reset output state in processFormat for new colors * defaultColor is now separated from ANSI color type 0 * bright ANSI colors are no longer replaced with bold + dark variant * replaced ANSI color map to match xterm defaults
* css: reduce CSSComputedValue sizebptato2024-02-171-6/+2
| | | | | | | The `t' field was completely redundant, as it's already included in the CSSComputedValues index. + removed some unused functions
* layout: use html/body bgcolor as canvas bgcolorbptato2024-02-171-0/+5
| | | | | | This is required by the standard. (Without this, lots of websites have incorrect background colors, because they set the body height to 100% of the viewport.)
* css: hide noscript tags when scripting is enabledbptato2024-02-131-0/+2
|
* buffer: load external resources when they are attachedbptato2024-02-081-0/+2
| | | | | We no longer have to wait for the entire document to be loaded to start loading CSS.
* dom: enumize attribute namesbptato2024-02-081-18/+18
|
* Update chamebptato2024-02-071-4/+4
| | | | | | | | * Update chame to the latest version * Get rid of nodeType usage * Add atoms * Re-implement DOM attributes * document.write
* Fix windowChange not refreshing valid media queriesbptato2024-01-101-1/+2
| | | | | | | | * css/cascade: copy stylesheet in applyMediaQuery (so that changes are reverted on re-style) * buffer: clear prevstyled in windowChange (to avoid using cached results from previous cascading passes); set window.attrs * pager: avoid windowChange if new attrs are identical to the old ones
* Use std/* imports everywherebptato2024-01-071-3/+3
|
* 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
|