| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
...and refactor applyValue in the process.
|
|
|
|
|
| |
We now compute styles on-demand, which is both more efficient and
simpler than the convoluted tree diffing logic we previously used.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
font-size isn't very useful, but some scripts assume it exists.
opacity: 0 for now is special cased: it inhibits rendering of further
boxes. This isn't quite right, as it should just behave as a pseudo
visibility: hidden... nonetheless it's quite effective at hiding
garbage.
(Also, remove incorrect comment - it can be nil if the branch has no
variables.)
|
|
|
|
|
|
|
|
|
|
|
| |
and once again, there was light...
Well, it barely works, but it's enough to get colors back on most sites.
Nested variables aren't supported for now, and shorthand expansion only
"works" for `background' (it's a hack).
Props to the W3C for introducing the C preprocessor to CSS - I was
starting to confuse it with JSSS after calc().
|
| |
|
|
|
|
|
|
|
|
|
| |
Untangled some nested arrays to reduce the number of intermediary seqs
in cascade, and collapsed the two rule def sorts into just one (per
pseudo element). This should make cascading somewhat faster.
Also, we now parse variables, but they aren't resolved yet.
Probably a seq won't cut it for var lookup...
|
|
|
|
| |
they fit into 8 and 64 bits respectively
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* switch from float64 -> float32; other browsers use 32-bit floats too
* specify integer size as 32-bit
* use NetworkBitmap for background-image value (currently just an
invalid dummy value)
* remove "none" property & value types
CSSValue's payload is always one word (plus another for the type tag).
CSSValues keeps its size, but no longer has to heap-alloc + refcount
word-sized CSSValues.
(On 32-bit systems, CSSValues might actually be larger than before,
but I expect it's still a net benefit with the removal of refcounting
and the switch to 32-bit floats.)
|
| |
|
|
|
|
| |
less work for memset
|
|
|
|
| |
better than nothing
|
|
|
|
| |
@media (grid: 1) works again.
|
|
|
|
|
| |
This must not be handled by the tree builder, as that needlessly
complicates tree caching.
|
|
|
|
| |
We do not support sticky scrolling, but this much should still work.
|
|
|
|
|
| |
sticky, ruby, writing-mode: lots of complexity for little gain, and the
fallback works just as well (if not better)
|
|
|
|
| |
Only available in "app" mode.
|
| |
|
|
|
|
|
|
| |
you can't bisearch an unsorted map...
(also, turn on text styling for colored layout tests because it would
have caught this)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Lets us skip a couple pointless multiplications/divisions during layout.
|
|
|
|
|
| |
"Computed" was redundant; other types of values don't have a common
type.
|
|
|
|
|
|
|
|
| |
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 :(
|
| |
|
| |
|
|
|
|
| |
only the most basic form; no media queries yet
|
|
|
|
|
| |
This couldn't get into system.nim for technical reasons, but it's still
pretty useful when iterating over non-mutable openArrays.
|
|
|
|
|
|
|
| |
far from perfect, but it's something.
(ideally, we should store enums in a bitmap instead of allocating a
GC'ed property for each of them.)
|
|
|
|
| |
as much as I wish it weren't, layout *is* css.
|
|
|
|
|
| |
negative z-index and inline positioning are still not respected, but
better than nothing I guess.
|
|
|
|
|
| |
* line, vector, matrix -> path
* twtuni, charcategory -> twtstr
|
|
|
|
|
|
|
|
|
|
|
|
| |
Called -cha-reverse.
Mostly to solve the problem that code tags are indistinguishable from
regular text - on a graphical browser this is normally served by
monospace font, but we always use monospace...
So now the default ua.css adds reverse video to code and xmp. pre
remains as it was, because it means "preformatted", not "monospaced".
Also, it would mess with our whatever-to-HTML converter output.
|
|
|
|
|
|
| |
* split out CSSColor from CellColor; now CellColor is just 4 bytes
(which helps reduce FormatCell size)
* unify color function naming (still not perfect)
|
|
|
|
|
| |
This was a bad idea that, despite my best efforts, never worked
properly.
|
|
|
|
|
| |
I've moved most image logic to adapter, so it doesn't really make
sense to have this subdir anymore.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
std/unicode has the following issues:
* Rune is an int32, which implies overflow checking. Also, it is
distinct, so you have to convert it manually to do arithmetic.
* QJS libunicode and Chagashi work with uint32, interfacing with these
required pointless type conversions.
* fastRuneAt is a template, meaning it's pasted into every call
site. Also, it decodes to UCS-4, so it generates two branches that
aren't even used. Overall this lead to quite some code bloat.
* fastRuneAt and lastRune have frustratingly different
interfaces. Writing code to handle both cases is error prone.
* On older Nim versions which we still support, std/unicode takes
strings, not openArray[char]'s.
Replace it with "twtuni", which includes some improved versions of
the few procedures from std/unicode that we actually use.
|
|
|
|
|
|
|
|
| |
Do it like parseEnumNoCase0, so we no longer instantiate a gazillion
different binary searches for the same type.
While we're at it, make matchNameProduction's searchInMap use uint32
too.
|
|
|
|
|
|
|
|
|
|
| |
* stream: and passFd is now client-based, and accessible for buffers
* Bitmap's width & height is now int, not uint64
* no more non-network Bitmap special case in the pager for canvas
I just shoehorned it into the static image model, so it still doesn't
render changes after page load. But at least now it doesn't crash the
browser.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* cssvalues, twtstr: unify enum parsing code paths, parse enums by
bisearch instead of hash tables
* mediaquery: refactor (long overdue), fix range comparison syntax
parsing, make ident comparisons case-insensitive (as they should be)
|
|
|
|
| |
Whitespace-only dimension values no longer crash the parser.
|
| |
|
|
|
|
| |
this one is weird but I'm sure the standard is technically right
|
|
|
|
| |
Parse rule values in sheet addRule, not during cascade.
|
|
|
|
|
|
|
|
|
| |
Captions are no longer positioned inside tables, yay.
Also, misc:
* rename some things for consistency
* clamp out of bounds rgb() values
* remove inherited property lookup table
|
|
|
|
|
| |
I wish we didn't need any, but fixing this for integers would be too
involved and the float64 one was causing problems now.
|