about summary refs log tree commit diff stats
path: root/src/html
Commit message (Collapse)AuthorAgeFilesLines
...
* cssparser: misc cleanupbptato2024-12-071-2/+2
| | | | another case of "the object model was unnecessarily complex"
* dom: another insertAdjacentHTML fixbptato2024-12-071-2/+2
| | | | ctx can be HTML even if we take `this'
* dom: fix crash on insertAdjacentHTMLbptato2024-12-071-28/+15
| | | | In my defense, it was broken in the spec too.
* env: allow data URL fetchbptato2024-12-051-1/+2
|
* mimetypes: refactor, use mime.types for inline image extensionsbptato2024-12-052-5/+20
| | | | | | | | | | | | * remove std/streams use from mime.types; mmap and parse directly * use mime.types for inline image extensions * add some jpeg file extensions Latter came up because I was trying to add a format locally and it wouldn't recognize it on images from my file system (i.e. by extension). As a security measure we still do not allow additional extensions for predefined inline image types.
* cascade: add cellspacingbptato2024-12-031-0/+1
|
* dom: add support for @importbptato2024-12-011-26/+33
| | | | only the most basic form; no media queries yet
* twtstr: add mypairsbptato2024-11-282-9/+10
| | | | | This couldn't get into system.nim for technical reasons, but it's still pretty useful when iterating over non-mutable openArrays.
* dom: fix some comparisonsbptato2024-11-241-2/+2
|
* loader/* -> serverbptato2024-11-243-12/+12
| | | | one less mystery
* dom: implement HTMLDocument, make Image C/Wbptato2024-11-221-1/+3
| | | | | | | | | | * add HTMLDocument as alias to Document * set Image as configurable/writable So looking closer, HTMLDocument *is* specified, just major browsers don't follow the spec. I doubt this incompatibility causes issues, anyway.
* dom: add document named property getter, update monouchabptato2024-11-221-8/+39
|
* dom: add document.compatModebptato2024-11-221-0/+5
|
* buffer: proper toggleImages implementationbptato2024-11-212-10/+19
| | | | | | | It necessarily removes the config.images check from codec access, which I'm not quite happy about, so I've added a check to the DOM instead. (TODO: maybe pager should just dynamically grant codec access as a capability instead? but maybe that's even more error prone...)
* chadombuilder: fix removeImpl definitionbptato2024-11-211-1/+2
| | | | | It is documented in chame that parentNode may be nil, and indeed, it is nil in some cases.
* dom: add Image constructorbptato2024-11-191-0/+10
|
* event: fix preventDefault with stopImmediatePropagationbptato2024-11-191-5/+4
| | | | canceled was not being set, because we jumped out of the loop too early.
* dom: add HTMLHyperlinkElementUtils settersbptato2024-11-192-30/+82
|
* Update monoucha, fix some JS testsbptato2024-11-183-42/+50
|
* ua.css, event: small clean upbptato2024-11-181-1/+0
|
* buffer: fix hover text not showing up with pseudo elementsbptato2024-11-171-0/+5
| | | | | | | | | | | | | | | | | | This was a bit annoying because it triggered the popup warning on cursorNextLink -> click with form buttons (as the square brackets around [button] are implemented with ::before/::after.) Notably, this also removes the visibility check from isClickable. I suspect there was a good reason why I added it, but I can't remember why, and it's incompatible with what desktop browsers do on: <a href="https://asdf.com" style="visibility: hidden"> <div style="visibility: visible"> test </div> </div> So if it's ever added back, then this case should be respected too.
* dom: add getElementsByName, fix adoptbptato2024-11-161-1/+10
|
* dom: run insertion steps for descendants on insertionbptato2024-11-151-10/+21
| | | | | | | | | wait isn't this exponential -- apparently not, at least not with the DOM builder. (however it is if JS builds the DOM out of place. what can you do, at least it works now.)
* formdata: eliminate a global varbptato2024-11-153-13/+13
|
* js: reorganize modules, update docsbptato2024-11-158-12/+233
| | | | | | | most of it has already been moved to monoucha, and the rest fits better in other directories. also, move urimethodmap to config
* dom: add replaceChild, requestAnimationFramebptato2024-11-103-6/+16
|
* dom: misc fixes & additionsbptato2024-11-092-0/+28
| | | | | | | | * fix cloneNode not cloning id/name atoms * fix HTMLOptionsCollection named item getter * fix HTMLCollection named item getter not refreshing snapshot * support named item getter for form * add basic createEvent
* dom: skip alternate stylesheets, add disabledbptato2024-11-092-6/+14
| | | | seems to work ok
* dom: support all HTMLHyperlinkElementUtils gettersbptato2024-11-092-17/+59
|
* url: fix compilation on Nim 1.6.14bptato2024-11-071-19/+19
| | | | it handles side effects differently
* utils, types: merge some modulesbptato2024-11-031-3/+0
| | | | | * line, vector, matrix -> path * twtuni, charcategory -> twtstr
* dom: add localName, simplifybptato2024-11-021-16/+15
|
* dom: fix <select> default state with size=1bptato2024-11-011-20/+14
|
* dom: add HTMLSelectElementbptato2024-10-311-8/+76
|
* xhr: fix onReadXHR EAGAIN handlingbptato2024-10-281-4/+4
| | | | now it loads invidious comments. wow
* Clean up forward declarations a bitbptato2024-10-277-64/+67
|
* dynstream: refactorbptato2024-10-201-2/+2
| | | | | | | | | | * consistently use cint instead of FileHandle - this was another remnant of winapi support; on posix, they are the same. * move "blocking" field to PosixStream * recvFileHandle -> recvFd, sendFileHandle -> sendFd * merge serversocket into dynstream * merge auxiliary C functions into dynstream_aux
* twtstr, toml: misc cleanupbptato2024-10-131-6/+5
| | | | | * remove unused DateTime toml type * add parseIntP for pointer-size int parsing
* base64: merge into twtstr/envbptato2024-10-132-6/+26
|
* dom: prevent leaking window size through media queriesbptato2024-10-121-3/+4
|
* dom: html -> documentElementbptato2024-10-101-7/+4
| | | | it's effectively a dupe, except html wouldn't work in XML
* env: fix getComputedStyle arg2bptato2024-10-101-1/+1
|
* promise: remove newPromisebptato2024-10-101-3/+1
| | | | normal construction is enough (and it wasn't really used anyway)
* color: reduce CellColor size, misc color refactoringbptato2024-10-061-3/+3
| | | | | | * split out CSSColor from CellColor; now CellColor is just 4 bytes (which helps reduce FormatCell size) * unify color function naming (still not perfect)
* timeout: accept err stream as parambptato2024-09-301-1/+1
| | | | | gets rid of a todo. (not sure why I thought this was important, but it sure looks nicer)
* dom: optimize element size, remove importc hack & dead codebptato2024-09-303-98/+72
| | | | | This switches CAtom to uint32; it seems better to use the same size on all platforms.
* dom: invalidate shared images on loadbptato2024-09-251-0/+1
| | | | fixes the race where reused images wouldn't show up after page load
* Replace std/selectors with pollbptato2024-09-231-19/+14
| | | | | | | | | | | | std/selectors uses OS-specific selector APIs, which sounds good in theory (faster than poll!), but sucks for portability in practice. Sure, you can fix portability bugs, but who knows how many there are on untested platforms... poll is standard, so if it works on one computer it should work on all other ones. (I hope.) As a bonus, I rewrote the timeout API for poll, which incidentally fixes setTimeout across forks. Also, SIGWINCH should now work on all platforms (as we self-pipe instead of signalfd/kqueue magic).
* dom: add forms, elements getter + misc fixesbptato2024-09-172-71/+133
| | | | | | | | | | | | * add document.forms * add form.elements * remove redundant jshasprop functions * use mpairs for attribute iteration (mpairs use pointers, but pairs copies) * fix remove() crash * fix remove() collection invalidation for children (if parent is not in the collection) * update monoucha
* loader: refactor/move around some procsbptato2024-09-153-5/+6
| | | | | | | | | | | | | | Module boundaries didn't make much sense here either. Specifically: * loader/cgi was originally just one of the many "real" protocols supported by loader, so it was in a separate module (like the other ones). Now it's mostly an "internal" protocol, and it was getting cumbersome to pass all required loader state to loadCGI. * The loader interface has grown quite large, but there is no need for (or advantage in) putting it in the same module as the implementation. Now CGI is handled by loader, and the interface is in the new module "loaderiface".