| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Text data is no longer stored separately in InlineFragments; instead,
we now include refs to StyledNodes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix text-align breaking down in the presence of floats
* improve (and simplify) background color area painting
This greatly simplifies inline layout by removing the additional
text-align atom movement code and replacing it with a full re-layout
when needed. That re-layout only occurs in (rare) cases where the text
is likely to be relatively short anyway, so it's probably a win in any
remotely realistic layout.
This has also made it possible to at last merge the last three passes
(horizontal/vertical alignment and background painting) and drop that
weird synchronized tree + vector traversal.
|
|
|
|
|
|
| |
Not very useful yet; partial layouting and/or a new renderer is probably
necessary to replace the current FormatCell-based node placement,
otherwise it will be unbearably slow.
|
|
|
|
|
|
|
| |
Much cleaner than the previous solution.
Should also be somewhat less wasteful, as we no longer constantly
rebuild the same tree with new branches.
|
| |
|
|
|
|
| |
just merge it with InlineFragment
|
|
|
|
|
|
|
|
|
|
| |
Instead of allocating a separate object for each box, just re-use
a single BlockBox on re-layouts.
This means that now the (block-level) tree is built in its final form in
the first pass.
(Inline boxes remain the same as before for now.)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the following printed "2" instead of "12":
<div style=float:left>1</div><div style=display:flow-root>2</div>
This fixes the above problem in the laziest possible way: we relayout once
in the smallest possible space the BFC fits in when floats exist. See the
comment in the code for details.
As a nice bonus, this also fixes tables overlapping with floated boxes,
by pretending that they establish a BFC.
|
|
|
|
| |
Fix percentage-based left/right etc.
|
|
|
|
| |
for consistency
|
|
|
|
|
|
|
| |
Turn Offset, Size, etc. into arrays indexed by a DimensionType enum,
and use it to unify code that only differs in the dimension it is
computing for. (e.g. this lets us use the same code for flex row &
column layouts.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* png: add missing filters, various decoder fixes
* term: fix kitty response interpretation, add support for kitty image
detection
* buffer, pager: initial image display support
Emphasis on "initial"; it only "works" with kitty output and PNG input.
Also, it's excruciatingly slow, and repaints images way too often.
Left undocumented intentionally it for now, until it actually becomes
useful. In the meantime, adventurous users can find out themselves why:
[[siteconf]]
url = "https://.*"
images = true
|
|
|
|
| |
we also have to move the inner box offset to the parent
|
|
|
|
|
| |
This allows us to unify BlockBox instantiation and block-level inner
layout calls.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifying the background area as three LayoutUnit pairs sounds clever,
but breaks down for text-align: center.
* store line Y offset in LineBox - this is necessary to pass down areas
we need to paint
* refactor addHorizontalLine loop; remove mystery "If necessary, update ictx's
width" line that used to be labeled "TODO this seems meaningless" and indeed
seems meaningless now (I am prepared to deeply regret this later)
* replace broken & convoluted startOffset/endOffset/size with a simple
seq of offsets + sizes
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous retrofitting of the old renderdocument error correction
usually worked, but it still had a horrible flaw in that it assumed that
all line boxes are of equal height. So if error was lower for some line
than another, it would move *all* lines by a somewhat lower error, and
that resulted in overlapping lines.
Now we do something much simpler: in flushLine, round each line's height
downwards before moving on to the next line. This gets rid of any blanks
inbetween lines, and also works much better with cleared floats.
|
|
|
|
|
| |
When an absolute block is a descendant of an inline box, its positioned
ancestor must be set to that box.
|
|
|
|
|
|
|
|
|
|
|
| |
We now have real inline boxes.
* Fix nesting of inline boxes
* Represent inline boxes with a hierarchical RootInlineFragment ->
InlineFragment tree
* Get rid of inline padding hack
* Get rid of ComputedFormat
* Paint inline box backgrounds properly
|
|
|
|
|
|
|
|
|
| |
* Blocks are now positioned before their text contents would be
layouted
* Untangle calcAvailableSpaceSizes's results from BlockBox
* Move a couple of objects from box -> engine
* Use Size in a few more places
* Set display to block if float is not none
|
|
|
|
|
|
| |
* remove Viewport reference from BlockBox
* Viewport -> LayoutState (call it what it really is)
* move more stuff from box -> engine
|
|
|
|
|
| |
Viewport at this point is basically just the layout state, so it
makes no sense to store it in buffer.
|
| |
|
|
|
|
|
|
| |
* rename module (window -> winattrs, to avoid conflict with env/window)
* do not use result
* remove unused cell_ratio
|
| |
|
| |
|
|
|
|
| |
Makes LineBox objects a bit smaller.
|
| |
|
| |
|
|
|
|
|
| |
Most InlineContext members may be discarded after layout, and thus
belong in InlineState.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Say we have a table
<TABLE>
<TR>
<TD WIDTH=20>a</TD>
</TR>
<TR>
<TD>aklsdfjaskdfjkl</TD>
</TR>
</TABLE>
This should be 20 pixels wide, not as wide as the second row.
Also, larger specified widths now always override previous widths
specified on the column. (I think this was a regression, but the
previous solution to this problem was an ugly hack.)
|
|
|
|
|
|
|
|
|
|
| |
* ips -> io/
* loader related stuff -> loader/
* tempfile -> extern/
* buffer, forkserver -> server/
* lineedit, window -> display/
* cell -> types/
* opt -> types/
|
|
|
|
|
| |
Now cells with a rowspan > 1 actually occupy several rows.
The implementation is quite ugly but it should work for now.
|
| |
|
|
|
|
|
| |
Re-consideration of 1e0506adb: we do need to explicitly specify padding
after all, so the rendering engine knows of it too.
|
|
|
|
|
|
| |
Factor out the "shrink" variable and the (broken) isWidthSpecified into a
SizeConstraint type.
This should make box sizing easier to reason about.
|
|
|
|
| |
Split it into smaller functions.
|
|
|
|
| |
Reduces ugly rendering caused by rounding errors.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Fix margin-top being used instead of margin-bottom.
Content width resolving makes somewhat more sense now.
min-width, max-width doesn't completely break width calculation anymore.
Finally, position: absolute is no longer implemented as a horribly
broken hack.
|
|
|
|
|
| |
by checking if the box has been positioned before. Not a very
good solution, but it works...
|
|
|
|
| |
Now at least absolute should be positioned correctly.
|
|
|
|
|
| |
Also, a hack for inline box background-color. It doesn't work very
well, but good enough for now.
|
| |
|
|
|
|
|
|
|
|
| |
Table layout: weight calculation is no longer broken. We use
maxContentWidth for this, which the first pass of a non-specified
table cell layout overrides.
pre-wrap: just a minor fix - include it in whitespacepre, now that
we have a distinction between pre and wrapping white-space
|
|
|
|
| |
Layout should only depend on cascading.
|
| |
|
|
|
|
|
| |
Get rid of compwidth, fix some edge cases where boxes would be computed
incorrectly, etc.
|
| |
|
| |
|