| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
It has caught some minor bugs.
|
|
|
|
|
|
|
|
| |
We often redo sub-layouts in layout, and this makes stacking contexts
very hard to build reliably there.
This fixes a bug where positioned descendants of flex items would
sometimes mysteriously disappear.
|
|
|
|
|
| |
Not entirely sure what the px check for the mi[dtHorizontal].send
assingment was for; tests still pass after removing it.
|
|
|
|
| |
4 -> 3 words
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Always placing boxes relative to their parent *seems* prettier, but the
implementation was broken and I can't come up with a sane working one.
So we're back to just special casing position: absolute in render.
Sad, but at least it works. (I think it's also a bit more efficient.)
|
|
|
|
|
| |
I've set them to -cha-ansi(default) to avoid having to add even more
color type flags.
|
|
|
|
|
| |
it still isn't really correct, they aren't supposed to behave as
absolute positioning containers...
|
|
|
|
| |
ugly hack that is no longer needed
|
|
|
|
|
|
|
| |
Well, I was trying to reproduce *another* float bug when I accidentally
stumbled upon this...
The fix is somewhat ugly, but not as bad as I expected.
|
|
|
|
| |
It's surprisingly tricky.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The input buffer is no longer copied, and parseFloat32 gets an openArray
instead of a copy of the string to parse.
I've also simplified the parser somewhat so it now operates on
openArrays of CSSComponentValues. It's still far more complex and
wasteful than it should be, but it's progress.
|
| |
|
|
|
|
|
| |
I'm not 100% content with this syntax either, but it's a significant
improvement over the previous solution.
|
| |
|
|
|
|
| |
Doesn't seem to be necessary anymore.
|
|
|
|
|
|
| |
* layoutBlockChild has two branches less
* better separation of code into individual layouts; layout() is now the
main entry point for inner layout
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old logic was badly copy pasted from the pass that did text
formatting; accordingly, it was overly complex and did not work
correctly.
Now we just add a single formatting cell to override the last one if
it exists. (Formatting cells go from x position -> next cell or line
end, and padding implies that the line had ended before the starting
position of our text.)
I've left in a workaround to what I think is a bug. It may be related
to cursorNextLink getting stuck at the line's end...
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Also removes the computation of underflow on the end margin for blocks;
as far as I can tell, this was never used.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Pros: basic display on pages that depend on grid being implemented to
display anything at all.
Cons: breaks pages that have a fallback layout for UAs that can't do
grid. (In practice, such pages must be rare - CSS for layout is painful
enough that nobody in their right mind will spend time on implementing
a fallback layout for the same DOM.)
|
|
|
|
|
|
| |
It made cached layout inconsistent with uncached layout.
(I'm not sure if this is actually observable; either way, it's a bad
idea to rely on this.)
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
|
|
| |
:root is used on the UA sheet, so it's quite important.
:link, :visited can be treated as shortcuts (although :visited never
matches right now).
|
|
|
|
| |
ref. https://todo.sr.ht/~bptato/chawan/43
|
|
|
|
| |
Ugly, but works. I think.
|
|
|
|
|
|
|
|
|
|
| |
Mainly because the seq was hindering further improvements.
I don't expect performance or memory usage to change much; leaf nodes
now store one pointer more, but parent nodes no longer pay for the
overhead of a seq.
(FWIW, other browsers seem to be using linked lists for this, too.)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
We cannot handle these yet.
|
|
|
|
| |
It would be nice to at least make it single-pass.
|
| |
|
|
|
|
|
| |
A map isn't so bad with three pointers, but it won't be viable once we
start adding more pseudo-elements.
|
|
|
|
| |
plus refactor a bit
|
| |
|