Commit Graph
6322 Commits
Author SHA1 Message Date
David Richardson eda11e38ba Merge main: Tests/Manual revival, functional fixes
Merges 71 commits from main. Headline content: the Tests/Manual
integration test suite revived and reorganized after long disuse
(renames, new applications, updated cibs), restoring a large
integration validation surface. Functional fixes include replacing
unload-based termination with pagehide (back/forward cache
compatibility) and hardening CPTextField's input-element handling.

Conflict resolutions (local versions retained):

- AppKit/CPTextField.j: main's input-element logic carried, with this
  branch's preprocessor-removal sweep re-applied on top. Main's
  conditionals are re-expressed as runtime CPDOMAvailable guards; the
  _inputElement method-definition gate is retained.

- AppKit/Platform/CPPlatform.j: the DOM platform implementation stays
  inlined under the PLATFORM(DOM) gate. The split layout breaks the
  legacy build: the include fragment is compiled standalone by the
  source walk and cannot resolve its superclass. Main's pagehide
  termination fix is ported into the inlined section; the restored
  AppKit/Platform/DOM/CPPlatform.j fragment is deleted.

Verified: legacy build green through Foundation, AppKit and Tools;
Tests/Manual suite passing.
2026-10-01 14:44:51 -06:00
daboe01 66cda41bfc fixed: terminate on pagehide instead of unload instead of unload 2026-09-28 15:46:35 +02:00
daboe01 d72619660f new: replace unload listener with pagehide in CPPlatformPasteboard 2026-09-28 15:12:55 +02:00
daboe01 87fd68504c fixed: NotFoundError race when moving the shared input element 2026-09-28 14:47:04 +02:00
daboe01 55ee6de9cd fixed: copy could crash when first responder did not implement isRichText 2026-09-12 07:30:29 +02:00
David Richardson fa525e1cee AppKit: final PLATFORM body-block sweep (8 files)
- CPVisualEffectView, CPWebView, _CPBorderlessBridgeWindowView,
  CPViewAnimator, CPFontManager, _CPMenuBarWindow, CPRuleEditor,
  CPScrollView: 8 PLATFORM blocks resolved to runtime CPDOMAvailable
  guards (5 wrapped, 2 guard-returns, 1 if/else)
- this completes the method-body sweep: remaining PLATFORM
  directives are a method-definition, class-scope, or import gate,
  reserved for the structural-design phase
- work-in-progress towards complete removal of CPP directives
2026-09-01 08:34:36 -06:00
David Richardson 7d59762561 AppKit: CPLayoutManager, CPStringDrawing, CPMenu, CPCookie PLATFORM conditional removal
- 8 PLATFORM blocks resolved across four files: runtime CPDOMAvailable
  guards (3 wrapped, 2 early returns, 3 if/else preserving existing
  CommonJS branches)
- CPMenu: @global _CPDOMEventStop declared; its definition resides in
  the DOM-only CPPlatformWindow+DOM category
- zero preprocessor directives remain in these files
- work-in-progress towards complete removal of CPP directives
2026-08-31 17:04:24 -06:00
David Richardson c2be4f87c5 AppKit: CPApplication, CPImage, CPColorPicker PLATFORM conditional removal
- 10 PLATFORM blocks resolved across three files: runtime
  CPDOMAvailable guards (6 wrapped, 3 early returns, 1 sequential
  guard-return preserving the CommonJS result)
- CPApplication: @global CPWindowObjectList declared; its definition
  resides in the DOM-only CPPlatformWindow+DOM category
- zero preprocessor directives remain in these files
- work-in-progress towards complete removal of CPP directives
2026-08-29 12:25:14 -06:00
David Richardson 4a5a25bb65 Fix undeclared _clientView instance variable in CPRulerView
Declare _clientView within the CPRulerView instance variable block.

