Commit Graph

4590 Commits

Author SHA1 Message Date
Martín Lucas Golini
fe8417bdc7 Fix debugger crash when attaching to a PID: Guard against dereferencing an empty debugger command and use stdio for local PID attachments unless socket transport is explicitly requested. 2026-08-01 23:32:48 -03:00
Martín Lucas Golini
6d70183da6 Fix shrink-to-fit floats and atomic inline alignment
Blockify floated inline elements and use wrap-content sizing for width-auto
floats so vote columns do not stretch across their containing block.

Recompute right-aligned text using the float's final shrink-to-fit width,
preventing overflow clipping from hiding rank text.

Handle bottom-edge fallback baselines in middle-aligned atomic boxes so
fixed-height inline parents do not vertically displace and clip elements
such as Reddit flair emoji.

Add a regression test covering the Reddit rank, vote arrows, rendered text,
and flair emoji alignment.
2026-08-01 16:05:05 -03:00
Martín Lucas Golini
da4d201eeb Implemented both opt-out settings for vscode config load, although enabled by default:
```json
  // autocomplete.json
  {
    "config": {
      "load_vscode_snippets": false
    }
  }

  // debugger.json
  {
    "config": {
      "load_vscode_launch_config": false
    }
  }
```

Disabling them affects only .vscode imports. Personal/.ecode snippets and .ecode/launch.json continue loading normally.

Refs SpartanJ/ecod€#111
2026-08-01 01:38:14 -03:00
Martín Lucas Golini
323d511eed Fixed a regression in UIWebView that caused to basically don't have render culling:
- Added UISceneNode::getVisibleWorldBounds() with an optional bounds-node binding.
  - UIWebView binds its document scene to the scroll container’s clipped viewport.
  - UINode::nodeDraw() now culls against visible scene bounds instead of the full document extent.
  - Existing top-level scenes retain their previous behavior.
  - Added a regression test confirming offscreen document widgets are skipped and visible widgets render.
2026-08-01 01:16:13 -03:00
Martín Lucas Golini
24302ec9f1 eterm: Use usable bounds instead of display bounds for window sizing. 2026-08-01 00:41:19 -03:00
Martín Lucas Golini
14207f228b eepp: Fixed a crash on single click navigation when selecting folder or file in UIFileDialog.
eeiv: Add drag & drop of images and folders. Added small welcome screen.
eterm: Detect windows below the default width and height and resize the window to fix the screen.
2026-08-01 00:31:55 -03:00
Martín Lucas Golini
13508c20d1 UIImageViewer expanded capabilities.
ecode image viewing will not auto-scale images to the pixel density.
eeiv: Modernizing eeiv to use eepp GUI, already working just like before, there are probably a few things to fix.
2026-07-31 01:25:41 -03:00
Martín Lucas Golini
51ceff9b08 Move eeiv to the main repo, I'll start modernizing the tool. 2026-07-31 00:04:21 -03:00
Martín Lucas Golini
b60ee4e4b6 Fix test. 2026-07-30 23:10:18 -03:00
Martín Lucas Golini
58cd2ec327 fix rich text propagated float placement loop
- require propagated float placement to make forward progress
  - avoid zero-displacement loops when float edges touch
  - recompute collisions after each vertical adjustment
  - add regression coverage for touching propagated and active floats
2026-07-30 20:39:07 -03:00
Martín Lucas Golini
774e09efc2 Correctly interpret prefixes in CSS display. 2026-07-30 19:53:20 -03:00
Martín Lucas Golini
a2ee615553 • Fixed the Reddit inline sibling regression.
The float-aware rich-text layout was resetting curX for every block formatting context, including inline-blocks. That made consecutive action buttons overlap. The reset is now limited to block-level BFCs;
  inline-blocks retain normal cursor advancement.

  Added:

  - An always-on deferred CSS regression covering inline anchors, inline-block siblings, and float exclusions.
  - Strict action-row and title/domain ordering checks in the opt-in Reddit visual smoke test.
  - A small CSS fixture reproducing Reddit’s layout rules.
