| 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.
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
| |
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 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.
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Base InlineBox is a fair bit smaller now, and (most) strings are
cached using RefString.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
They can be especially distracting when the rounding error fluctuates
between items.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* For boxes, we now use the box in InlineBox.
* For images, wrap bmp in an InlineImage type that stores offset + size.
* For text, wrap strings into TextRun objects (an offset + a string).
(Ideally, TextRuns shouldn't copy at all, but that's a problem for
another time.)
|
|
|
|
|
| |
Eliminates two superfluous line box alignment passes, and fixes some
vertical-align bugs.
|
|
|
|
| |
The content should clear.
|
|
|
|
| |
ok now I understand why I made shareCachedItem crash...
|
|
|
|
|
| |
Also removed the redundant pushPositioned/popPositioned calls in
popPositioned.
|
|
|
|
| |
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...)
|
| |
|