Commit Graph
39 Commits
Author SHA1 Message Date
ldm0 6fdc19ce13 fix(fonts): load used fonts during resource processing
Discover font demand from computed styles without triggering layout.
Honor the FONT policy, recheck fallback demand before readiness, and
invalidate child-document scans for ancestor style and viewport changes.

Share rendered control labels, marker counters and text normalization,
including generated items, inline boundaries, leaf boxes and suppressed
contents. Cover Unicode subsets, readiness and zero layout passes.
2026-10-28 05:55:19 +08:00
ldm0 4fea7994ad fix(paint): align text stroke joins with Chromium
Use explicit miter joins and a shared miter limit of 4 for CPU and PDF
text strokes. Use the same conservative expansion for layout outsets
and native PDF clipping, including synthetic bold stroke widening.

Add deterministic triangle glyphs to cover pointed joins, bevel fallback,
and miter-only ink entering a PDF clip.
2026-10-26 19:26:49 +08:00
ldm0 9b4e94338e fix(layout): include text stroke in paint culling bounds 2026-10-26 19:26:49 +08:00
ldm0 4487138ce7 fix(layout): derive hanging overflow and clip inline boxes 2026-10-25 04:14:30 +08:00
sicko7947 055be4b08f fix(layout): exclude hanging trailing spaces from scrollable overflow
A wrapped line whose trailing spaces hang past the content box made
scrollWidth exceed clientWidth, unlike Chromium. Keep the full line rect
for CSSOM line geometry and use a scrollable rect without the hanging
advance when aggregating inline scrollable overflow.
2026-10-25 04:14:30 +08:00
ldm0 db2c33810b perf(layout): expose stage timings and a native cost probe 2026-10-17 20:06:22 +08:00
ldm0 c28b7d5fb9 refactor(layout): consume Parley's positioned visual clusters 2026-10-16 11:00:41 +08:00
ldm0 f181c81320 perf(layout): accumulate visual cluster positions in one pass 2026-10-16 04:55:55 +08:00
ldm0 1e8f951ef2 perf(layout): avoid redundant box moves and inline style conversion 2026-10-13 21:58:04 +08:00
ldm0 86762e488a fix(forms): isolate empty editor carets from placeholder styling 2026-10-13 20:45:40 +08:00
ldm0 a007ab2793 fix(forms): paint focused text-control selections and carets 2026-10-13 20:45:40 +08:00
ldm0 53d16780d5 feat(pdf): render searchable PDFs with Krilla
Route CDP Page.printToPDF and CLI PDF dumps through an owned snapshot PDF
backend with embedded subset fonts and logical text cluster mappings.

Preserve print layout isolation, page selection, and bounded local raster
fallbacks. Pin Krilla to upstream Git and share its font parsing dependencies
with the existing rendering stack where version constraints allow.

Add PDF extraction, pagination, graphics, and print lifecycle regressions,
fixed font fixtures, and reader and CDP smoke checks.

Refs #279.
2026-10-12 21:33:26 +08:00
ldm0 e6b8656643 fix(layout): resolve float inline bidi placeholders as neutral 2026-10-06 16:51:41 +08:00
ldm0 f8de77140b fix(layout): resolve out-of-flow inline bidi placeholders as neutral 2026-10-06 16:51:41 +08:00
ldm0 7fe5c0913e fix(layout): place inline decorations at physical bidi edges
Position transparent opening and closing edges around their visual descendants
after bidi reordering and before alignment. Keep the logical edge widths used
by line breaking while honoring CSS direction for physical padding and borders.

Move the inline-object bidi patch onto current upstream Parley main and pin
the fork at 8eb00ef5e628b1bba95dcde88658deb2a5aed1b5. Adapt the new font,
metrics, whitespace and layout APIs while preserving neutral atomic analysis.
Preserve the browser's synthetic-bold policy through Fontique's host threshold.

Use structural style ancestry for inline text masks so physical edge ordering
cannot change which glyphs belong to a background-clip:text target.

Add 96 Chromium-verified decoration cases covering natural RTL and mixed text,
CSS directions, asymmetric padding and borders, and layout publication. Add a
Chromium-verified paint test for ordinary and nested LTR/RTL text masks.
2026-10-06 16:51:41 +08:00
ldm0 d8e7c37723 fix(layout): resolve atomic inline bidi levels through Parley
Resolve inline objects independently so an atomic sibling outside a closed
RTL context follows the surrounding text instead of the preceding RTL run.
Pin the Parley 0.11.1 fork repair and its shared Fontique source.

