Commit Graph
63 Commits
Author SHA1 Message Date
SGavrl 277753d31d Support responsive images and atomic multicol 2026-07-30 20:38:33 +00:00
SGavrl 10b8492116 Improve modern layout and viewport rendering 2026-07-30 20:24:57 +00:00
SGavrl 35c54936d5 render: size and paint native selects 2026-07-26 22:11:39 +00:00
SGavrl 237ba35639 render: shape atomic generated controls 2026-07-26 21:51:34 +00:00
SGavrl 9ec43134ae render: honor generated controls and border resets 2026-07-26 21:31:05 +00:00
SGavrl 1b313ecb49 render: retain authored webfont identity 2026-07-26 20:58:28 +00:00
SGavrl 20be62bca9 render: preserve numeric font weights 2026-07-26 20:48:24 +00:00
SGavrl 37f6c93af9 render: paint generated boxes with contextual backgrounds 2026-07-26 19:48:59 +00:00
SGavrl eea960dd32 render: honor text and background intrinsic metrics 2026-07-26 16:04:55 +00:00
SGavrl bc13488df9 render: apply text transforms to UI word leaves 2026-07-26 15:52:29 +00:00
SGavrl 058e3e98a0 render: load preloaded web fonts 2026-07-26 15:46:40 +00:00
SGavrl 9b0b138fb9 render: resolve contextual gaps and empty block lines 2026-07-26 15:33:23 +00:00
SGavrl ca551a996b render: resolve contextual positioned lengths 2026-07-26 14:09:49 +00:00
SGavrl d9f9202737 render: resolve modern responsive geometry 2026-07-26 13:47:09 +00:00
SGavrl 6eafb7d6cc render: size and color inline SVG from CSS 2026-07-26 12:18:07 +00:00
SGavrl 5a89ebd0a3 render: preserve framework inline control rows 2026-07-26 12:06:26 +00:00
SGavrl 3618549842 render: unify responsive geometry and inline gradients 2026-07-26 11:51:44 +00:00
SGavrl 228a5723ce render: support modern framework content and geometry 2026-07-26 10:50:31 +00:00
SGavrl 21dd5819ae render: finalize table row geometry 2026-07-23 22:45:07 +00:00
SGavrl 771528c7ff render: align table track geometry 2026-07-23 21:56:19 +00:00
SGavrl 40a34639ca render: size native input controls 2026-07-23 21:30:35 +00:00
SGavrl 706e110a24 render: preserve forced line break geometry 2026-07-23 21:07:10 +00:00
SGavrl fa471bce43 render: propagate float bands through blocks 2026-07-23 19:56:24 +00:00
SGavrl 07d2c6691f render: clamp intrinsic replaced sizing 2026-07-23 19:22:27 +00:00
SGavrl 4b4d7007d9 render: place right-float navigation bands 2026-07-23 19:01:50 +00:00
SGavrl eff74fc38c render: correct list and mixed float geometry 2026-07-23 18:42:15 +00:00
SGavrl 8422cfccd0 render: honor legacy center layout 2026-07-23 18:05:41 +00:00
SGavrl f6484f51c8 render: preserve absolute static position 2026-07-23 17:30:43 +00:00
SGavrl 2d1f84a29d render: preserve inline block inner flow 2026-07-23 16:24:13 +00:00
SGavrl bd9c161f55 render: separate text and item alignment 2026-07-23 15:58:37 +00:00
SGavrl f83bdd36cf render: contain responsive replaced wrappers 2026-07-23 15:34:57 +00:00
SGavrl 6c77eb2383 render: preserve block fill beside floats 2026-07-23 15:13:40 +00:00
SGavrl 85613b741d render: place opposing floats in one band 2026-07-23 15:03:50 +00:00
SGavrl 9471591c6c render: preserve responsive image grid geometry 2026-07-23 14:48:27 +00:00
SGavrl 735375ee33 render: preserve float flow bands 2026-07-23 14:09:57 +00:00
SGavrl 64b628404b render: ignore non-items in flex layout 2026-07-23 13:34:09 +00:00
SGavrl 29628df548 render: resolve contextual CSS math 2026-07-23 12:53:11 +00:00
SGavrl b13a1e5e71 render: resolve relative box edge lengths 2026-07-23 12:30:44 +00:00
SGavrl 7827a6a788 render: honor modern containing-block triggers
Track transform, filter, backdrop-filter, perspective, containment,
will-change, and content-visibility triggers independently. Use the combined
state for absolute and fixed containing-block ancestry.
2026-07-23 12:02:55 +00:00
SGavrl bbeceb97ad render: honor transform containing blocks
Track every non-none transform as a containing-block trigger, including
unsupported visual transforms. Keep separate nearest-ancestor maps so
positioned boxes capture absolute descendants while only transforms capture
fixed descendants.
2026-07-23 11:47:00 +00:00
SGavrl 6ea1739121 render: position inset boxes against CSS containers
Reparent inset-positioned absolute boxes to the nearest non-static ancestor
and fixed boxes to the initial containing block. Keep auto-axis boxes on the
existing static-position path, distinguish fixed from absolute, and blockify
positioned inline boxes and floats.
2026-07-23 11:34:23 +00:00
SGavrl 4979606a2f render: respect CSS box sizing 2026-07-23 10:06:55 +00:00
SGavrl 3d7a8e2582 render: honor important cascade priority 2026-07-22 12:59:55 +00:00
SGavrl 22f33e4dec render: z-index paint layers and clear ending float zones
Paint order was pure tree order, so a dropdown/overlay declared before a
later sibling lost to it and a z:-1 decorative backdrop covered its own
content. A positioned element with a non-zero z-index now lifts its
whole subtree into a separate paint layer: negative layers under the
normal flow, positive above it, each sorted ascending with tree order
preserved within equal z. Nested z roots paint inside their ancestor
root's subtree in tree order, the pragmatic core of CSS stacking
contexts.

