about summary refs log tree commit diff stats
path: root/src/css
Commit message (Collapse)AuthorAgeFilesLines
...
* css: support more list types, fix <ul/ol type=...bptato2023-10-142-9/+39
| | | | | | | 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-142-2/+59
|
* css: change type of rvalue to char (from Rune)bptato2023-10-014-52/+62
| | | | | | | | We did were not using it as a unicode value anywhere, it was just making our life harder. If we ever need unicode delimiter tokens, we can re-introduce them as a different token type.
* selectorparser: fix missing case insensitivitybptato2023-10-011-10/+16
|
* Use twtstr.join everywherebptato2023-10-011-1/+2
|
* Get rid of unicode.toLowerbptato2023-10-012-4/+5
| | | | | It was used by mistake in a hundred percent of the cases we were using it.
* px: convert to float first for percentage valuesbptato2023-09-201-1/+1
| | | | | | | | | px now converts to float64 before converting back to a layout unit when calculating percentage values. This should reduce overflow crashes somewhat. (The real solution would be to not crash on overflow, but that's a little more difficult problem to solve.)
* update chamebptato2023-09-191-0/+1
| | | | and with that, resolve the unknown input type issue
* move around more modulesbptato2023-09-144-5/+5
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* twtstr: simplifybptato2023-09-131-2/+3
| | | | | | * remove unused function isAlphaAscii * swap pushHex for less casting * remove == overload for char/rune (we did not really use it anyway)
* 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)
* refactor: Result[T, DOMException] -> DOMResult[T]bptato2023-08-281-9/+6
|
* javascript: refactorbptato2023-08-281-1/+1
| | | | | | | Split out parts of the JS module, because it was starting to confuse the compiler a little. (Peakmem is back at 750M. Interesting.)
* 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-155-5/+10
| | | | Operation "modularize Chawan somewhat" part 2
* mediaquery: fix logic errorbptato2023-08-141-1/+1
| | | | Not isAscii means we cannot convert to char. Oops.
* css: implement case insensitivitybptato2023-08-102-127/+142
| | | | For some reason I forgot about this.
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-012-3/+4
| | | | | | | | | | | | | | * Import punycode, as it has been removed from stdlib. * Fix some syntax errors * Apparently you can no longer compare distinct pointers with nil. Add explicit comparisons with typeof(nil) instead. * htmlparser: rename _ to other, as semantics of _ have changed. (Quite a shame, it looked better with _. Oh well.) * Explicitly specify mm:refc, as the browser OOMs with orc for some reason. Confirmed to compile & run on 2.0.0, 1.6.14, 1.6.12, 1.6.10 and 1.6.8. (<1.6.8 it's broken & wontfix.)
* css: very minor optimizationsbptato2023-07-282-19/+15
| | | | probably insignificant overall
* mediaquery: fix some missing has checks in parserbptato2023-07-281-0/+2
|
* css: handle unknown tag names correctlybptato2023-07-253-5/+16
| | | | | | Instead of grouping all of them into TAG_UNKNOWN, match their tag names. To-do: this implementation is not very efficient.
* mediaquery: better debugging functionsbptato2023-07-231-3/+35
|
* css: fix percentage min/max-width valuesbptato2023-07-231-1/+1
|
* Add StyledNode stringifier for debuggingbptato2023-07-081-0/+14
|
* Fix bug in media-query parsingbptato2023-07-043-12/+36
| | | | This fixes interpretation of "@media (min/max-width: 1234px)".
* Use LayoutUnit in layoutbptato2023-07-042-24/+28
| | | | 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.
* cssparser: remove unused function, cast instead of collectbptato2023-06-291-21/+5
|
* css/values: remove stray eprintbptato2023-06-251-2/+0
|
* cssparser: remove SyntaxErrorbptato2023-06-251-20/+27
| | | | return DOMException instead
* css/values: use Result instead of exceptionsbptato2023-06-252-308/+342
|
* input size as presentational hintbptato2023-06-181-0/+8
|
* Fix various layout bugs, prepare for image supportbptato2023-06-122-6/+9
|
* Use width, height for canvas in cssbptato2023-06-101-1/+1
|
* Add support for visibilitybptato2023-06-071-5/+25
|
* Add support for width, height media querybptato2023-06-073-46/+220
|
* Add support for canvas and multipartbptato2023-06-053-25/+20
| | | | | | | | | | | | | | | 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/values: add some stringifiersbptato2023-03-101-4/+13
|
* css/match: fix next sibling selector (+)bptato2023-02-131-2/+2
|
* Remove unused variablebptato2023-01-271-1/+0
|
* WIP selector rewritebptato2023-01-274-451/+365
| | | | pretty slow for some reason
* selectorparser: refactor, fix combinator bugsbptato2023-01-201-79/+79
| | | | Fixes universal selectors after a combinator.
* selectorparser: parse comma correctly in combinatorsbptato2023-01-201-0/+3
|
* css/values: remove equalsbptato2023-01-081-32/+0
| | | | it had zero practical use and was annoying anyways
* css/values: add floatbptato2023-01-081-4/+23
| | | | it does nothing...
* css/cascade, layout/engine: add table alignbptato2023-01-082-5/+17
| | | | Also fix margin-left/right: auto, to some extent.
* selectorparser: do not accept invalid selectorsbptato2023-01-071-44/+78
|
* css/cascade: remove scoped sheetsbptato2023-01-072-34/+2
| | | | ...in favor of handling all style elements like other browsers
* css/values, parser, ...: fix background-imagebptato2023-01-062-8/+44
|
* ua.css: fix color, css/values: fix globalsbptato2023-01-041-1/+8
|