about summary refs log tree commit diff stats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* dom: add localName, simplifybptato2024-11-021-0/+9
|
* layout: remove inline roundingbptato2024-11-022-0/+3
| | | | | | | | | It broke styles like "margin-top: -5px; padding-top: 5px", because the margin would be taken as-is, and the padding rounded to 0. Now they cancel each other out again. (I think I had added this to reduce error caused by line-height, but we don't have line-height anymore.)
* cssparser: fix parsing of unrecognized at rulesbptato2024-11-022-0/+9
| | | | + clean up a bit
* layout: fix yet another inline float bugbptato2024-11-012-0/+8
| | | | | | | | | you can't just set the BFC offset to your own offset when the BFC's origin is your inner offset. (in block layout, this is addressed by initBlockPositionStates & co, but we don't call that for inline because the offset is already resolved there anyway. so this is a special case)
* layout: simplify a bit, fix some inline float bugsbptato2024-11-014-0/+26
| | | | | | | | | | | | | | * simplify "positioned" value calculation: - don't include it in ResolvedSizes, since it's unused in most layouts - resolvePositioned for both absolute and relative positioning - use "size" instead of "space" for absolute positioning - include parent width in layout so that renderdocument does not have to account for it * return bottom margins as regular return values instead of var * fix child bottom margins being discarded in inline floats * fix inline float not including the parent block position in its BFC position
* layout: refactor flow and fix some bugs in the processbptato2024-10-3118-0/+29
| | | | | | | | | | | | * factor out `margin' field from box state * get rid of RootInlineFragment * `nested' -> `children' * get rid of repositionChildren pass; now we handle relative positioning and -cha-center/-cha-right separately * cha-center, cha-right no longer applies to floats * use consistent naming scheme for tests * fix float bottom margin strut not being flushed * fix inline floats changing non-fit-content width
* layout: fix margin resolution for absolutely positioned boxesbptato2024-10-282-0/+15
|
* url: add searchParams.hasbptato2024-10-281-0/+3
|
* selectorparser: fix parsing of invalid pseudo elementsbptato2024-10-262-0/+21
| | | | | Found this because the 5th largest tech company on Earth cannot bother itself with trivial matters such as "writing valid CSS".
* cssparser: do not accept invalid rulesbptato2024-10-252-0/+4
| | | | | | This isn't exactly clear from the standard's wording, but e.g. *display: inline must be discarded (because it incorrectly starts with a delim token).
* layout: fix nested absolute positioning, refactor initial size resolutionbptato2024-10-252-0/+25
| | | | | | | | | | Nested position: absolute was broken, so fix it. Also, it makes no sense to dispatch inside layoutBlockChild when we know the expected resolution algorithm upon calling it anyway, so now we do that statically. Finally, fix some bugs in position: absolute size resolution.
* layout: fix inline float + position: absolute bugbptato2024-10-162-0/+6
| | | | | As per standard, float "only applies to elements that [...] are not absolutely positioned."
* layout: fix float positioning in inline contextsbptato2024-10-155-1/+18
| | | | | | also fixes a bug in the previous commit where whitespacenum would be reset on absolute positioning + missing absolute margin handling without top/left/etc.
* layout: correct `position: absolute' (FINALLY)bptato2024-10-158-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a) resolution of `position: absolute' percentage sizes with an indefinite containing block size (wait what?), and b) positioning of `position: absolute' inner block boxes inside inline boxes. a) is possible because `position: absolute' does not affect its parent's layout. I would love to have a long talk with whoever thought that specifying it like this is a good idea. You know, just because you can... anyways, shockingly enough, this was still the more straightforward part. b) forced me to change the box tree to allow blocks inside inlines, which is ugly, but no big deal. Two questions then remained: 1. *where* to put such boxes, and 2. *how large* these boxes should be; this is hardly obvious since an inline box does not have an unambiguous width or height. Of course the CSS standard, never too eager to fulfill my basic expectations, says nothing about this (other than "it's not defined"). So I first tried to reverse engineer what Gecko does, and after hours of pain and suffering I realized... that it's broken LOL https://bugzilla.mozilla.org/show_bug.cgi?id=489100 Therefore I ended up (partially) copying Blink behavior, which, while equally nonsensical as Gecko (and of course divergent), at least does not change after a partial layout. Thank you LayoutNG for saving my sanity. As for the practical benefits: this fixes the bug where Invidious [video] tags wouldn't show up. Hey, it's something! Still left to-do: `position: absolute' for `display: inline' boxes.
* layout, pager: preserve tabs on display, selection & outputbptato2024-10-102-2/+17
| | | | | | | | | | | | Substitute tabs with one of eight PUA characters based on their width, and convert them back in the pager: * TUI mode always prints spaces, but now handles tabs appropriately on cursor movement * dump mode tries to preserve hard tabs, but uses soft tabs when that is not possible (e.g. tabs after a margin, tab with background color, etc) * selection mode always outputs hard tabs.
* twtstr: fix stripAndCollapsebptato2024-10-081-0/+10
|
* url: fix IDNA bugsbptato2024-10-061-0/+2
|
* layout: fix floats overriding margin/paddingbptato2024-10-054-14/+25
|
* url: fix searchParams.deletebptato2024-09-301-0/+2
|
* layout: fix wrong padding offsetsbptato2024-09-272-0/+7
| | | | + some misc refactorings
* layout: remove line-heightbptato2024-09-214-12/+2
| | | | | This was a bad idea that, despite my best efforts, never worked properly.
* dom: add forms, elements getter + misc fixesbptato2024-09-172-11/+37
| | | | | | | | | | | | * 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
* layout: fix table height constraint typebptato2024-08-302-0/+26
| | | | | it's really min-height, not height; consistency is not CSS's strong suit...
* layout: fix whitespace weirdnessbptato2024-08-232-0/+6
| | | | | avoid adding whitespace to the previous atom if it's not on the current line
* loader: fix crash on empty data URLsbptato2024-08-171-0/+1
|
* xhr: more progressbptato2024-08-1512-34/+116
| | | | | | | | | | * add responseText, response * add net tests -> currently sync XHR only; should find a way to do async tests... * update monoucha -> simplified & updated some related code that no longer worked properly
* xhr: progressbptato2024-08-131-0/+12
| | | | | | | | | | | | | * fix header case sensitivity issues -> probably still wrong as it discards the original casing. better than nothing, anyway * fix fulfill on generic promises * support standard open() async parameter weirdness * refactor loader response body reading (so bodyRead is no longer mandatory) * actually read response body still missing: response body getters
* cssvalues, sheet: fix some more case sensitivity bugsbptato2024-08-021-1/+1
|
* cssvalues, twtstr, mediaquery: refactor & fixesbptato2024-08-022-0/+10
| | | | | | | * cssvalues, twtstr: unify enum parsing code paths, parse enums by bisearch instead of hash tables * mediaquery: refactor (long overdue), fix range comparison syntax parsing, make ident comparisons case-insensitive (as they should be)
* env, dom: add History stub, basic LocalStoragebptato2024-07-301-0/+8
| | | | | | | * History: doesn't really do anything, just adding it to fix some pages * LocalStorage: kind of works, but does lookups with linear search, and the quota limitation is on the number of entries not their size. plus it doesn't actually store anything on disk yet (like cookies).
* layout: inline table fixesbptato2024-07-273-1/+34
| | | | | | | * properly wrap inline internal table boxes in inline-table (instead of block-level table) * fix missing baseline in table wrapper boxes * fix wrong wrapping of misparented table/row/row group children
* layout: position: relative, absolute fixesbptato2024-07-262-0/+11
| | | | | | | | | | * support position: absolute on flex items * proper top/bottom/left/right calculation for position: relative * push positioned flex box sizes to positioned stack Still not perfect: position: absolute should always resolve percentage sizes and top/bottom/left/right, meaning absolute layout needs to be delayed until its containing box is fully layouted.
* layout: fix incorrect absolute positioningbptato2024-07-252-0/+71
| | | | It was broken for parent boxes with indefinite sizes.
* layout: min/max sizing fixesbptato2024-07-252-0/+2
| | | | | | | * fix max size trumping min size * respect min-width/max-width/min-height/max-height for images * fix xminwidth calculation for percentage-sized images with an indefinite containing size
* url: fix a small incompatibilitybptato2024-07-251-0/+14
| | | | + some more cleanup
* url: misc fixes & improvementsbptato2024-07-242-1/+54
| | | | | | * fix various parsing bugs * rewrite state machine * other small optimizations
* layout: fix various flex column sizing bugsbptato2024-07-224-0/+18
| | | | | | * fix flex column item width not being stretched * set minimum flex column height to the layouted item's height (to avoid overlap)
* html: event cleanup, XHR progressbptato2024-07-182-0/+30
|
* layout: fix positioning bugbptato2024-07-022-0/+4
| | | | | top/left/right/bottom should only be used in renderdocument with position: absolute.
* layout: flex padding/margin fixesbptato2024-06-304-0/+19
|
* layout: fix text-align + padding coloringbptato2024-06-292-2/+2
|
* layout: inline fixes & improvementsbptato2024-06-275-8/+16
| | | | | | | | | | | | | | | * fix text-align breaking down in the presence of floats * improve (and simplify) background color area painting This greatly simplifies inline layout by removing the additional text-align atom movement code and replacing it with a full re-layout when needed. That re-layout only occurs in (rare) cases where the text is likely to be relatively short anyway, so it's probably a win in any remotely realistic layout. This has also made it possible to at last merge the last three passes (horizontal/vertical alignment and background painting) and drop that weird synchronized tree + vector traversal.
* test: print running test names to the same linebptato2024-06-232-2/+2
|
* layout: avoid shrink-to-fit padding/margin overflowbptato2024-06-232-0/+15
|
* layout: get rid of incorrect hackbptato2024-06-232-0/+7
|
* cssvalues: add "clear" to table wrapper boxbptato2024-06-112-0/+5
| | | | this one is weird but I'm sure the standard is technically right
* renderdocument: handle overlapping double width charsbptato2024-06-022-0/+9
| | | | | See attached test case; previously, this would result in a missing space in visual mode and a crash in dump mode.
* layout: clean up inline tree constructionbptato2024-06-012-0/+5
| | | | | | | Much cleaner than the previous solution. Should also be somewhat less wasteful, as we no longer constantly rebuild the same tree with new branches.
* test: update acid1.color.expectedbptato2024-05-311-1/+1
| | | | | I would prefer it to not cut off the canvas background color, but the current output is just as valid.
* layout: line box sizing fixesbptato2024-05-314-0/+55
| | | | | * do not use inline block computed values for wrapper fragment * fix minimum line box height calculation