| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* isValidEscape was fairly pointless, and occasionally used incorrectly.
* "starts with an ident sequence" is normally called on the next 3
codepoints; on the one occasion where it isn't, just hardcode the dash
case.
|
|
|
|
|
|
|
|
| |
* fix clip for image
* switch back img's display to inline
* fix image width calculation without specified width/height
I'm not 100% sure if this is correct, but it certainly looks better.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Overflow pretty much requires scrollbars, but those wouldn't work in
dump mode, plus of course they would be a pain to implement. So as a
simple alternative:
* overflow: hidden, clip works as per spec.
* overflow: auto, overlay, scroll invert the intrinsic minimum size
clamping logic instead of adding a scrollbar.
What this concretely means, is that this
<pre style="overflow: scroll; height: 1em">
test
test
test
</pre>
will, instead of creating a scroll container, just override the
specified height.
This hack works surprisingly well, because CSS pretty much requires
setting height on scroll containers, so authors aren't incentivized to
set height on the parent container too (because the contents are already
sized appropriately).
One issue left is how to deal with overflow: hidden ancestors. For now,
I've made it so that it can spill for overflow-x, and always clips
on overflow-y, because it's much less likely to bleed into other
text horizontally than vertically. But there is definitely room
for improvement, e.g. we could track space requested by scrolling
children and expand parent boxes based on that.
|
|
|
|
|
|
|
| |
I didn't get it right :(
true is the default return value, and true + continue should resolve
to false.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a bit tricky, but it seems to work. It optimizes selectors in
the line of "div :hover" (note the space.)
Previously such selectors would add a hover dependency to pretty much
every element, and trigger a re-style for all elements that changed
their hover status. After this patch, when :hover and friends would
return false, they first try to match the element *without* pseudo
selectors, and only add their dependencies if the element would match
like that.
(Notably, it only does this for when :hover is false. Probably it would
help somewhat if we checked for the opposite with true too, but I'm not
sure how much.
For now, I'll keep it like this, and maybe try to further optimize it
later.)
|
| |
|
|
|
|
|
| |
Now we use the node index to optimize next/subsequent sibling
combinators.
|
|
|
|
|
|
| |
I want to use it in the UA sheet, so the loop won't cut it.
(Also fix a parsing bug that prevented "of" from working.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Lets us skip a couple pointless multiplications/divisions during layout.
|
|
|
|
|
| |
The test case attached is undefined in CSS 2.1, but css-sizing-3
wants us to just ignore the width property (I think).
|
|
|
|
|
|
|
| |
this is necessary too, now that I think of it
(well, table caption sizing is still half-broken, but that's a problem
for another day...)
|
| |
|
|
|
|
|
| |
If the contents are larger than the specified cell height, then it is
simply ignored.
|
|
|
|
| |
Uses an additional lower-case map for O(1) case-insensitive comparisons.
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented using proprietary selectors -cha-first-node and
-cha-last-node, modeled after -moz-first-node and -moz-last-node.
I think they are compatible.
That does mean this is more limited than w3m's trimming, e.g. it can't
really deal with nesting or empty tags. I think this is fine, as it's
mainly meant for unstyled documents in the first place (which are
unlikely to have e.g. MAIN tags).
|
| |
|
|
|
|
|
|
| |
using div instead of / is sort of weird, but it makes it clearer if
we're dividing floats or layoutunits (and is already what the code
uses).
|
|
|
|
|
| |
"Computed" was redundant; other types of values don't have a common
type.
|
| |
|
| |
|
|
|
|
| |
We can do this now that xminwidth is more accurate.
|
|
|
|
| |
better
|
|
|
|
| |
still not quite right, but it's slowly taking shape
|
|
|
|
| |
yeah idk
|
|
|
|
| |
another case of "the object model was unnecessarily complex"
|
|
|
|
|
| |
Seems more compatible with websites that use smaller fonts + padding
for styled code tags.
|
| |
|
|
|
|
|
|
|
|
| |
Gets rid of rounding errors when positioning images.
Theoretically this is possible with Sixel too, but as always, it's
ten times as difficult to implement as with Kitty, so I'll leave it
for later.
|
| |
|
|
|
|
|
|
|
|
| |
Roughly halves the object's size, and gets rid of a large number of
allocations.
It could be compressed further into a bitmap, but I'm not sure if it's
worth the complexity.
|
|
|
|
|
|
| |
so for max-width it's called "none", but for min-width it's "auto".
why :(
|
|
|
|
|
|
|
|
|
|
|
|
| |
ugly, but better than the status quo.
the core issue is that width, min-width should clamp xminwidth too, but
it doesn't. this hadn't been an issue until recently, but since I made
<pre> stretch out xminwidth too it had the unfortunate result that you
now have to scroll on pages that nest pre in a flex.
this still isn't a proper fix, in particular it won't work if min-width
is set to 0, but on the sites I tried it happens to work anyway.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
no idea what that reconsume was doing there; probably a refactoring
mistake
|
|
|
|
| |
only the most basic form; no media queries yet
|
|
|
|
| |
They are UA style.
|
|
|
|
|
|
|
|
| |
Probably a remnant from back when startOffset meant (and was used for)
something different.
Interestingly, there was already a test case for this, but it was also
wrong.
|
|
|
|
|
| |
This couldn't get into system.nim for technical reasons, but it's still
pretty useful when iterating over non-mutable openArrays.
|
| |
|
|
|
|
| |
it's author style too
|
| |
|
|
|
|
|
| |
Fixed a bug that would lead to styles unnecessarily being recalculated
if the root element had a :hover dependency.
|
|
|
|
| |
forgot about word-break
|