Skip to content

MacSurf

v0.4.7-fixes194 Feature

This release adds 3 notable features for engineering teams evaluating rollout.

Published 11d Media Servers
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

bearssl carbon-api classic-mac codewarrior css3 duktape
+9 more
javascript mac-os-9 macintosh netsurf open-transport powerpc quickdraw retro-computing web-browser

Summary

AI summary

Updates PNG-fade saga preceding fixes191, Tests added Under tests/css/, and Trap-zone discipline followed across a mixed release.

Changes in this release

Feature Medium

Adds `inset` shorthand support with !important propagation.

Adds `inset` shorthand support with !important propagation.

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Feature Low

Implements partial `background-size` property handling for bitmap backgrounds.

Implements partial `background-size` property handling for bitmap backgrounds.

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Feature Low

Partially implements `position: sticky` for vertical stickiness only.

Partially implements `position: sticky` for vertical stickiness only.

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Feature Low

Adds parsing support for `object-position`, defaulting to centre alignment.

Adds parsing support for `object-position`, defaulting to centre alignment.

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Feature Low

Adds parsing support for `pointer-events`, no hit‑test implementation yet.

Adds parsing support for `pointer-events`, no hit‑test implementation yet.

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Feature Low

Drops CSS3 UI knobs (`transition`, `animation`, `@keyframes`) with quickdraw fallback, preserving static values.

Drops CSS3 UI knobs (`transition`, `animation`, `@keyframes`) with quickdraw fallback, preserving static values.

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Bugfix Medium

Corrects layout overflow where images ignored CSS width, preventing pages from rendering ~2× too wide.

Corrects layout overflow where images ignored CSS width, preventing pages from rendering ~2× too wide.

Source: llm_adapter@2026-05-29

Confidence: high

Bugfix Low

Improves PNG mask threshold and premultiplied alpha for sharper edges.

Improves PNG mask threshold and premultiplied alpha for sharper edges.

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Bugfix Low

Cleans up strict-pointer and uninitialized warnings (CW8).

Cleans up strict-pointer and uninitialized warnings (CW8).

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Refactor Low

Reverts scaled‑PNG composite path, restoring transparency via single CopyMask implementation.

Reverts scaled‑PNG composite path, restoring transparency via single CopyMask implementation.

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Refactor Low

Matches `css__parse_unit_keyword` signature exactly.

Matches `css__parse_unit_keyword` signature exactly.

Source: granite4.1:30b@2026-05-29-audit

Confidence: high

Full changelog

Hardware-verified on G3/G4 OS 9: mactrove.com and Drupal-platinum-themed pages now render at correct viewport width instead of laying out ~2x too wide. The "loads very wide" symptom is closed.

Root cause (fixes194)

layout_minmax_block_inner had a long-standing branch for replaced elements (<img>, <embed>, <object>) that set:

min = max = content_get_width(block->object);  // natural pixel width

It used the natural pixel width of the source bitmap and ignored css_computed_width entirely. NetSurf's hints.c::css_hint_width correctly translates HTML <img width="N"> into CSS_PROP_WIDTH = N, and wtype/width/wunit were already in scope at line 996 — this one branch just discarded them.

After fixes176 added the flex intrinsic-main-size fallback (b->max_width), the natural image width cascaded up the box tree, blowing flex/grid ancestors past the viewport. For mactrove's logo (<img src="logo.png" width="400" height="106"> over a natural 1058×245 PNG), the trace was:

img w=1058 (natural)
  → .page__logo flex w=1058
    → page__header flex w≥1058
      → nested flex w=1788
        → outer block w=1818
          → root descendant_x1 = 2054   (viewport = 949)

The chrome read descendant_x1=2054 as scrollable content width → page laid out at ~2× viewport.

Fix: when the replaced element has an explicit CSS width (px or length, not percentage), use the resolved px as both min/max-content. If only height is set, scale by natural aspect ratio. Otherwise natural intrinsic remains the fallback.

Cascade of fixes shipped in this tag

This release rolls up the work from fixes187 → fixes194:

fixes191 — six-feature theme-completion sprint (a–f)

| Sub | Feature | Approach | Status |
|---|---|---|---|
| 191a | inset shorthand | cssh_css preprocessor expands TRBL longhands with !important propagated | FULL |
| 191b | background-size | New end-of-enum libcss property (0x08D); auto/cover/contain/<length>/2-value forms; consumer in html_redraw_background | PARTIAL — bitmap-only; gradient-bg tiling deferred |
| 191c | position: sticky | Consumer in html_redraw_box adjusts y_parent so painted y never goes above top: | PARTIAL — vertical only, no parent-bottom clamp |
| 191d | object-position | cssh_css drop; apply_object_fit already centres (matches default) | PARTIAL |
| 191e | pointer-events | cssh_css drop | PARTIAL — parse-safe, no hit-test |
| 191f | transition/animation/@keyframes + 14 CSS3 UI knobs | cssh_css modern_compat DROP_PROPS extended | QUICKDRAW_FALLBACK — final static values still apply |

Cleanup chain after the initial fixes191 ship

  • fixes192 — CW8 strict-pointer + uninit warning cleanup
  • fixes193 — match css__parse_unit_keyword signature exactly

PNG-fade saga preceding fixes191

  • fixes187 — PNG mask threshold 128→8 + RGB premultiplied by alpha. Edges sharper, partial fade.
  • fixes188 — Scaled-PNG composite path attempt with CopyBits readback + alpha-over composite. Hardware-rejected — transparency disappeared.
  • fixes189 — Force ARGB high byte to 0xFF in buf→pm copy. Insufficient.
  • fixes190 — Revert fixes188 composite branch. Single CopyMask path. Transparency restored; scaled icons return to fixes187 sharper-but-faded baseline.

Mac-side action

If updating from < fixes191, add to MacSurf.mcp:

  • p_background_size.c
  • s_background_size.c

Trap-zone discipline followed

  • New libcss property (background_size) added at END of enum (0x08D, after ASPECT_RATIO)
  • Storage is int32_t self-aligning at END of _i struct (fixes151b padding lesson)
  • dispatch.c and s_dispatch.c updated in mirror (fixes116b rule)
  • No mid-enum insert, no propstring shuffling

Retro68 syntax-clean on all touched files.

Tests added

Under tests/css/:

  • inset.html — inset shorthand probes I1–I5
  • background_size.html — BS1–BS6 (cover/contain/explicit/auto)
  • sticky.html — sticky sidebar probe
  • object_position.html — degraded-to-centre probes
  • pointer_events.html — parse-safe probe
  • transition_static.html — static-value preservation under dropped declarations

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track MacSurf

Get notified when new releases ship.

Sign up free

About MacSurf

All releases →

Beta — feedback welcome: [email protected]