2026-07-30 19:33:20 -03:00
Martín Lucas Golini
d3ed96919a Fix percentage margin resolution after async HTML layout
Track percentage-based margins in UIHTMLWidget and re-resolve them when
  the containing parent acquires its final size. This prevents margins
  computed against an initial zero-width container from remaining stale
  until the viewport is resized.

  Add regressions covering percentage margin recomputation and the SS64
  footer layout after a deferred stylesheet is loaded.
2026-07-30 19:08:49 -03:00
Martín Lucas Golini
943103869a fix(ui): preserve CSS order for deferred stylesheets
Reserve stylesheet source positions when link elements are encountered
  instead of assigning them when asynchronous loading completes.

  Track the stylesheet and rule ordinals explicitly so deferred external
  styles retain their document order relative to later inline styles.
  Preserve this ordering when extracting marked stylesheet rules.

  Add an SS64 regression test covering heading and button styles after a
  deferred stylesheet finishes loading.
2026-07-30 17:52:27 -03:00
Martín Lucas Golini
660395ee4d Fix cursor precedence for specialized UI widgets:
Activate retained CSS cursors when the event dispatcher resolves a new
  hover target instead of applying them at the end of UIWidget mouse-over
  handling.

  Resolve cursors through the nearest widget ancestor for non-widget hit
  targets while allowing text inputs, editors, splitters, resize handles,
  and plugins to override the default cursor contextually.

  This restores ecode and Breeze cursor behavior without changing their
  existing styles.
2026-07-30 17:06:21 -03:00
Martín Lucas Golini
ae0c5ffef0 Fix CSS pointer cursor handling on hovered widgets
Map the standard CSS pointer value to the hand cursor and retain the
computed cursor in each UIWidget instead of mutating the scene during
style application.

Apply the retained cursor when a widget becomes the hover target, restore
the arrow when leaving the UI, and make cursor inheritance available to
descendants such as inline SVG elements.

Store cursor state in an existing UIWidget padding gap and centralize
cursor serialization in Cursor::toName().

Add regressions for pointer parsing, cursor serialization, inheritance,
and the SS64 search button SVG.
2026-07-30 16:47:52 -03:00
Martín Lucas Golini
246161be7e Fix nested float propagation in rich text layout
Propagate descendant float exclusions through non-BFC HTML containers so
floats participate in their nearest block formatting context.

Finalize line geometry before translating propagated exclusions, track
finalized lines incrementally, and search successive float bands when a
fixed-width inline-block does not fit beside active floats.

Recognize inline-block elements as block formatting contexts while
preserving their fixed width. Reuse persistent float-exclusion storage
across relayouts to avoid repeated allocations.

Add SS64 regressions covering narrow viewports, HiDPI rendering, stacked
floats, anchor sizing, SVG sizing, and footer overlap.

Fixed `cursor: pointer`, `pointer` was not registered.
2026-07-30 16:28:36 -03:00
Martín Lucas Golini
0485dc0d14 Fix HTML button sizing and HiDPI SVG rendering
Use border-box sizing for HTML buttons to match browser user-agent styles and
prevent padding from increasing explicitly declared button heights.

Keep inline SVG textures rasterized at full physical resolution while assigning
density-independent sprite destination sizes, avoiding double scaling on HiDPI
displays.

Add SS64 and pixel-density regressions for button alignment, percentage-sized
SVG layout, and drawable dimensions.
2026-07-30 13:47:28 -03:00
Martín Lucas Golini
9fc385307a Fix percentage-sized inline SVG layout and rendering
Resolve percentage dimensions for HTML-backed widgets after their containing
block has a definite size. Apply the resolution during rich-text, flex, and
grid layout without triggering broad layout invalidation.

Rasterize SVGs using their resolved dimensions when intrinsic width or height
attributes are missing or percentage-based.