This resolves a cold build compilation failure where the Objective-J parser flags assignments to the undeclared variable as illegal global variable creations.
2026-08-28 20:57:03 -06:00
David Richardson 3a140b07fe Fix child-node index arithmetic and expand CPTreeNode test coverage
CPTreeNode.j:
* Correct index calculations in insertObject:inChildNodesAtIndex: and replaceObjectInChildNodesAtIndex:withObject:. Nodes no longer misplace during same-parent or cross-parent moves.
 * Update _removeChildNode: to call removeObjectFromChildNodesAtIndex:. This ensures detaches notify childNodes observers on the original parent.

CPTreeNodeTest.j:
* Add test coverage for same-parent replacement, cycle rejection on replace-path, KVO during cross-parent moves, mutableChildNodes proxy operations, insertion bounds, non-recursive sorting, isLeaf, and descendantNodeAtIndexPath: edge cases.
* Disable same-parent childNodes KVO test. CPKeyValueObserving.j coalesces nested change notifications on the same key, which drops the inner removal event.
* Disable parentNode KVO test. No setParentNode: method exists to instrument.
* Add inline comments to both disabled tests explaining these mechanisms.
2026-08-28 13:35:27 -06:00
David Richardson 06ebbfb300 AppKit: CPDatePicker PLATFORM conditional removal
- 13 PLATFORM blocks resolved across the six date picker files;
  mechanical translation to runtime CPDOMAvailable guards
- the recurring _invokedByUserEvent YES/NO sandwich around
  _setDateValue translated as paired single-statement guards
- two stale "Workaround: added if PLATFORM(DOM)" comments updated
  to name the runtime guard
- work-in-progress towards complete removal of CPP directives
2026-08-27 23:17:15 -06:00
David Richardson 74039c799a Merge branch 'main' into CPTreeNode-improve-tests 2026-08-27 22:05:19 -06:00
David Richardson ee0c6fdf2d CPTreeNodeTest: fix child-move index arithmetic; correct a flawed test expectation
CPTreeNode: same-parent child moves no longer misplace the moved node — this corrects a defect in the class itself, properly exposed by the test.

Separately, the unit test's expectation for a root node's index path was itself wrong.
Corrected to match the class's existing, contract-correct behavior.

Test unit now runs cleanly.
2026-08-27 16:54:31 -06:00
daboe01 bf76c7d2c7 Merge pull request #3241 from daboe01/setBoundsSize-fix
Fixed: scale accumulation in scaleUnitSquareToSize: when setting bounds size
2026-08-27 22:37:45 +02:00
David Richardson 61e885db5f Merge branch 'main' into refactor-remove-nativehost-target 2026-08-27 13:28:50 -06:00
daboe01 bad82ee587 Merge pull request #3296 from daboe01/pageunloadfix2
fix: replace legacy `unload` event listener cleanup with `pagehide`
2026-08-27 19:40:57 +02:00
daboe01 16beb1a86c fix: replace legacy unload event listener cleanup with pagehide 2026-08-27 19:28:31 +02:00
David Richardson 690b79f113 Revert "Merge pull request #3260 from enquora/modernize-CALayer"
This reverts commit 8134b6dff7, reversing
changes made to 7083f7b268.
2026-08-27 11:20:41 -06:00
David Richardson 4d13785119 Revert "Merge pull request #3257 from enquora/modernize-CABackingStore"
This reverts commit 5bdac195fc, reversing
changes made to 8134b6dff7.
2026-08-27 11:20:30 -06:00
David Richardson 4f29b77d65 Revert "Merge pull request #3261 from enquora/modernize-CPPlatformpasteboard"
This reverts commit 10351c3d4a, reversing
changes made to 5bdac195fc.
2026-08-27 11:20:20 -06:00
David Richardson be08bed01e Revert "Merge pull request #3256 from enquora/modernize-cgcontext-canvas"
This reverts commit e107e2d804, reversing
changes made to 10351c3d4a.
2026-08-27 11:19:56 -06:00
daboe01 e107e2d804 Merge pull request #3256 from enquora/modernize-cgcontext-canvas
Modernize CGContextCanvas.j: Remove CPP macros and legacy fallbacks
2026-08-27 10:06:21 +02:00
daboe01 10351c3d4a Merge pull request #3261 from enquora/modernize-CPPlatformpasteboard
Refactor CPPlatformPasteboard: Remove CPP macros and legacy IE fallbacks
2026-08-27 10:00:33 +02:00
daboe01 301e940236 formatting 2026-08-26 20:56:38 +02:00
daboe01 5bdac195fc Merge pull request #3257 from enquora/modernize-CABackingStore
Refactor CABackingStore: Eliminate preprocessor directives and legacy…
2026-08-26 20:52:08 +02:00
daboe01 8134b6dff7 Merge pull request #3260 from enquora/modernize-CALayer
Modernize CALayer, remove macro defined access in favour of ivar
2026-08-26 20:50:47 +02:00
daboe01 acf410776d Merge pull request #3279 from daboe01/whitespace-cleanup
fixed: usage of tab character instead of 4 spaces
2026-08-26 20:46:52 +02:00
daboe01 f85ac1ea10 new: constrain tab stop marker movement between preceding text and adjacent tab stops 2026-08-26 19:16:12 +02:00
daboe01 874792fa6e new: constrain tab stop marker dragging to preceding text boundary 2026-08-26 19:01:32 +02:00
daboe01 ca13595e37 formatting 2026-08-26 17:58:39 +02:00
daboe01 22a43bcfc5 fixed: resolve tab stop skipping and dragging positioning 2026-08-26 17:56:48 +02:00
daboe01 9ffa4decd4 fixed: indentation paddle dragging and clientView binding 2026-08-26 17:06:34 +02:00
David Richardson 6e80d78297 AppKit: _CPImageAndTextView PLATFORM conditional removal
- ivar block ungated: _DOMImageElement, _DOMTextElement,
  _DOMTextShadowElement now declared under both targets
