about summary refs log tree commit diff stats
path: root/src/html/dom.nim
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate some superfluous copiesbptato2025-05-111-4/+4
|
* fromjs: switch back res to `var' from `out'bptato2025-05-101-2/+2
| | | | | | | | The original goal was to comply the Uninit warning, but this is now a futile effort as Uninit is no longer planned to be the default in Nim. Setting `res' to its type's default value is therefore just a waste of cycles when it's already zero-initialized.
* Enable ProveInit warningbptato2025-05-101-4/+10
| | | | It has caught some minor bugs.
* event: implement capturing phase, misc improvementsbptato2025-05-051-5/+14
| | | | Fixes acid3 tests 31, 32
* dom, event: add UIEvent to createEvent, initUIEventbptato2025-05-031-0/+5
| | | | Fixes acid3 test 30
* url: add schemeType, fix port bug on protocol assignmentbptato2025-05-031-4/+4
| | | | Allows branching on the scheme without string comparisons.
* loader: remove target pid from addCacheFilebptato2025-04-151-4/+3
| | | | I wonder if it would be better to just resume in the buffer.
* dom: add textarea value setter, defaultValuebptato2025-04-141-2/+20
|
* dom: remove expensive assertionbptato2025-03-291-1/+0
|
* dom: fix a style invalidation bugbptato2025-03-271-5/+8
| | | | Clearing the entire dependedBy array in applyStyleDependencies is wrong.
* xmlhttprequest: fix open with credentialsbptato2025-03-231-6/+3
| | | | | * ignore username/password if undefined * do not throw on subsequent fetch with username/password
* dom: fix cache-control whitespace handlingbptato2025-03-121-10/+9
|
* headers: hide table, always specify guardbptato2025-03-121-10/+10
|
* Re-add JSValueConstbptato2025-03-121-44/+44
| | | | | | | | | This time, I've also ported over the consistency check to prevent some ownership bugs. Unfortunately, the check is very limited, and it is still possible to double-free or leak JSValues. I think it would be possible to make coverage 100%, but only with ARC...
* tojs: misc cleanupbptato2025-03-071-13/+35
| | | | | | | * optimize toJS set * change defineProperty wrappers to return an enum If we're going to wrap defineProperty, then let's do it properly.
* javascript: remove ishtmldda from registerTypebptato2025-03-061-3/+6
| | | | | | | It's simpler and more efficient to handle this in the DOM. (The interface was also confusing/broken in that it only really accepted one htmldda class.)
* dom: implement some interfacesbptato2025-03-041-1/+43
|
* buffer, dom: fix stylesheet leaksbptato2025-03-021-0/+1
|
* Refactor bufreader, bufwriterbptato2025-03-011-1/+1
| | | | | This adds a runtime check to packet readers to ensure that all fds have been read, and switches to seqs for packet writers.
* dynstream, console: remove DynFileStreambptato2025-02-261-1/+1
| | | | | Conflating buffered streams with non-buffered streams is generally a bad idea.
* dynstream: remove exceptionsbptato2025-02-261-6/+4
| | | | | | | | | | | | | Now we just pass down the value of n and check errno, plus readDataLoop/writeDataLoop returns a bool indicating whether it failed. For now this seems to work OK, but maybe I'll add a better abstraction in the future. EOFError is still used for handling failed packets; this is brittle, and should be replaced once we have a proper buffering mechanism for them. (That will also let us kill BufStream.) Unrelated: this also fixes a bug in buffer with cacheId.
* dom: add HTMLTimeElement, fix HTMLDetailsElement#openbptato2025-02-211-0/+5
|
* dom: add HTMLOptionsCollection setterbptato2025-02-201-0/+20
|
* dom: do not reflect name on all elementsbptato2025-02-191-3/+18
|
* fromjs, javascript: optimize out class name registrybptato2025-02-191-13/+7
| | | | | | | | Instead of hashing the class name for isInstanceOf, we now just reuse the Nim type pointer -> JSClassID map, which should be more efficient. This removes getClass and hasClass; these can be replaced by just reusing the class ID returned from registerType.
* Add mark-links featurebptato2025-02-181-0/+16
| | | | ref. https://todo.sr.ht/~bptato/chawan/43
* catom: toStr -> $bptato2025-02-151-22/+17
|
* xhr, event, catom: fix some bugsbptato2025-02-151-154/+135
| | | | Event handler functions can be set twice now.
* dom: store pseudo-element computed values in a seqbptato2025-02-141-7/+13
| | | | | A map isn't so bad with three pointers, but it won't be viable once we start adding more pseudo-elements.
* csstree, layout: more refactoringbptato2025-02-131-24/+22
| | | | | Base InlineBox is a fair bit smaller now, and (most) strings are cached using RefString.
* catom: make factory globalbptato2025-02-131-179/+120
| | | | | This isn't great, but neither was passing around a pointer that pointed to a single object.
* dom: add DocumentType name, publicId, systemId gettersbptato2025-02-131-3/+3
|
* dom: various select fixes/improvementsbptato2025-02-081-16/+31
| | | | | | | | * do not trigger change event if selection did not change * do not destroy old selection on option insertion steps * position select popup correctly * reflectors for disabled attribute * immediately redraw container when select disappears
* dom: add fireEvent for Event objectsbptato2025-02-081-1/+4
|
* buffer, event: add input events, set isTrustedbptato2025-02-071-0/+6
|
* dom: various collection fixesbptato2025-02-051-8/+28
| | | | | | | | | | * fix iterator assertion failing if finalizer del's after incl * fix strange mismatch in id * fix missing HTMLOptionsCollection finalizer * optimize refreshCollection * fix root liveCollections not being updated by the finalizer Now it shouldn't crash pages anymore.
* dom: fix @import processing orderbptato2025-02-031-14/+31
| | | | Not only was it wrong until now, it was also non-deterministic...
* dom, event: stub UIEvent, MouseEvent; accept customevent in createEventbptato2025-02-031-3/+7
|
* dom: expose activeElementbptato2025-02-031-1/+1
|
* buffer: fire change event on selection etcbptato2025-02-031-0/+4
|
* dom: reflect iframe src, namebptato2025-02-031-2/+2
|
* dom: fire load event on image loadbptato2025-02-031-0/+3
|
* dom: add blur()bptato2025-02-021-0/+6
|
* dom: load inline module scripts toobptato2025-02-011-5/+21
|
* dom: stub scrollIntoViewbptato2025-02-011-0/+3
|
* dom: handle exceptions in module scriptbptato2025-02-011-7/+10
|
* dom, layout: fix empty canvas cache idsbptato2025-02-011-0/+2
| | | | ok now I understand why I made shareCachedItem crash...
* dom: add title setter, unify newText usebptato2025-02-011-4/+18
| | | | createTextNode is redundant...
* dom: basic module supportbptato2025-02-011-9/+32
| | | | probably breaks with TLA
* buffer: drop pipe, pipe2, passFd privilegesbptato2025-01-301-20/+4
| | | | | All uses of these could be delegated to other processes with more privileges.