Add regression coverage for percentage-sized SVGs and the SS64 navigation
buttons and search icon.
2026-07-30 13:38:36 -03:00
Martín Lucas Golini
4d644880d8 Fix in CSS properties parser when comments were between and inside properties. 2026-07-30 13:11:33 -03:00
Martín Lucas Golini
d61c8a7582 Fix flex items losing their stretched cross size
Preserve the final cross-axis size assigned to auto-sized stretched flex
items when their block layout runs. Keep intrinsic flex measurement
separate so content changes can still update item sizing correctly.

Add an HTML regression test covering a short sidebar stretched alongside
taller content.
2026-07-30 11:46:54 -03:00
Martín Lucas Golini
9f65377c50 Fixed the heap-use-after-free, root cause: system fallback loading published a font under desc.family, replacing and destroying an existing same-family font while its getGlyph() call was still executing. 2026-07-30 11:21:09 -03:00
Martín Lucas Golini
1dc8195187 - add a searchable Insert Snippet Universal Locator provider
- support runtime locator provider registration and removal
- filter snippets with workspace-relative include/exclude globs
- add the remaining VS Code-compatible snippet variables
- support camelcase, pascalcase, snakecase, and kebabcase modifiers
- reuse the existing insertion flow for locator-selected snippets
- expand snippet parser and store test coverage
- update the implementation plan and C/C++ example snippets

Refs: SpartanJ/ecode#111
2026-07-29 18:49:01 -03:00
Martín Lucas Golini
683b35b249 feat(ecode): add VS Code-compatible user snippets
Add user-defined snippet support to the autocomplete plugin, including
language-specific, global, .vscode, and .ecode project snippets.

Support JSONC parsing, scopes, hot reload, source-aware ranking, exact
prefix replacement, multi-cursor insertion, contextual indentation,
variables, transforms, choices, linked placeholders, and tab navigation.

Recognize .code-snippets files as JSON and preserve existing LSP snippet
completion behavior.

Refs SpartanJ/ecode#111
2026-07-29 01:11:01 -03:00
Martín Lucas Golini
acd19069c3 Add table/tree view CSS properties, UIModelCreator, and optimize string allocations
- Add CSS properties: editable, selection-type, selection-kind, icon-size,
  sort-icon-size, main-column, row-header-width, table-flags (pipe-separated),
  indent-width, expander-icon-size, table-model
- Create UIModelCreator static factory with 4 built-in models:
  widgettree, filesystem, diskdrives, cssproperties
- Eliminate 17 heap-allocating std::string copies in applyProperty()
  handlers across 12 files using String::iequals with const refs
- Replace table-flags token parsing with allocation-free String::splitCb
- Update cssspecification.md with all new property documentation

Fixed fall-through bugs in applyProperty.
Fixed status terminal button "Terminal" not setting the tooltip text correctly.
2026-07-28 00:15:04 -03:00
Martín Lucas Golini
935b28c91a Fix HTML input styling and internal control layout
Treat UIHTMLInput as the stable HTML/CSS host while keeping its native
control as an anonymous implementation detail.

Prevent author CSS from matching internal control widgets, avoiding
duplicated backgrounds and other styles. Keep valid input types such as
email intact for attribute selectors while falling back to compatible
native implementations.

Synchronize the internal control with the host content box after layout,
including flex sizing, and preserve intrinsic measurement for size and
font changes. Preserve input state across dynamic type changes and make
hidden transitions reversible.

Also fix border-radius calculations and add regressions for CSS ownership,
anonymous widget isolation, dynamic type changes, input sizing, and the
Causality newsletter form.
2026-07-27 11:17:23 -03:00
Martín Lucas Golini
90f41a64aa Fix HTML viewport sizing and background shorthand parsing
- parse slash-separated background position and size without requiring whitespace
  - recognize custom-property background images following an explicit size
  - resolve root body and html minimum heights against the layout viewport
  - avoid expanding semantic document boxes to the scrollable content extent
  - handle auto margins and percentage offsets correctly for absolute positioning
  - add DuckDuckGo layout and background shorthand regression tests
  - document the Xvfb limitation with multisampled OpenGL contexts