- 5 method-body PLATFORM blocks resolved: setAlignment and
  setSelectedRange via early return, layoutSubviews wrapped whole
  (420 lines, _flags reset kept ungated), setTextColor wrapped,
  textFrame as a compound condition
- work-in-progress towards complete removal of CPP directives
2026-08-25 22:34:22 -06:00
daboe01 8d1429d063 proxy fix 2026-08-25 21:09:51 +02:00
daboe01 d1b5c08272 fixed: KVO observer was missing 2026-08-25 21:03:07 +02:00
daboe01 0a6f2e569a fixed: fix selection bindings and correct KVO dependencies in CPTreeController 2026-08-25 20:35:09 +02:00
David Richardson cdd3801549 AppKit: CALayer PLATFORM conditional removal
- 4 PLATFORM blocks resolved: DOM element creation in init, display
  context setup, sublayer DOM insertion, and the _CALayerUpdateDOM
  helper translated to runtime CPDOMAvailable guards (3 wrapped, 1
  early return)
- two #define macros (DOM, ADJUST_CONTENTS_ZINDEX) remain; they belong
  to the planned macro pass
- work-in-progress towards complete removal of CPP directives
2026-08-24 15:57:56 -06:00
David Richardson 1f453e70ee AppKit: CPPlatformWindow PLATFORM conditional removal
- ivar block ungated: DOM window/element handles, event state, pasteboard
  and touch-tracking ivars now declared under both targets (nil when no
  DOM is present)
- supportsMultipleInstances and isVisible: PLATFORM/#else pairs
  translated to sequential CPDOMAvailable guard-returns preserving the
  CommonJS result (NO)
- init, setContentRect, moveWindow and setTitle blocks translated to
  runtime guards (wrapped, early return, compound condition)
- work-in-progress towards complete removal of CPP directives
2026-08-24 15:42:09 -06:00
David Richardson 2bd31a77d3 AppKit: CPTokenField PLATFORM conditional removal
- file-scope input-state variables ungated (11 module-locals, previously
  browser-only); method-body translations reference them under runtime
  guards only
- 7 method-body PLATFORM blocks resolved: 3 compound conditions, 2
  wrapped, 1 early return
- the method-definition gate around _inputElement remains, held for the
  structural-design phase with the CPTextField and CPTextView gates
