Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
d5a5585
Add project structure documentation
SpinyOwl May 11, 2026
f61a8ab
Clarify project structure documentation references
SpinyOwl May 11, 2026
3719510
Implement browser-like inline text layout
SpinyOwl May 12, 2026
369485d
Unify font text metrics
SpinyOwl May 12, 2026
8d33834
Support decimal pixel values in CSS parser
SpinyOwl May 12, 2026
6bee13f
Replace gradle groovy DSL with kotlin DSL
SpinyOwl May 16, 2026
19f613c
Replace `@Data` with specific Lombok annotations for better clarity
SpinyOwl May 16, 2026
ad4e9b4
Add additional Maven snapshot repository in build conventions
SpinyOwl May 17, 2026
3efa9a1
Align dependency definitions and formatting in `libs.versions.toml` f…
SpinyOwl May 17, 2026
b7d4ca0
Set JVM arguments for `demo.simple` and `demo.complex` modules, updat…
SpinyOwl May 17, 2026
0b60083
Implement inline box fragments and improve inline layout handling
SpinyOwl May 17, 2026
e8c9ac3
Regenerate CSS parser sources
SpinyOwl May 19, 2026
ff819a5
Document supported CSS properties
SpinyOwl May 19, 2026
6edc86d
Implement word break wrapping support
SpinyOwl May 26, 2026
12db4d9
Add GUI test HTML app
SpinyOwl May 26, 2026
f8a9693
Rename Gradle modules to spinygui coordinates
SpinyOwl May 26, 2026
6ff15bb
Fix FlexLayout pixel length handling
SpinyOwl May 27, 2026
619c7ad
Improve NodeBuilder attribute helpers
SpinyOwl May 28, 2026
765abe6
Reduce inline style ruleset parsing allocations
SpinyOwl May 28, 2026
62ba4b3
Avoid retaining styled elements in style manager
SpinyOwl May 28, 2026
b575ec5
Add overflow style contract
SpinyOwl May 30, 2026
f5347d1
Centralize overflow scroll semantics
SpinyOwl May 30, 2026
5ffd1d9
Verify overflow layout metrics
SpinyOwl May 30, 2026
221be17
Implement scroll event chaining
SpinyOwl May 30, 2026
1a1f981
Add overflow-aware hit testing
SpinyOwl May 30, 2026
06e5f46
Apply overflow clipping in NanoVG renderer
SpinyOwl May 30, 2026
4e11be9
Keep inline rendering aligned with scroll offsets
SpinyOwl May 30, 2026
823e25b
Add overflow demo and finalize support docs
SpinyOwl May 30, 2026
4feb79c
Update NvgExample overflow defaults
SpinyOwl May 30, 2026
cc00ca3
Add inline whitespace regression coverage
SpinyOwl May 31, 2026
ab448e9
Align FontService metrics with NanoVG
SpinyOwl May 31, 2026
a73d9cc
Add NanoVG inline debug overlay
SpinyOwl May 31, 2026
c0e03ef
Split text measurement from font service
SpinyOwl May 31, 2026
6e6bcf7
Move debug caret measurement into TextMeasurer
SpinyOwl May 31, 2026
729dfce
Hit test visible overflow descendants
SpinyOwl May 31, 2026
ab86b0d
docs: add text input support plan
SpinyOwl May 31, 2026
09f402b
feat(core): add text input node and layout
SpinyOwl May 31, 2026
f9d21b4
feat(core): edit focused text inputs
SpinyOwl May 31, 2026
2de5c3e
feat(nanovg): render text input values and caret
SpinyOwl May 31, 2026
b21096f
feat(demo): add text input example
SpinyOwl May 31, 2026
a7d0039
feat(core): support text input selection
SpinyOwl May 31, 2026
52c19b4
fix(core): keep text input caret unclipped
SpinyOwl May 31, 2026
239d592
Add textarea element support
SpinyOwl Jun 1, 2026
16f5552
Add styled scrollbar support
SpinyOwl Jun 1, 2026
9251fea
Fix scrollbar placement with padding
SpinyOwl Jun 1, 2026
7095b17
Improve scrollbar rendering performance
SpinyOwl Jun 1, 2026
a6d5e93
Expand overflow demo baseline
SpinyOwl Jun 1, 2026
09717ee
Optimize scrollbar paint calls
SpinyOwl Jun 1, 2026
d5e727a
Merge feature/scrollbar into agent-dev
SpinyOwl Jun 1, 2026
baf82ac
Add button element support
SpinyOwl Jun 2, 2026
f1ef015
Plan input button support step 1
SpinyOwl Jun 2, 2026
e5d318a
Add input button layout rendering and activation
SpinyOwl Jun 2, 2026
d3d685c
Add text input control hotkeys
SpinyOwl Jun 12, 2026
b8f06f5
Add mouse text selection support
SpinyOwl Jun 12, 2026
54a8d6c
Add inline-block layout support
SpinyOwl Jun 13, 2026
4d41cfe
Add wrapping and inline-block demo cases
SpinyOwl Jun 13, 2026
a741a14
Center flex main menu and fix auto main-axis sizing
SpinyOwl Jun 17, 2026
c420f16
Handle percentage lengths in style parsing
SpinyOwl Jun 17, 2026
ccaf74c
Preserve auto cross-axis text sizing in flex layout
SpinyOwl Jun 17, 2026
2b554df
Handle display none nodes in layout
SpinyOwl Jun 17, 2026
055016f
Add grid parsing and demo layout
SpinyOwl Jun 22, 2026
6215625
Fix grid fallback auto-height layout
SpinyOwl Jun 22, 2026
4c18c78
Handle inherited and absent style properties during recalculation
SpinyOwl Jul 9, 2026
0cdc049
Handle percentage lengths in flex layout calculations and add corresp…
SpinyOwl Jul 10, 2026
46edba3
Add core CSS transform support
SpinyOwl Jul 11, 2026
17a6a54
Render transformed NanoVG subtrees
SpinyOwl Jul 11, 2026
7f3d9ad
Add CSS transform demo
SpinyOwl Jul 11, 2026
6005d01
Document CSS animation implementation plan
SpinyOwl Jul 11, 2026
3372974
Add CSS transition runtime
SpinyOwl Jul 13, 2026
649ea63
Plan CSS Grid support epic
SpinyOwl Jul 14, 2026
be31897
Add typed CSS Grid style contract
SpinyOwl Jul 14, 2026
ea91dff
Add CSS Grid layout formatter
SpinyOwl Jul 14, 2026
b39ba2c
Fix presentation regressions from verification
SpinyOwl Jul 14, 2026
331e66b
Document and demo CSS Grid support
SpinyOwl Jul 14, 2026
efb6b6e
Fix grid item origin in positioned containers
SpinyOwl Jul 14, 2026
6603c9a
Load grid demo resources in HTML test app
SpinyOwl Jul 14, 2026
c5bc18f
Refine complex demo window hints and grid layout markup
SpinyOwl Jul 14, 2026
e7509d1
Add Unicode font fallback
SpinyOwl Jul 22, 2026
dcbd3bd
Fix nested scroll text rendering
SpinyOwl Jul 22, 2026
137820f
Merge branch 'fix/nested-scroll-text-rendering' into agent-dev
SpinyOwl Jul 22, 2026
72195db
Merge remote-tracking branch 'origin/agent-dev' into agent-dev
SpinyOwl Jul 22, 2026
1ae450c
Resolve ordered font family chains
SpinyOwl Jul 23, 2026
ec0a2f4
Fix nested grid item relayout
SpinyOwl Jul 23, 2026
9596945
Fix block scrollbar gutter layout
SpinyOwl Jul 23, 2026
d6deb16
Fix overflow clipping padding box
SpinyOwl Jul 23, 2026
4ec38ed
Fix nested scrollbar coordinates
SpinyOwl Jul 23, 2026
c979283
Plan text performance improvements
SpinyOwl Jul 24, 2026
6edab9d
Add text performance benchmarks
SpinyOwl Jul 24, 2026
b6bf50e
Add benchmark history trend charts
SpinyOwl Jul 24, 2026
e6ab334
Document trend selector toolbar design
SpinyOwl Jul 24, 2026
82dbf60
Document Chart.js benchmark chart design
SpinyOwl Jul 24, 2026
831981f
Clarify embedded Chart.js constraints
SpinyOwl Jul 24, 2026
d8d1594
Add wrapping trend selector toolbar
SpinyOwl Jul 24, 2026
cbe79f7
Plan Chart.js benchmark charts
SpinyOwl Jul 24, 2026
d58908b
Add typed benchmark chart payloads
SpinyOwl Jul 24, 2026
f8eb768
Preserve missing optional chart metrics
SpinyOwl Jul 24, 2026
0e85fdb
Use Chart.js for benchmark report charts
SpinyOwl Jul 24, 2026
eb556d6
Establish E5 benchmark evidence baseline
SpinyOwl Aug 12, 2026
5c8a589
Refactor SpinyGUI and remove obsolete code
SpinyOwl Aug 12, 2026
2973704
Generate benchmark archive manifests
SpinyOwl Aug 12, 2026
23c7c92
Plan no-impact input frame skipping
SpinyOwl Aug 12, 2026
43360a0
Implement E6 M1 frame baseline evidence
SpinyOwl Aug 12, 2026
2122a86
Implement E6/M1.5 input impact classification
SpinyOwl Aug 12, 2026
949d368
Actualize epic and milestone statuses
SpinyOwl Aug 13, 2026
4e08c95
docs: refine incremental layout plan
SpinyOwl Aug 14, 2026
3a1e1a6
Complete benchmark reporting epics
SpinyOwl Aug 14, 2026
90dc5d5
docs: reconcile E5 M2 measurement contract
SpinyOwl Aug 14, 2026
05baa82
Implement linear range-based text measurement
SpinyOwl Aug 15, 2026
78af926
Close E5 measurement contract milestone
SpinyOwl Aug 15, 2026
adf15b1
Lay out inline-block flex items
SpinyOwl Aug 18, 2026
c53e63b
Fix inline-block flex regression fixture types
SpinyOwl Aug 18, 2026
e157fe1
Preserve intrinsic height for nested flex containers
SpinyOwl Aug 18, 2026
779a98d
Use intrinsic auto-sizing flex layout
SpinyOwl Aug 18, 2026
86f8619
Test nested flex intrinsic auto height
SpinyOwl Aug 18, 2026
6f9f210
Keep intrinsic flex layout provider
SpinyOwl Aug 18, 2026
426bffd
Establish semantic font ownership and core lifecycle
SpinyOwl Aug 16, 2026
e1f41e3
Add NanoVG font and renderer lifecycle guards
SpinyOwl Aug 16, 2026
6c200f1
Bind NanoVG font resources to renderer contexts
SpinyOwl Aug 16, 2026
8160af8
Enforce NanoVG delete-before-release teardown
SpinyOwl Aug 16, 2026
429705d
Document flex inline-block dispatch
SpinyOwl Aug 18, 2026
9654f8a
No-op provider verification
SpinyOwl Aug 18, 2026
cc8d4b2
Shrink auto-width flex items to intrinsic content
SpinyOwl Aug 18, 2026
19551dd
Test intrinsic width for auto flex items
SpinyOwl Aug 18, 2026
fbd2853
Add `@ToString` annotation to InlineFragment class, excluding `node`
SpinyOwl Aug 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary

