about summary refs log tree commit diff stats
path: root/src/css/cssparser.nim
Commit message (Collapse)AuthorAgeFilesLines
* twtstr: remove tolower, isWhitespacebptato2023-11-201-5/+6
| | | | | | | | * tolower: strutils toLowerAscii is good enough for the cases where we need it. Also, it's easy to confuse with unicode toLower and vice versa. * isWhitespace: in AsciiWhitespace is more idiomatic. Also has a naming collision with unicode toLower.
* dom: add some CSSStyleDeclaration functionsbptato2023-10-251-2/+5
|
* css: change type of rvalue to char (from Rune)bptato2023-10-011-25/+33
| | | | | | | | 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.
* 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/
* 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.)
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-011-2/+3
| | | | | | | | | | | | | | * 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.)
* cssparser: remove unused function, cast instead of collectbptato2023-06-291-21/+5
|
* cssparser: remove SyntaxErrorbptato2023-06-251-20/+27
| | | | return DOMException instead
* Add support for canvas and multipartbptato2023-06-051-4/+4
| | | | | | | | | | | | | | | 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, parser, ...: fix background-imagebptato2023-01-061-2/+5
|
* css: fix some bugs and improve cascading a bitbptato2022-12-291-1/+1
|
* cssparser: check for EOF in first read chunkbptato2022-12-141-1/+4
| | | | To-do: use decoderstream...
* Fix stream error handling confusion, title displaybptato2022-12-131-2/+5
| | | | Also probably other fixes.
* cssparser: fix a parseAnB bugbptato2022-12-121-1/+1
| | | | Just a typo...
* Fix nth-child bugs, rename select to matchbptato2022-08-231-30/+37
|
* Merge functional and normal pseudo-class selectorsbptato2022-08-211-5/+160
| | | | And parse An+B syntax for nth-child/nth-last-child.
* Fix incorrect selector parsing, remove httpclient from loaderbptato2022-08-031-1/+2
|
* Update CSS tokenizerbptato2022-07-291-201/+218
| | | | It was slightly outdated and in many places incorrect.
* Fix incorrect use of del()bptato2022-07-291-3/+3
|
* Fix a parser bugbptato2022-07-171-4/+1
| | | | Plus a few warnings.
* Rename conflicting source filesbptato2022-05-101-0/+817
| | | | Nim can't really differentiate between them, unfortunately.
* Rename cssparser.nimbptato2021-08-101-818/+0
|
* Some refactoringbptato2021-08-101-3/+2
|
* Reorganize importsbptato2021-08-071-4/+2
|
* Refactoring in buffer.nimbptato2021-08-061-1/+0
|
* Implement new buffer model which supports X coordsbptato2021-08-051-2/+1
| | | | ...also, one can kinda use this as a file viewer now I guess
* More css stuffbptato2021-08-041-3/+13
|
* CSS selectors and re-organizationbptato2021-07-301-0/+813