| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
I'm not 100% content with this syntax either, but it's a significant
improvement over the previous solution.
|
|
|
|
|
|
|
|
| |
Instead of generating a separate container box for list items, just set
the marker's display to an internal value that is treated specially.
This fixes a bug where position: relative would not register the correct
block as the positioned ancestor.
|
|
|
|
|
| |
* ignore username/password if undefined
* do not throw on subsequent fetch with username/password
|
|
|
|
|
|
| |
Never mind, it also broke some other things :(
This reverts commit bc294d3284e0448b2f149ac6d905c8474508791d.
|
|
|
|
|
| |
The algorithm itself is still fundamentally broken, but this at least
prevents some cases of images becoming absurdly large.
|
|
|
|
| |
not much else is done yet, but it's a start
|
|
|
|
|
| |
Also removes the computation of underflow on the end margin for blocks;
as far as I can tell, this was never used.
|
|
|
|
|
|
| |
I've also refactored the code a bit, so it's both easier to understand
and more efficient. (In particular, BlockLayoutState no longer has to
store marginBottom.)
|
|
|
|
|
|
| |
Achieved by generating an anonymous flow root child for the contents and
positioning that. (Not the cell contents directly - that wouldn't work
because of inline child boxes.)
|
|
|
|
| |
also, fix a typo
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We were painting the background box in render for dump mode, but this
conflicted with the standard requirement that the canvas be painted
before other elements. So now we handle this directly in the pager.
Conveniently enough, this also fixes the issue of canvas color adding
pointless spacing to pages (which often made the selection feature less
useful.)
|
|
|
|
| |
...
|
| |
|
|
|
|
| |
Ugly, but works. I think.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, eliminate the offset attribute in StackItem by just taking
render.offset from the nearest ancestor as the base.
That leaves us with clipBox, which I'm not yet sure how to get rid of.
Its current implementation is certainly wrong: `position: absolute'
should really use its absolute container's clip box. It is however
correct for `position: relative' in its current form.
(One way would be to cache it inside CSSBox, like we do offset.)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also fixes an invisible bug where inline-block child absolutes were
queued multiple times.
This adds a pointer to the parent box for CSSBox objects, which isn't
great, but the alternatives (maintaining an explicit stack or adding
another tree traversal) were overly complex and/or too inefficient.
On the flip side, now it should be possible to do both stacking contexts
(with negative z-index) and overflow tracking in layout. (I think.)
|
|
|
|
| |
Event handler functions can be set twice now.
|
|
|
|
| |
plus refactor a bit
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For now, the skeleton remains in layout. Eventually it should be
lazily constructed during the actual layout pass (thereby making layout
"single-pass" (sometimes :p))
The end goal is to do it all in styledNode.children, so that caching can
be as simple as "next box = find next matching cached box ?? make new".
This does mean that the internal structure of cached boxes will always
have to be reconstructed, but I don't see a better way. (I suppose it
still remains possible to optimize out the unnecessary layout pass when
only a repaint is needed (e.g. color change) by modifying computed
values in-place.)
|
|
|
|
|
| |
The marker placement in that test is wrong, but that isn't really a
result of this change.
|
| |
|
| |
|
|
|
|
|
|
|
| |
* remove inlineGroup - it was completely pointless now, and was the
cause of some whitespace collapsing bugs
* fix a float bug made visible by the above change
* fix non-standard list item counter behavior
|
|
|
|
|
|
|
|
|
|
| |
Setting the width to max-content was supposed to be an optimization,
but it seems max-content has some issues when interacting with floats.
Arguably this is just hiding the bug, but my attempt to fix max-content
was not successful...
(That is to say, I suspect floats still behave strangely in tables.)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* normalize flow baseline computation
* fix various margin collapsing bugs
* eliminate inlineStack
* eliminate push*
* derive BlockBox and InlineBox from CSSBox
This removes a pointer from BlockBox, and adds a pointer to both
BlockBox and InlineBox (type field). A net loss, but it makes the code
more manageable.
Plus, inline groups now need one less allocation, so overall it's not
that bad.
|
|
|
|
| |
+ some strict defs
|
|
|
|
|
|
|
| |
startsWithNumber was a poorly copied version of the standard algorithm,
which, as it turns out, is largely redundant.
So I removed most of it and inlined the rest.
|
| |
|
|
|
|
| |
Now select[multiple] options have the same coloring as w3m.
|
|
|
|
|
|
|
|
|
|
|
| |
Having to initLine after every block hurts... I've added a mechanism to
at least eliminate cleared floats, but I wish we just didn't init the
line :/
(I tried making it lazy, but I couldn't get it to work elegantly.)
I've also added some comments about flow, and moved around code so that
related layouts are mostly in the same place.
|
|
|
|
|
| |
Eliminates two superfluous line box alignment passes, and fixes some
vertical-align bugs.
|
|
|
|
| |
no idea why JS_NewCFunction3 is not public...
|
| |
|
|
|
|
|
| |
Also removed the redundant pushPositioned/popPositioned calls in
popPositioned.
|
|
|
|
|
|
| |
<media-condition-without-or> works correctly once again.
ref. https://todo.sr.ht/~bptato/chawan/46
|
|
|
|
|
| |
clipBox must not be allowed to start outside the canvas, or
paintBackground will happily try to setTextStr in a negative position.
|
|
|
|
| |
My bad; not present upstream.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since toJS doesn't create a new value, `node' must be dup'd if it is
a JSValue.
Also, forbid .jsset on JSValue as it was broken as well and it's not
obvious what the intention is when using it. (Probably it should free
the old value, but did the user think of setting it? :P)
I can see why I made toJS not dup the value - to make returning
consistent with Nim's semantics - but it really makes things
confusing... implicitly behaving as lent might be better, albeit less
convenient.
|
|
|
|
| |
Also, some more work on the unification of inline & block layouts.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* reinit line after outer block height is known
* do not set wrap in finishLine preceding outer block layout
* attach pending inline floats to line boxes
* unify flow a bit more
The last two points mean that we now (mostly) handle inline floats
like block floats, which is great because only the latter ever worked
properly.
(Well, margin resolution still needs work...)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Anonymous inline boxes were blocking progress on layout caching, so they
are now gone. Instead, we handle them in layoutInline (which meanwhile
has spaghettified to beyond comprehension... now it's a special case
of inner BlockBox (kind of?) - incredibly, it still passes tests :P)
This seems to match what major browsers do as well; some test cases were
updated to reflect the "improved" rendering this brings.
Next I'd like to remove anonymous table boxes by generating them in
cascade. Then it should be straightforward enough to at least reuse
flow roots on relayout.
(And clean up flow layout...)
|
|
|
|
| |
it's size.h, not size.w
|
|
|
|
| |
Plus remove addLines, it's no longer very useful.
|