about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* config: allow modification through JSbptato2023-08-273-57/+125
| | | | | | | 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.
* javascript: allow by-ref getters to non-ref objectsbptato2023-08-271-36/+161
| | | | | | | | This makes not creating separate reference types for SameObject attributes possible. Also add a fromJS2 "hook" to allow defining fromJS behavior in modules other than javascript.
* Allow overriding libcurl namebptato2023-08-261-3/+9
| | | | for better compatibility with curl-impersonate
* mailcap: fix newline parsingbptato2023-08-261-1/+1
| | | | skipBlanks should not consume newlines.
* config: fix overriding default headersbptato2023-08-263-28/+27
| | | | | * simplify ActionMap reading * introduce separate case for Table
* Allow overriding default headersbptato2023-08-264-16/+7
|
* toml: various fixesbptato2023-08-261-8/+11
| | | | | * Increase line counter on newline in array & inline table parsing * Fix broken inline table parsing
* javascript: misc. refactoringsbptato2023-08-243-48/+37
| | | | | | | | | | | | * Remove some unused properties from objects * Un-extern JSFunctionList * Remove js/javascript dependency from regex (the wrapper functions were rather pointless) * Remove setProperty (only toJS(Table) used it, but there we have to use defineProperty instead.) * Accordingly, use definePropertyCWE in toJS(Table) * Simplify fromJSTable (replace pointer arithmetic with UncheckedArray) * Reduce implicit `result' usage
* dom: add some null checks for windowbptato2023-08-232-5/+9
| | | | | | | Now that we have established that window *can* be nil. (Though the document.location window null check is probably unnecessary, because it is only called from scripts... but better safe than sorry.)
* DOMParser: use correct URLbptato2023-08-232-10/+13
| | | | | | | | Use current document's URL if window && window.document, otherwise default to about:blank. Also, it seems that passing nil to window is really necessary in some cases, so remove notes indicating otherwise.
* javascript: optimize unforgeable definitionbptato2023-08-231-16/+26
| | | | | | | | | Walking the prototype chain for every single type just so we can define the few LegacyUnforgeable properties we need is not the greatest idea. Instead, we now merge LegacyUnforgeable lists with those of ancestor prototypes, which reduces the entire ceremony to a single `get' from the global table.
* javascript: simplifybptato2023-08-211-3/+2
|
* javascript: remove stray eprintbptato2023-08-201-2/+0
| | | | oops
* client: make `client.client' a getterbptato2023-08-201-1/+3
| | | | This way we do not need the ugly getProperty call.
* javascript: finish LegacyUnforgeable + misc fixesbptato2023-08-204-76/+118
| | | | | | | | Add jsuffget, jsuffunc for setting LegacyUnforgeable on functions. Misc fixes: * define LegacyUnforgeable properties for native object shims * replace some macros with templates
* javascript: update Events, misc fixes & additionsbptato2023-08-205-205/+617
| | | | | | | | | | | | | | Events: just implement the interfaces, no events are triggered yet. JS changes: * add LegacyUnforgeable * make consts enumerable * fix crash in isInstanceOf * fix destructor warnings * refactor registerType As a result, peakmem is now 1G+ on 1.6.14. It stays ~750M on 2.0.0. Hmm. Well, better upgrade to 2.0.0 I guess.
* toml: fix quotation chars in multiline stringsbptato2023-08-191-7/+9
|
* dom: remove dead codebptato2023-08-161-7/+0
|
* chadombuilder: implement restartbptato2023-08-151-0/+12
| | | | | Now pages (once again) do not break when a meta charset tag is defined. Hooray!
* Move HTML parsing into Chamebptato2023-08-1516-4597/+23
| | | | Operation "modularize Chawan somewhat" part 2
* Move charsets into chakasubptato2023-08-1420-1877/+70
| | | | Operation "modularize Chawan somewhat" part 1
* mediaquery: fix logic errorbptato2023-08-141-1/+1
| | | | Not isAscii means we cannot convert to char. Oops.
* mimetypes: small optimizationbptato2023-08-131-2/+1
|
* Simplify mailcap entry matchingbptato2023-08-131-25/+14
|
* Do not replace existing mime typesbptato2023-08-131-1/+2
| | | | | Make mime.types behavior consistent with mailcap: that is, the *first* match counts.
* Add mailcap, mime.types & misc refactoringsbptato2023-08-1326-378/+1289
| | | | | | | | * add mailcap: works with copiousoutput, needsterminal, etc. * add mime.types (only works with mailcap) * refactor pipeBuffer * remove "dispatcher" * fix bug in directory display where baseurl would not be used
* css: implement case insensitivitybptato2023-08-103-135/+142
| | | | For some reason I forgot about this.
* serialize: add missing prepareMutationbptato2023-08-011-0/+1
|
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-0111-36/+45
| | | | | | | | | | | | | | * 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.)
* Fix double line bug in dump modebptato2023-07-292-3/+4
|
* Add default background/foreground color overridebptato2023-07-292-38/+50
|
* css: very minor optimizationsbptato2023-07-282-19/+15
| | | | probably insignificant overall
* mediaquery: fix some missing has checks in parserbptato2023-07-281-0/+2
|
* layout: count spacing before inline padding toobptato2023-07-281-2/+10
|
* Fix twtstr.cmpbptato2023-07-281-2/+2
| | | | We were comparing the wrong sides of ranges here.
* htmlparser: replace stray insert callbptato2023-07-271-1/+1
|
* dom: fix hasChildbptato2023-07-271-1/+1
| | | | Return true instead of false when a node with nodeType was found.
* layout: remove incorrect commentbptato2023-07-271-2/+0
|
* htmlparser: fix <th> not closing table cellsbptato2023-07-271-1/+1
| | | | | <th> should close table cells, but was missing from the table cell closing list for some reason.
* layout: distinguish padding from spacingbptato2023-07-272-5/+23
| | | | | Re-consideration of 1e0506adb: we do need to explicitly specify padding after all, so the rendering engine knows of it too.
* layout: fix incorrect parenthesesbptato2023-07-271-1/+1
| | | | | | In the tab width case, only whitespacenum was being divided instead of charwidth + whitespacenum, which resulted in an exponential growth of both charwidth and whitespacenum.
* layout: do not treat inline padding as spacingbptato2023-07-271-5/+6
| | | | | So e.g. padding: 1px does not inhibit automatic addition of spaces for inline blocks.
* htmlparser: remove stray nil comparisonbptato2023-07-271-4/+3
|
* layout: remove unused variablesbptato2023-07-271-3/+0
|
* htmlparser: remove nil comparisons for Handlebptato2023-07-272-41/+52
| | | | This makes it possible to use non-reference types as Handle.
* layout: refactor absolute positioning width calcbptato2023-07-271-13/+84
| | | | Still not perfect, but at least not completely broken.
* Add suspend() function (bound to C-z)bptato2023-07-261-0/+5
|
* layout: fix superfluous inline whitespacebptato2023-07-251-1/+3
| | | | | | | | | | | | | | computeShift now checks if the last inline atom is spacing, and if yes, it does not add more spacing. This fixes rendering of the following document: <span> a </span> <span> b </span>
* layout: use nowrap functionbptato2023-07-251-1/+1
|
* 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.