| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
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.)
|
|
|
|
| |
plus refactor a bit
|
|
|
|
|
| |
Base InlineBox is a fair bit smaller now, and (most) strings are
cached using RefString.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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...)
|
|
|
|
|
| |
Eventually the tree should be collapsed into the DOM, and StyledNode
should be created on the stack.
|
|
|
|
|
|
|
|
| |
* respect flex item starting margin on main axis
* pass left margin as offset input too -> fixes some sub-layout cache
inconsistencies
well, I *think* it does, but I haven't managed to find a case where it
changes anything... either way, at least the code is prettier now
|
| |
|
|
|
|
|
| |
It's probably possible to do it in layout, but it's way too hard.
Just do it in render.
|
|
|
|
|
|
|
|
| |
Only root blocks for now; for non-roots, you'd have to cache exclusions
too, and that is a fair bit harder.
It isn't very noticable as an optimization, but it's a good first step
towards a cached layout.
|
|
|
|
|
|
| |
It was named "fragment" mainly because I added it back when there was
still a separate InlineBox type and I needed another name.
Now InlineBox is gone, and I'm tired of typing fragment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Necessary for flex. Previously we just used the actual height, but that
didn't account for boxes that size themselves depending on the available
height (mainly just images for now).
This also irons out intrinsic min width calculation somewhat, squashing
several bugs.
I hope it works well. It is a significant change in size calculation,
so maybe there are still new bugs lurking.
|
|
|
|
|
| |
"Computed" was redundant; other types of values don't have a common
type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
23beebe6 introduced a regression that broke gotoAnchor. This fixes that,
plus a couple other long-standing gotoAnchor bugs:
* If no anchor is found, do not dupe the buffer.
Desktop browsers still add a history entry, while w3m prints an
error. I've copied the latter because it makes more sense as a user,
but this will have to be refined for the navigation API at some point.
* If the anchor *is* found, then always jump to it, even if it's not
visible.
This was a limitation of relying on the line array, so now we rely on
the box tree instead. (Sooner or later, the former must go anyway.)
Also, fix `U' reload not restoring the position (hopefully this time for
good).
|
|
|
|
| |
as much as I wish it weren't, layout *is* css.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Other changes being bugfixes and a temporary implementation of "view
source"
|
| |
|
|
|