about summary refs log tree commit diff stats
path: root/src/html
Commit message (Collapse)AuthorAgeFilesLines
...
* response: automatically resume before closebptato2024-12-191-5/+0
| | | | doing it manually is too error prone
* css: add :target pseudo classbptato2024-12-171-1/+12
|
* dom, match: optimize :nth-child, :nth-last-childbptato2024-12-171-8/+30
| | | | | | I want to use it in the UA sheet, so the loop won't cut it. (Also fix a parsing bug that prevented "of" from working.)
* default(T) -> T.default, add some strict defsbptato2024-12-172-2/+2
|
* css: resolve units to px before layoutbptato2024-12-161-6/+15
| | | | Lets us skip a couple pointless multiplications/divisions during layout.
* dom, css: fix case-insensitive class/id/attr matchingbptato2024-12-152-9/+35
| | | | Uses an additional lower-case map for O(1) case-insensitive comparisons.
* css: align h[1-6] behavior with w3mbptato2024-12-141-0/+23
| | | | | | | | | | | Implemented using proprietary selectors -cha-first-node and -cha-last-node, modeled after -moz-first-node and -moz-last-node. I think they are compatible. That does mean this is more limited than w3m's trimming, e.g. it can't really deal with nesting or empty tags. I think this is fine, as it's mainly meant for unstyled documents in the first place (which are unlikely to have e.g. MAIN tags).
* dom: remove cached childNodes, children pointersbptato2024-12-131-34/+37
| | | | | | | Instead, just define the actual value over the getter function on the first use. Also, avoid accidentally creating the attributes NamedNodeMap on adopt.
* dom: queryCommandSupported, HTMLIFrameELement stubbptato2024-12-131-0/+7
|
* twtstr: reduce copying in atobbptato2024-12-121-3/+3
|
* mimetypes: use cmpIgnoreCase for JS typesbptato2024-12-121-4/+4
|
* 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
|