2026-07-27 00:59:39 -03:00
Martín Lucas Golini
a113c0f6c9 Rename FrameBufferRegistry, ShaderProgramRegistry and VertexBufferRegistry file names.
Rename class and file of PackManager to PackRegistry to follow the new naming convention.
2026-07-26 23:16:24 -03:00
Martín Lucas Golini
46d365f1b3 Update TODO. 2026-07-26 16:38:17 -03:00
Martín Lucas Golini
dedccccd4c Merge branch 'feature/subpixel-antialiasing' into develop 2026-07-26 16:38:04 -03:00
Martín Lucas Golini
33bba67dde Correct paddings in Glyph struct.
Disable Haiku build until beta6 vm.
2026-07-26 13:22:21 -03:00
Martín Lucas Golini
ce3a10a3bd Single pass subpixel rendering in all backends.
Build fixes.
2026-07-26 01:44:31 -03:00
Martín Lucas Golini
fac6c4ab05 Single pass subpixel rendering in OpenGL 2 context.
Fix unit-tests build issue.
2026-07-26 01:02:06 -03:00
Martín Lucas Golini
0bf2b89970 Handle downscaled LCD glyphs with a dedicated resize path before atlas upload. This preserves row stride and RGB coverage, fixing corrupted icon-font glyphs at small sizes.
Add a golden-image regression test covering scaled subpixel glyphs from the Nonicons font.
2026-07-26 00:23:24 -03:00
Martín Lucas Golini
521e2af2e2 Should fix unit-tests. 2026-07-26 00:04:03 -03:00
Martín Lucas Golini
9f4ae9e83c Font SubPixel antialiasing support for eterm and ui_html. 2026-07-25 21:24:45 -03:00
Martín Lucas Golini
5aeb0b1acf The new sparse invariant is:
- Empty vector: every quad is Mask; use the existing single draw call.
  - Non-empty vector: the text contains subpixel glyphs; entries correspond to every quad.

  addGlyphQuad() therefore delays allocation until the first subpixel glyph. At that point it backfills earlier quads as Mask, records the current subpixel glyph, and tracks every subsequent quad.

  addLine() only appends Mask after tracking has started. A line before the first subpixel glyph will be included by the later backfill; a line after it must be appended to preserve the one-entry-per-quad mapping.

  This protects the common grayscale path from subpixel-related overhead while correctly handling mixed mask/subpixel text. It introduces no allocations until subpixel rendering is actually encountered.

  The critical fix versus the earlier broken version is that the first subpixel glyph is appended unconditionally. The old code accidentally skipped it when it was the first quad, causing the first character to be
  classified as Mask.
2026-07-25 20:41:35 -03:00
Martín Lucas Golini
b71ef9522d Clean up. 2026-07-25 20:31:52 -03:00
Martín Lucas Golini
c0debbee9f Rollback to fix rendering. 2026-07-25 20:26:24 -03:00
Martín Lucas Golini
27a57960f4 SubPixel hinting support. 2026-07-25 18:59:20 -03:00
Martín Lucas Golini
ed46508df4 Merge branch 'feature/resource-shared-ownership' into develop 2026-07-25 01:36:21 -03:00
Martín Lucas Golini
b940407102 ecode: The custom fallback font reused the "fallback-font" resource key, replacing the built-in CJK fallback in FontService.
Fix:

  - User fallback now uses "user-fallback-font".
  - Built-in CJK and custom fallback fonts remain registered together.
  - Added and passed a regression test verifying both fallback resources remain in the chain.

Fixes in premake5.lua:

  - Removed obsolete PRECISE_F32=1; Wasm already provides precise float behavior.
  - Moved ENVIRONMENT=worker,web to final application link options.