clear (left/right/both, previously unparsed) now ends the float zone,
so a clearfix element drops below the float at full width instead of
joining the flow column beside it.

Repro-verified: an earlier z:10 overlay paints over a later sibling, a
later z:-1 backdrop paints under earlier content, and the clear repro
matches Chromium within 3px on every measure. Spot set unchanged or
slightly improved; obstacle course 33/33.
2026-07-16 13:10:28 +00:00
SGavrl 953292563d render: table vertical-align and specified column/row sizing
Cells now vertical-align the way tables actually do: middle by default
(the effective UA behavior), with author top/middle/bottom parsed and
applied to whichever shape the cell took: main-axis alignment on the
flex-column stand-in, line alignment on a promoted inline context, or a
pinned-origin offset for the pure-text leaf path where the shaped text
height is known at finalize.

Specified column widths finally apply. <col>/<colgroup> widths (style
or attribute, with span) and colspan-1 cell widths are recorded per
column at build time and pinned inside the column-balancing pass: px
directly, percent against the table's content width, with each column's
content min-content still flooring it. The cell's own width is
neutralized once it has fed the column, so the cell box fills its grid
area instead of shrinking to a fraction of its own already-sized track
(a width:50% cell previously ended up at 25 percent). Unspecified
columns keep content sizing but stretch to fill a definite table width
instead of leaving a dead strip of table background. Row and cell
heights act as row minimums.

Verified against Chromium on a 5-case repro (column from cell width,
row backgrounds, vertical alignment, col element width, percent cell in
a fixed table): all match. Wikipedia and the prose spot set unchanged;
obstacle course 33/33.
2026-07-16 12:47:47 +00:00
SGavrl 35cbbff9b2 render: real block layout for mixed content, owner-space overflow clips
Two structural fixes to the layout and paint model.

