| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Base InlineBox is a fair bit smaller now, and (most) strings are
cached using RefString.
|
|
|
|
|
| |
This isn't great, but neither was passing around a pointer that pointed
to a single object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
They can be especially distracting when the rounding error fluctuates
between items.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
<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.
|
|
|
|
| |
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...)
|
| |
|
| |
|
|
|
|
| |
Both simpler and more efficient.
|
|
|
|
|
|
|
|
|
|
| |
HTML5 doesn't allow frameless processing of documents, so the <noframes>
fallback never really worked. Being able to click on the individual
frames feels somewhat less broken.
I'm unsure how the actual solution should look like. Either we need
multiple buffer support per process, or treat them as pseudo-images and
handle them in pager.
|
| |
|
|
|
|
| |
it's size.h, not size.w
|
|
|
|
|
|
|
|
|
|
| |
Most calc calls I've seen look something like "calc(100% - 2em)",
i.e. just a percentage value offset by a pixel value.
As it happens, we also had 24 bits available in CSSLength objects
because of padding. Just enough to smuggle in that offset :)
Very limited of course, but it does fix layout on a couple of websites.
|
| |
|
|
|
|
|
|
|
|
|
| |
Supposedly they aren't broken in refc after 2.0.0, so we can do this now
that 1.6.14 is dropped.
I've confirmed lent to work as advertised; it indeed reduces copies.
sink doesn't seem to help much, but I guess it will be useful once we
switch to ORC.
|
|
|
|
| |
Plus remove addLines, it's no longer very useful.
|
|
|
|
|
|
|
| |
It's an improvement, but the painting order still isn't quite right...
Also fixes a bug where paintBackground would unnecessarily append an
extra line to the document's end.
|
|
|
|
| |
hsl is quite popular these days.
|
|
|
|
| |
I'm not convinced that anybody even knows these exist, but whatever.
|
| |
|
| |
|