Fixed MarkdownView not getting the correct CSS style from the base theme.
2026-07-25 01:36:00 -03:00
Martín Lucas Golini
9894231d04 - Fixed emscripten build
- Added .github/workflows/eepp-emscripten-build-check.yml
  - Mirrors Linux CI structure.
  - Uses Premake 5 beta6.
  - Pins Emscripten 4.0.1.
  - Caches EMSDK system libraries.
  - Builds with all available cores.

- Completed Premake 5 Emscripten support:
  - Native wasm32 platform.
  - Correct .html application targets.
  - Asset preloading restored from Premake 4.
  - SDL2 supplied through Emscripten instead of native -lSDL2.
  - Static archives emitted under libs/emscripten/wasm32/.
  - Unsupported shared-library projects excluded.

- Modernized projects/emscripten/make.sh.
2026-07-25 00:47:18 -03:00
Martín Lucas Golini
2601048a17 clarify FontTrueType scope ownership
Document that a FontTrueType can be locally associated with only one
  ResourceScope and that catalog imports should be used to share fonts
  between scopes.

  Note the current single FontService pointer limitation and the possible
  future direction of moving fallback resolution out of shared fonts.
2026-07-24 23:40:19 -03:00
Martín Lucas Golini
8bdee0281f graphics: add strong 64-bit resource name hashes
Introduce ResourceNameHash using wyhash for fast drawable and font
  secondary indexes without changing the global String::HashType.

  Replace the 32-bit resource indexes with direct 64-bit weak-handle
  lookups while keeping complete ResourceKey lookup authoritative.
  Preserve legacy persisted drawable hash support through a documented
  compatibility scan and migrate internal font operations to semantic
  name lookup.

  Add regression coverage proving names that collide under the legacy
  hash remain independently addressable.
2026-07-24 23:33:16 -03:00
Martín Lucas Golini
605c81087d harden web resource cache completion lifecycle
Identify asynchronous loads by cache epoch and operation ID so stale
  completions cannot modify replacement entries or corrupt in-flight
  accounting after clear().

  Move decoding, GPU texture mutation, notifications, callback destruction,
  and final resource releases outside the cache mutex. Revalidate operation
  identity between completion phases to preserve correctness across decode
  delays and notification reentrancy.

  Add regression coverage for stale same-key completions after cache reset.
2026-07-24 23:20:42 -03:00
Martín Lucas Golini
caa461a735 complete scoped ownership migration
- migrate themes, skins, icons, shaders, and shader programs to resource handles
  - make UIThemeManager scene-owned and publish resources through scopes and catalogs
  - retain shaders through their programs and expose non-owning GPU registries
  - replace FrameBuffer and VertexBuffer factory ownership with unique pointers
  - migrate engine, UI, tools, examples, tests, and eterm to the new ownership APIs
  - remove the obsolete raw-owning ResourceManager templates
  - document the completed Stage 7 architecture and remaining validation work
  - add ownership, registry, and scoped shader-program coverage
2026-07-24 22:45:31 -03:00
Martín Lucas Golini
85ceace782 Merge branch 'develop' of github.com:SpartanJ/eepp into develop 2026-07-24 10:48:19 -03:00
Martín Lucas Golini
6351332d9b Closes SpartanJ/ecode#939 2026-07-24 10:48:11 -03:00
Martín Lucas Golini
6b277e508b migrate fonts to scoped resource ownership
- replace FontManager with per-ResourceScope FontService instances
  - publish font factories into explicit or default resource scopes
  - import default resources into UI scene scopes unless explicitly disabled
  - keep related font faces strongly owned without hot-path weak_ptr locking
  - add cached glyph advance queries without creating texture pages
  - fix font picker preview ownership, cleanup, and rapid switching
  - selectively evict TextLayout cache entries when referenced fonts unload
  - document FontService, ResourceCatalog, and cache invalidation semantics
  - migrate examples, tools, benchmarks, and tests to the scoped font API
  - expand coverage for font ownership, texture release, and layout caching
2026-07-24 01:54:51 -03:00