/spinygui.benchmark/src/main/resources/com/spinyowl/spinygui/benchmark/report/*.js text eol=lf
/spinygui.benchmark/src/main/resources/com/spinyowl/spinygui/benchmark/report/*.txt text eol=lf

9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ hs_err_pid*
.project
/.settings/
/lwjgl-extract/

# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build

# Ignore Kotlin plugin data
.kotlin
1 change: 1 addition & 0 deletions .worktrees/nested-scroll-text-rendering
Submodule nested-scroll-text-rendering added at dcbd3b
80 changes: 80 additions & 0 deletions AGENTS_CODE_STYLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Agent Code Style And Principles

This project is a modular Java GUI library with a browser-engine-like architecture. Treat the codebase as a DOM/CSS/layout/event/rendering pipeline, not as a widget toolkit with isolated controls.

## Architectural Principles

- Keep the core backend-agnostic. Core nodes, styles, layout, input, events, fonts, and parsers should not depend on NanoVG/OpenGL rendering details.
- Preserve the pipeline shape: parse/build nodes, parse CSS, resolve style, run layout, translate system events, dispatch GUI events, render an already styled and laid-out `Frame`.
- Prefer interface boundaries for services and put defaults in `impl` packages. Existing examples include parser, layout, style manager, event processor, font service, mouse service, and shortcut registry.
- Model GUI state explicitly on nodes and services. Hover, focus, pressed state, scroll offsets, layout boxes, mouse positions, and resolved styles are mutable runtime state.
- Keep CSS concepts typed where possible. Use `Property`, `Term`, `Selector`, `Length`, `Color`, and style type classes rather than passing raw strings past parser/property boundaries.
- Treat generated ANTLR files under `core/src/main/java/.../parser/impl/css/antlr` as generated. Change `CSS3.g4` and regenerate outputs instead of manually editing generated parser classes.

## Java Style

- Java modules are deliberate. Update `module-info.java` when adding exported APIs or new module dependencies.
- The build uses Java 25 source/target compatibility.
- Formatting follows the checked-in IntelliJ Google Java style. Keep two-space indentation and readable wrapped method chains.
- Lombok is part of the project style. Existing code uses `@Getter`, `@Setter`, `@RequiredArgsConstructor`, `@NonNull`, `@ToString`, `@NoArgsConstructor`, and `@Slf4j`.
- Lombok accessors are fluent and not chained. Prefer `element.box()` over `getBox()` and avoid introducing chained setter assumptions.
- Keep constructors small and use required-constructor dependency injection where the surrounding package already does so.
- Use static utility classes for cross-cutting calculations only when they match existing patterns such as `LayoutUtils`, `StyleUtils`, `NodeUtilities`, `TextUtil`, and NanoVG utility classes.
- Do not add broad frameworks for dependency injection, rendering, parsing, or event dispatch. Existing composition is manual and explicit.

## Package Conventions

- `core.node` owns the DOM-like tree model. Add tree behavior here only when it belongs to all nodes/elements, not to rendering or parsing.
- `core.style.stylesheet` owns the CSS object model. Add new CSS properties through property providers and the property store, not by special-casing `ResolvedStyle` first.
- `core.style.types` owns strongly typed CSS values. Add new value types here when a property needs a reusable domain object.
- `core.parser.impl.css.visitor` is the semantic CSS conversion layer. The grammar recognizes more CSS than visitors support; update visitors and property providers together.
- `core.layout.impl` owns layout algorithms and box updates. Keep rendering out of layout; layout should populate geometry and layout-parent relationships.
- `core.system.event.*` handles raw platform events. Convert them into GUI events before application listeners see them.
- `core.event.*` handles GUI-level events and listener dispatch.
- `core.backend.*` should consume `Frame`, `Element`, `Text`, style, and box data; it should not mutate core model state except through clearly intentional renderer lifecycle effects.

## CSS And Style Rules

- Respect rule ordering: default rules, frame stylesheets ordered by specificity, then inline style declarations.
- Preserve specificity semantics when adding selectors. Selector classes should implement matching and specificity consistently.
- Be explicit about unsupported CSS. Current visitors often return `null` or throw `NotImplementedException` for partial features; do not silently pretend full browser CSS support exists.
- The ANTLR grammar supports more constructs than the semantic model. When enabling a grammar feature, add model classes, visitors, property conversion, defaults, tests, and serialization behavior as needed.
- `ResolvedStyle` is a typed facade over a generic map. Add typed accessors for supported properties that are used outside property conversion.

## Event And Input Rules

- Keep the two-stage event pipeline intact: system event queue first, GUI event queue second.
- Event dispatch is exact-class based in current processors. Do not assume superclass listeners receive subclass events unless you change and test that behavior.
- System listeners should update state and emit GUI events in the same place, following existing cursor, mouse, key, char, scroll, and window listener patterns.
- Mouse hit-testing should respect `NodeUtilities` and each node's `Intersection` strategy.
- Keyboard behavior should pass through `KeyboardLayout` and `ShortcutRegistry`; avoid hard-coding native key codes in GUI-level code.

## Layout Rules

- Layout writes to `Box`, offset parent, layout child nodes, scroll sizes, client sizes, and text cursor positions.
- Keep block, flex, text, and none layout behavior separate. Add shared calculations to `LayoutUtils` only when multiple algorithms need them.
- Flex layout delegates to Yoga. Extend the mapping between SpinyGUI style values and Yoga properties rather than reimplementing flexbox manually.
- Use `Length` and style accessors for dimensions, border, padding, margin, and positioning. Avoid raw numeric shortcuts unless the existing method is already in pixel space.

## Rendering Rules

- `Renderer` is intentionally minimal: `initialize`, `render`, `destroy`.
- NanoVG code must manage native resources carefully. Follow try-with-resources patterns for `NVGColor`, `NVGPaint`, and other stack/calloc resources where applicable.
- Rendering should traverse the layout tree, not the raw child tree, because positioned and normal-flow children may differ.
- Current NanoVG text rendering is placeholder/debug-like. Do not document it or build on it as complete glyph rendering without implementing and testing actual text drawing.
- Current border rendering is not full side-specific CSS border support. Be explicit when extending it.

## Testing And Verification

- For parser changes, test both successful parse/model conversion and unsupported/invalid syntax behavior.
- For style changes, test property parsing, defaults, inheritance if applicable, shorthand expansion, and resolved style output.
- For layout changes, test box geometry, scroll/client size updates, positioned nodes, and text wrapping/metrics.
- For event changes, test queue behavior and listener side effects. Existing tests under `core/src/test/java/.../system/event/listener` are the closest pattern.
- For backend changes, run a demo when possible and verify lifecycle/resource cleanup paths.

## Known Caution Areas

- Some CSS features are grammar-recognized but semantically unsupported or partially supported.
- Generated ANTLR outputs are currently modified in the working tree; do not overwrite them accidentally.
- `GeneralSiblingSelector`, clickable-only recursive hit testing, text metrics edge handling, and exact-class event dispatch have potential edge cases noted in current code analysis.
- Demo classes contain exploratory assertions and embedded HTML/CSS examples. Do not treat them as complete production tests.
Loading
Loading