about summary refs log tree commit diff stats
path: root/src/css
Commit message (Collapse)AuthorAgeFilesLines
...
* selectorparser: enum-ize relbptato2023-12-092-25/+35
|
* sheet: fix a correctness issue, misc refactoringsbptato2023-12-092-51/+63
| | | | | | | * Fix a bug where rules would be sorted incorrectly if retrieved from the cache. * Use withValue where possible * camelCase some variables, de-extern some functions, etc.
* cascade: refactor & optimizebptato2023-12-091-153/+192
| | | | | | * Break up applyRules into smaller functions * Do not call calcRules for every child pseudo element separately; just use parent's DeclarationListMap
* layout: add clear, etc.bptato2023-11-231-4/+25
| | | | | | * Add clear CSS property * Fix some margin resolution bugs * Apply min-height, max-height to inner inline outer block boxes
* css/values: use Opt instead of Result[string]bptato2023-11-211-55/+54
| | | | the error values were 100% unused
* css/values: simplify getComputedValuebptato2023-11-211-11/+10
|
* css: add box-sizingbptato2023-11-211-4/+21
|
* 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.
* layout: add floatsbptato2023-11-172-4/+7
| | | | | | | | | | | | | yay!!!! * Add support for float: left, float: right Also, misc stuff: * Add support for display: flow-root * Set line width to the maximum allowed width on line wrap * Various refactorings Still todo: support clear
* layout: refactor flow margin propagation, sizingbptato2023-11-121-0/+13
| | | | | | | | | * Blocks are now positioned before their text contents would be layouted * Untangle calcAvailableSpaceSizes's results from BlockBox * Move a couple of objects from box -> engine * Use Size in a few more places * Set display to block if float is not none
* dom: add some CSSStyleDeclaration functionsbptato2023-10-252-2/+8
|
* reduce new() usagebptato2023-10-251-4/+5
|
* Add jspropnames, CSSStyleDeclaration stubbptato2023-10-251-5/+3
|
* WindowAttributes: refactorbptato2023-10-191-1/+1
| | | | | | * rename module (window -> winattrs, to avoid conflict with env/window) * do not use result * remove unused cell_ratio
* css: fix list style type presentational hintsbptato2023-10-141-17/+20
| | | | third time's the charm
* css: support more list types, fix <ul/ol type=...bptato2023-10-142-9/+39
| | | | | | | Turns out you can't just throw the value into the CSS value parser. (Also, correction for the previous commit message: it is not LI but UL or OL.)
* css: support alphabetic list types, support <LI TYPE=...bptato2023-10-142-2/+59
|
* css: change type of rvalue to char (from Rune)bptato2023-10-014-52/+62
| | | | | | | | 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.
* selectorparser: fix missing case insensitivitybptato2023-10-011-10/+16
|
* Use twtstr.join everywherebptato2023-10-011-1/+2
|
* Get rid of unicode.toLowerbptato2023-10-012-4/+5
| | | | | It was used by mistake in a hundred percent of the cases we were using it.
* px: convert to float first for percentage valuesbptato2023-09-201-1/+1
| | | | | | | | | px now converts to float64 before converting back to a layout unit when calculating percentage values. This should reduce overflow crashes somewhat. (The real solution would be to not crash on overflow, but that's a little more difficult problem to solve.)
* update chamebptato2023-09-191-0/+1
| | | | and with that, resolve the unknown input type issue
* move around more modulesbptato2023-09-144-5/+5
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* twtstr: simplifybptato2023-09-131-2/+3
| | | | | | * remove unused function isAlphaAscii * swap pushHex for less casting * remove == overload for char/rune (we did not really use it anyway)
* color: fix parseLegacyColor bugsbptato2023-09-131-6/+10
| | | | | | * lower-case the input string. * do not fall back to black on error. (i.e. remove the special cased parseLegacyColor0 in cascade)
* 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.)
* config: allow modification through JSbptato2023-08-271-9/+12
| | | | | | | 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.
* Move HTML parsing into Chamebptato2023-08-155-5/+10
| | | | Operation "modularize Chawan somewhat" part 2
* mediaquery: fix logic errorbptato2023-08-141-1/+1
| | | | Not isAscii means we cannot convert to char. Oops.
* css: implement case insensitivitybptato2023-08-102-127/+142
| | | | For some reason I forgot about this.
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-012-3/+4
| | | | | | | | | | | | | | * 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.)
* css: very minor optimizationsbptato2023-07-282-19/+15
| | | | probably insignificant overall
* mediaquery: fix some missing has checks in parserbptato2023-07-281-0/+2
|
* 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.
* mediaquery: better debugging functionsbptato2023-07-231-3/+35
|
* css: fix percentage min/max-width valuesbptato2023-07-231-1/+1
|
* Add StyledNode stringifier for debuggingbptato2023-07-081-0/+14
|
* Fix bug in media-query parsingbptato2023-07-043-12/+36
| | | | This fixes interpretation of "@media (min/max-width: 1234px)".
* Use LayoutUnit in layoutbptato2023-07-042-24/+28
| | | | Reduces ugly rendering caused by rounding errors.
* cascade: remove sugar, add DeclarationListMap typebptato2023-06-291-36/+53
| | | | So we don't have to pass each DeclarationList separately.
* cssparser: remove unused function, cast instead of collectbptato2023-06-291-21/+5
|
* css/values: remove stray eprintbptato2023-06-251-2/+0
|
* cssparser: remove SyntaxErrorbptato2023-06-251-20/+27
| | | | return DOMException instead
* css/values: use Result instead of exceptionsbptato2023-06-252-308/+342
|
* input size as presentational hintbptato2023-06-181-0/+8
|
* Fix various layout bugs, prepare for image supportbptato2023-06-122-6/+9
|
* Use width, height for canvas in cssbptato2023-06-101-1/+1
|
* Add support for visibilitybptato2023-06-071-5/+25
|