Mixed inline+block content: a block holding both was promoted wholesale
to a flex-row-wrap container to approximate the inline formatting
context. That collapsed contentless block children to width 0 (a
position:relative hero wrapper whose only child is an absolute fill
image vanished with it) and let text share lines with sibling blocks.
Now the parent stays a real block, block-level children stay direct
children (auto width fills the containing block), and each maximal run
of consecutive inline-level siblings becomes one anonymous block-level
box carrying the IFC. A run of pure text and foldable inline wrappers
collapses to a single shaped cosmic-text leaf (one taffy node per run
instead of one per word); runs with atomic inline boxes fall back to a
flex-wrap wrapper. Absolutely positioned children neither join nor
break runs and no longer count as inline content, so their containing
block keeps its real used width and taffy resolves width:100%/inset:0
fills against it.

Overflow clips: an inherited overflow:hidden clip was shifted by the
painted node's own accumulated translate, so a carousel track's
translateX dragged the viewport's clip along with every slide and all
slides stayed visible stacked. Clips are now stored in the clip owner's
coordinate space (owner translate baked in at resolve time) and no
longer move with descendants, for boxes, per-word text, and shaped
inline items alike. The same walk records per-node accumulated
translates once, replacing the per-painted-node ancestor walks. Also
parse translate3d (Swiper-style carousels position their track
exclusively through it) and make transform:none reset a lower-priority
transform.

Verified: abs-fill repros that rendered 0x0 now fill across
block/flex/grid parents; carousel repro shows exactly one slide;
danluu.com mismatch vs Chromium 13.0 to 5.7 percent; no regressions
across the prose and framework spot sets; obstacle course 33/33; 36
percent faster on a layout-bound synthetic page with neutral real-page
memory.
2026-07-16 11:58:10 +00:00
SGavrl ea486a8900 render: blockify grid items so inline children lay out correctly
A direct child of a grid container is blockified per CSS Display 3, so an
inline <a>/<time>/<span> becomes its own block-level grid item instead of
being flattened into loose words in the container (which shattered grid
lists like jvns.ca's .article-list of alternating <time>/<a> into one word
per cell). Grid only, not flex, since flex-column is also our block
stand-in for <td>.
2026-07-11 22:17:33 +00:00
SGavrl 281a22e247 render: match Chrome font metrics with Liberation Sans/Serif/Mono
Chrome's default sans-serif on this class of host is Liberation Sans, not
DejaVu (measured: sans-serif == Arial == Helvetica == Liberation width,
DejaVu ~12% wider). Forcing DejaVu drifted all text wider and shifted
every line. Bundle Liberation Sans/Serif/Mono (DejaVu kept as glyph
fallback), default to Liberation Sans, and resolve font-family to the
right generic (monospace/code -> Mono, serif -> Serif, else -> Sans).
A controlled text page drops from ~15-20% to 3.5% pixel mismatch and
every line lands within 1px of Chrome.
2026-07-11 21:49:33 +00:00
SGavrl 23594b1f96 render: percentage padding, box-shadow, external-sprite svg, gradient text
percentage padding/margin: top/bottom percentages resolve against the
containing-block width (the responsive aspect-ratio-box trick, e.g.
padding-top:56.25%), resolved to px in the top-down layout pass so card
media boxes reserve space instead of collapsing.
box-shadow: parse and paint an outset shadow (rounded, offset, spread,
soft-edge approximation) so cards/buttons/menus have depth.
external-sprite svg: resolve <use href="url#id"> to an external sprite
file, inject the referenced symbol so inline-svg icon systems rasterize.
background-clip:text: paint transparent-with-gradient text (the common
gradient hero/button label) instead of leaving it invisible.
2026-07-11 21:02:57 +00:00
SGavrl 2652ee64a4 render: real-world CSS rendering parity
Colors: oklch()/oklab() and color-mix(); linear-gradient backgrounds.
Grid: named-line placement, repeat() expansion, drop whitespace-only
grid items; upgrade taffy 0.7 -> 0.12 so aspect-ratio images in
auto-height rows no longer collapse to slivers.
CSS: @layer, nesting, @property, :is()/:where(), clamp(), @media not all;
source/track/param/area and svg desc/metadata as display:none.
Images: webp + intrinsic sizing, srcset/picture, browser UA + Accept for
CDN fetches, grey placeholder on failure; width/height HTML attributes
rank below author CSS with aspect-ratio preserved for auto axes.
2026-07-11 19:52:36 +00:00