Declare atomic and transparent boundary roles at the Moli adapter, keeping
opening edges with the next participant and closing edges with the previous
item. Add 336 Chromium-verified geometry cases across document modes,
contexts, directions, breaks and atomic placement, including publication.
2026-10-06 16:51:41 +08:00
ldm0 a2febfc69c fix(layout): preserve bidi contexts across forced line breaks 2026-10-03 18:32:34 +08:00
ldm0 4463dd345b fix(layout): resolve inline alignment independently of line height 2026-10-03 18:32:34 +08:00
ldm0 00e5235046 fix(layout): apply document quirks rules to inline line heights
Sample each document's rendering mode for the layout pass. In quirks and
limited-quirks mode, derive line heights from participating text, atomic
boxes and inline border/padding instead of unconditional block and empty
inline struts.

Resolve forced-break fallback in its owning inline after descendant
metrics. Keep consecutive closing edges on the forced-break fragment,
stopping at bidi controls and new objects. Allow used closing edges to
create a line independently of font-strut participation. Retain standards
struts for closing fragments and their structural ancestors on non-phantom
lines, independently of their used edge dimensions. Exclude struts for
zero-size closing edges carried past collapsed wrap spaces. Omit empty
closing font boxes only on quirks lines without resolved vertical metrics.
Exclude collapsed line-edge spaces from height contributions.

Use source object identities and one depth order for metric resolution
and placement, stopping repeated ancestor walks. Share resolved heights
and baselines between measurement and published geometry.

Cover document-specific iframe sizing, inline decorations, preserved and
collapsed spaces, nested breaks, bidi boundaries and fragment rectangles
across document modes.

Validate 41 closing-edge and wrapped-space fixtures across quirks,
limited-quirks and standards in Chromium 145.0.7632.116. Cover distinct inline and parent line
heights, nested ancestors, zero-size closing edges, terminal phantom lines,
and trailing content with zero vertical metrics.
Check initial and published heights, atomic offsets and fragment geometry.
2026-10-03 18:32:34 +08:00
lanyue-llk bcf420f622 revert: undo split PR 640 merges (#734-#740) 2026-09-22 20:02:07 +08:00
mini llk c5ac254058 fix(layout): refresh geometry and preserve inline fragments (#735) 2026-09-22 19:42:55 +08:00
ldm0 0f3e3acd4d fix(layout): preserve inline clearance below floats
Move inline content that cannot fit beside floats to the first suitable slot,
and retain that clearance in CSS baseline and container-height calculations.
This places GitHub's full-width Show more activity button below its timeline.

Update Taffy to e4e8f77c for float segment extension and content-slot fallback.
Preserve whitespace collapsing around out-of-flow loading hints and cover
float placement, staggered heights, and pre/nowrap behavior in regressions.
2026-09-18 12:43:03 +08:00
ldm0 b045ea3d52 perf(layout): cache pure text intrinsic widths 2026-08-31 02:34:16 +08:00
ldm0 ac439e328e perf(layout): reuse shaped inline layouts across probes 2026-08-31 02:34:16 +08:00
ldm0 9240c16283 perf(layout): summarize intrinsic inline placement 2026-08-30 19:46:56 +08:00
ldm0 e05ce5ef46 perf(layout): cache document font resolution 2026-08-30 19:46:56 +08:00
ldm0 6c4103eefc perf(layout): localize overflow feedback projection 2026-08-30 00:55:04 +08:00
ldm0 112cfda8cb perf(layout): cull paint outside captures 2026-08-30 00:55:04 +08:00
ldm0 59fa4f6c8a perf(layout): materialize inline fragments once 2026-08-30 00:55:04 +08:00
ldm0 6924b69e20 Fix unicode-range web font selection 2026-08-12 00:56:48 +08:00
ldm0 c0abc501e8 Include fallback fonts in normal line height 2026-08-11 18:54:34 +08:00
ldm0 8d890e005d Use own font metrics for inline fragments 2026-08-11 18:54:34 +08:00
ldm0 e09b28e158 Model structural inline box states 2026-08-11 18:54:34 +08:00
ldm0 bfd59d6ff2 Align inline text against its structural parent 2026-08-11 18:54:34 +08:00
ldm0 c4b5f65b2b Fix collapsed whitespace across inline boundaries 2026-08-11 18:54:34 +08:00
ldm0 7c4006670b Fix preserved newline inline-block baselines 2026-08-11 17:38:34 +08:00
ldm0 63eb3d6bc2 Fix inline-block baseline propagation 2026-08-11 16:34:44 +08:00
ldm0 8e1447161e Fix parent strut participation in inline layout 2026-08-11 15:11:20 +08:00
ldm0 27b5135cb6 Public preview 2026-08-11 00:10:12 +08:00