- work-in-progress towards complete removal of CPP directives
2026-08-24 15:35:35 -06:00
David Richardson aeb340a4cb AppKit: _CPPopoverWindow PLATFORM conditional removal
- 11 PLATFORM blocks resolved;
- @import "CPCompatibility.j" added for the CPDOMAvailable predicate
- no preprocessor directives remain in this file
- work-in-progress towards complete removal of CPP directives
2026-08-24 09:21:10 -06:00
David Richardson 1ffdcfc89e AppKit: CPTextView PLATFORM conditional removal
- CPTextView.j: 11 PLATFORM blocks resolved;
- work-in-progress towards complete removal of CPP directives
2026-08-24 08:45:35 -06:00
David Richardson 51f4af0c5c AppKit: CPControl, CPSlider PLATFORM conditional removal
- CPControl.j and CPSlider.j: one PLATFORM block each, resolved to
  runtime CPDOMAvailable guards; no preprocessor directives remain
  in either file
- work-in-progress towards complete removal of CPP directives
2026-08-21 15:55:25 -06:00
David Richardson 159a82e077 AppKit: CPScreen, CPColor PLATFORM conditional removal
- CPScreen.j and CPColor.j: one PLATFORM block each, resolved to
  runtime CPDOMAvailable guards; no preprocessor directives remain
  in either file
- work-in-progress towards complete removal of CPP directives
2026-08-21 15:52:17 -06:00
David Richardson 01476c53ac AppKit: CPImageView PLATFORM conditional removal
- CPImageView.j: all 12 PLATFORM blocks resolved; mechanical
  translation to runtime CPDOMAvailable guards (wrapped, compound,
  early-return); no preprocessor directives remain in this file
- work-in-progress towards complete removal of CPP directives
2026-08-21 15:39:37 -06:00
David Richardson bc0bc7c68a AppKit: CPTextField PLATFORM conditional removal
- CPTextField.j: 14 PLATFORM blocks resolved; mechanical translation
  to runtime CPDOMAvailable guards (wrapped, compound, early-return,
  one runtime if/else); one site used a nonstandard directive
  spelling (#if PLATFORM (DOM), space before the parenthesis),
  normalized and resolved with the rest
- The method-definition gate around _inputElement remains, out of
  scope for this change
- work-in-progress towards complete removal of CPP directives
2026-08-21 15:34:50 -06:00
David Richardson 880f6a3220 AppKit: CPWindow PLATFORM conditional removal
- CPWindow.j: 16 of 17 PLATFORM blocks resolved; purely mechanical
  translation to runtime CPDOMAvailable guards (wrapped or compound),
  one ivar un-gated; one latent no-return bug preserved as-is
- The PLATFORM(BROWSER) import gate remains, out of scope for this change
- work-in-progress towards complete removal of CPP directives
2026-08-21 15:24:54 -06:00
David Richardson 45fd97d980 AppKit: complete CPView PLATFORM conditional removal (part 2)
- CPView.j: remaining 17 PLATFORM blocks resolved; purely mechanical
  translation to runtime CPDOMAvailable guards, except the choice of
  guard form (wrapped, compound, or early-return) per site
- No PLATFORM(DOM) conditionals remain in CPView.j; one #if DEBUG
  block remains and is out of scope for this change
- work-in-progress towards complete removal of CPP directives
2026-08-21 15:18:12 -06:00
David Richardson 557e4d7bd2 AppKit: replace PLATFORM(DOM) conditionals with runtime checks (CPView, part 1)
- Add CPDOMAvailable to CPCompatibility.j: canonical documented DOM capability test, bare global assignment
- CPView.j: 13 of 30 PLATFORM blocks resolved. Method bodies now
  guarded at runtime (wrapped, compound, or early-return forms); DOM vars and ivars declared without resort to CPP conditionals
- work-in-progress towards complete removal of CPP directives
2026-08-21 15:05:07 -06:00
David Richardson 4edcf0fecc Merge branch 'main' into refactor-remove-nativehost-target
# Conflicts:
#	AppKit/CPTextView/_CPTableTextAttachment.j
2026-08-21 09:52:57 -06:00
David Richardson ae409d05c1 Convert tabs to spaces 2026-08-21 09:21:51 -06:00