| 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.
|
|
|
|
| |
Now getComputedStyle works with pseudo-elements too.
|
|
|
|
| |
it can be a value type again
|
| |
|
| |
|
|
|
|
|
|
| |
An ancient bug, but the fix seems to be quite simple: stop confusing the
last X position before the existing string on the line with the last X
position that the new string occupies.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Even if we don't do some z-ordering correctly, it's no excuse to paint
boxes incorrectly.
It's also extremely annoying when I try to use a menu and text bleeds
into the drop-down window.
|
|
|
|
|
| |
Eventually the tree should be collapsed into the DOM, and StyledNode
should be created on the stack.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Now StyledNode has an "element" reference, which refers to the element
it was derived from.
This reduces the object's size, removes the need for casting around
the "node" field, and also gets rid of a pointless cycle.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Regular select is now rendered as flex, and does not wrap.
This gets rid of the pointless whitespace before/after options.
multiple still looks weird, but maybe a bit less?
Probably we should just render it with pseudo-checkboxes, and drop the
special mode from select.nim.
|
|
|
|
| |
we always do 2 passes
|
|
|
|
| |
better than nothing
|
|
|
|
| |
starting to run out of test case names
|
|
|
|
| |
@media (grid: 1) works again.
|
|
|
|
|
| |
This must not be handled by the tree builder, as that needlessly
complicates tree caching.
|
|
|
|
| |
also, reduce the number of types named MediaQueryList by 50%
|
|
|
|
|
|
|
| |
In lite mode, it uses default window attributes.
Incidentally, this also untangles media query matching from cascade,
saving us a forward declaration hack (yay!)
|
|
|
|
|
|
|
| |
In this case, it seems we have to wrap.
(It's still not quite there; replace flow-root with inline-box to see
another interesting bug...)
|
|
|
|
| |
We do not support sticky scrolling, but this much should still work.
|
|
|
|
|
|
|
|
| |
Turns out this doesn't work like I thought it does... the second
layout is always needed.
This probably means that it's possible to layout absolutes during flow
after all...
|
| |
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
I'm not a fan, because it hides bugs. But working around the overflow
errors is starting to get unwieldy.
On 32-bit systems, we try to use compiler intrinsics as Nim does.
|
|
|
|
|
| |
It's probably possible to do it in layout, but it's way too hard.
Just do it in render.
|
|
|
|
|
| |
sticky, ruby, writing-mode: lots of complexity for little gain, and the
fallback works just as well (if not better)
|
|
|
|
|
|
|
| |
This way, it benefits from sub-layout caching. Which is great because
our flex layout likes to unnecessarily redo item layout...
Also, we now account for the bottom margin in flex items.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
I'm not sure if this is the best way. On one hand, it probably breaks
text in some languages that cannot be represented in normal form.
On the other hand, some terminals may crash on such strange sequences
(or worse).
I'll just skip them for now, because it's marginally faster than
returning 0 from width. We'll see if somebody complains.
|
|
|
|
|
| |
* do not display submit/reset text with empty value
* fix erroneous blank placement with white-space: pre on new line
|
| |
|
|
|
|
| |
I don't like the extra flag, but I don't see a better way.
|
|
|
|
| |
this broke gotoAnchor in some cases
|
|
|
|
| |
The standard says we should blockify. Alas, the standard is lying.
|