Commit Graph
11339 Commits
Author SHA1 Message Date
David Richardson 483fff9305 Merge branch 'main' into refactor-remove-nativehost-target 2026-10-20 17:35:13 -06:00
David Richardson 230261485a Merge pull request #3327 from cappuccino/fix-unresolved-identifiers
Fix unresolved identifiers
2026-10-20 17:24:02 -06:00
David Richardson a49a5021df AppKit: Fix references to undefined identifiers
Several functions and methods referenced identifiers that were never declared or defined.

* CGColor: Compare color spaces by identity in CGColorEqualToColor, replacing a call to the undefined CGColorSpaceEqualToColorSpace whose test was inverted.
* CGContextCanvas: Declare abs_cos and abs_sin in scale_rotate and rotate_scale.
* CGContextText: Call CGPointMakeZero in CGContextGetTextPosition instead of the removed _CGPointMakeZero.
* CPColor: Compare pattern orientation with CPColorPatternIsVertical instead of BlendKit's PatternIsVertical.
* CPMenu: Declare _CPMenuBarImage with the file's other menu bar variables.
* CPScrollView: Test horizontalScrollerClass and verticalScrollerClass in +frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle: instead of the undefined hFlag and vFlag.
2026-10-20 17:15:04 -06:00
David Richardson 53692b1b71 Foundation: Declare variables used before declaration and remove dead IE code
References to undeclared variables created implicit globals, and an Internet Explorer code path referenced the now unsupported ActiveXObject.

* CPDecimal: Declare adderror in CPDecimalAdd and error1 in _SimpleDivide and _SimpleMultiply.
* CPFunctionOperation: Declare functionOp in +functionOperationWithFunction:.
* CPRunLoop: Declare CPMainRunLoop at file level instead of creating it as an implicit global in +initialize.
* CPWebDAVManager: Remove the ActiveXObject path from XMLDocumentFromString.
2026-10-20 17:13:38 -06:00
David Richardson 850c348cca Tests: Add SmartFoldersDemo index-debug.html and provision test frameworks
- Add missing index-debug.html entry point to SmartFoldersDemo.
- Update Tests/Manual/Jakefile configure and clobber tasks to link Release and Debug framework variants (Objective-J, Foundation, AppKit, BlendKit) across all manual tests.
- Safeguard symlink replacement logic to correctly handle existing links while protecting physical asset directories.
2026-10-20 16:19:39 -06:00
David Richardson cc5807e568 SmartFoldersDemo: Add target classification keys for capp-build
Defines explicit target type identifiers in Info.plist required by the static compiler.
These keys have no effect on the legacy Node build pipeline.
2026-10-20 15:29:24 -06:00
David Richardson 1585123040 Merge pull request #3325 from daboe01/smartfoldersdemo
Improve SmartFoldersDemo manual application to cover much extended range of AppKit API.
Builds are green with both Node and new capp-build compilers.
2026-10-20 14:39:10 -06:00
daboe01 f10eb2e0a5 fixed: CPAlertFirstButtonReturn.. 2026-10-20 18:20:15 +02:00
daboe01 7b2528f7c2 removed: accidentally added zip file 2026-10-19 22:22:33 +02:00
daboe01 1ae6767971 aristo2 fix 2026-10-18 18:12:55 +02:00
daboe01 34b3367468 textcolorfix 2026-10-18 14:54:44 +02:00
daboe01 98ba46872d new: SmartFoldersDemo 2026-10-18 14:32:32 +02:00
David Richardson f1a8b154fc AppKit: Fix CPDOMAvailable read before assignment
CPDOMAvailable was read during load before it was assigned.

* CPCompatibility: Move the CPDOMAvailable assignment ahead of the engine detection, whose AppleWebKit case calls +[CPPlatform isBrowser], which reads it.
* CPCompatibilityTest: Add a test that re-executes CPCompatibility.j with an AppleWebKit user agent and CPDOMAvailable unset, failing on any exception.
2026-10-15 09:26:12 -06:00
David Richardson 572c872c31 Merge branch 'main' into refactor-remove-nativehost-target 2026-10-13 10:06:18 -06:00
David Richardson 8cff67cfed Merge pull request #3323 from cappuccino/note-cpkeybindings-platform-TODO
AppKit: Annotate macOS-only standard key bindings as TODO
2026-10-13 10:04:51 -06:00
David Richardson 2aee03c7fb AppKit: Annotate macOS-only standard key bindings
Record that the standard key binding table is not platform-aware.

* CPKeyBinding: Add TODO noting that CPStandardKeyBindings applies macOS bindings on every platform.

The modifier-key conflicts on Windows and Linux are now documented at the source.
2026-10-13 10:01:47 -06:00
David Richardson 15268c45c4 AppKit: Remove remaining #if DEBUG conditionals
Eliminate conditional compilation for debug builds across AppKit.

* CPAnimationContext: Remove debug logging traces.
* _CPCibCustomObject, _CPCibCustomView, _CPCibWindowTemplate: Convert unknown-class log messages to unconditional warnings.
* CPView: Convert duplicate-subview assertion to an unconditional check.
* _CPObject+Theme: Convert array-as-state assertions to unconditional checks and remove obsolete performance TODOs.

AppKit is now free of C-style preprocessor directives.
2026-10-09 16:47:46 -06:00
David Richardson bf19b09ad0 AppKit: add missed CPDOMDisplayServer.j promotion, drop its header
- the promotion commit captured the consumer imports and the test
  update but missed the new source file itself and the deletion of
  the force-included header it replaces
- without the .j, the display-server functions are absent from the
  compiled frameworks; with the .h still present, the legacy build
  force-includes the old macro definitions alongside the new
  functions
- follow-up to the display-server promotion commit
2026-10-06 19:40:40 -06:00
David Richardson 7f38fbe7c7 Tests: promote CPDOMDisplayServer.h to a real source file
- the 11 display-server primitives become plain functions in
  Platform/DOM/CPDOMDisplayServer.j; bodies verbatim from the macro
  definitions; the header was force-included into every AppKit
  compilation by the legacy build and invisible to capp-build
- CPView.j, CPImageView.j, _CPDisplayServer.j import the new file;
  this was the last header in either framework
- CPDOMDisplayServerTest: the raw #include replaced by the
  framework-qualified import
2026-10-06 18:50:09 -06:00
David Richardson 7f89b13387 Tests: convert CPLevelIndicatorTest helper macro to direct messages
- the six GET_LEVEL_INDICATOR_SEGMENT call sites become direct
  layoutEphemeralSubviewNamed: messages; the macro was fully
  parameterized with no ambient state
- the segment index is the literal 0 at every site, so the
  concatenation folds to a constant string
- the warning comment about direct ephemeral-subview access is
  retained
2026-10-06 18:33:52 -06:00
David Richardson f69bd6c4ad Tests: convert CPAnimationContextTest UIAssert macro to direct calls
- the seven UIAssert call sites become direct
  [self markTest:_cmd didPass:...] messages, matching the direct
  calls already used elsewhere in the file
- the macro expanded to the same expression using the enclosing
  method's _cmd, which the completion closures capture identically;
  behavior unchanged
2026-10-06 18:31:02 -06:00
David Richardson 9891579ac4 Foundation: remove commented-out _IS_NUMERIC macro fossil
- the commented directive predated the isNumeric modernization that
  replaced it with the CPIsNumeric() function
- cosmetic: with it gone, AppKit and Foundation sources contain no
  preprocessor directive text of any kind, active or commented
2026-10-06 18:26:49 -06:00
David Richardson 901241d74e AppKit: inline CGContextCanvas backend, last include fragment removed
- CoreGraphics/CGContextCanvas.j (635 lines) inlined into CGContext.j
  at the former #include site inside the CPHTMLCanvasFeature branch
- the 11 one-line canvas delegation macros become plain functions;
  their macro form was a 2008-era call-overhead optimization that
  modern JITs make unnecessary
- the compatibility tables, hasPath path-semantics helper, backend
  implementations and CGBitmapGraphicsContextCreate pass through
  verbatim
- capp-build's compiled AppKit gains the canvas backend for the first
  time: the deferred include previously omitted it entirely
- zero #define, #include or #pragma directives remain in AppKit or
  Foundation sources
2026-10-06 18:17:33 -06:00
David Richardson 2167c1d3b8 AppKit: delete IE-era VML rendering backend
- CoreGraphics/CGContextVML.j removed; it implemented the CGContext
  function family against Internet Explorer's VML, irrelevant in the
  supported browser landscape for over a decade
- its self-replacing CGBitmapGraphicsContextCreate wrapper called
  document.namespaces.add, an IE-only API — a latent crash on modern
  browsers had the branch ever been selected
- CGContext.j: the CPVMLFeature branch of the load-time backend
  selection removed; CPCompatibility.j: the CPVMLFeature constant and
  its feature-table entry removed
- Tests/AppKit/CGContextTest.j: the vacuous VML-incompatibility
  assertion removed
- the canvas backend and the no-canvas stubs are unchanged
2026-10-06 18:08:43 -06:00
David Richardson 1f087223a9 AppKit: remove vestigial pragma directive from CPTabView
- the spaced "# pragma mark -" form escaped the earlier MARK
  conversion pass and the directive censuses; it is dead text
- this was the last pragma directive in either framework
2026-10-06 17:55:58 -06:00
David Richardson 3fa722fa18 AppKit: convert CPFont caching macros to file-scope functions
- the seven chained macros (_CPRealFontSize, _CPFontNormalizedNames,
  _CPCachedFont, _CPUserFont, _CPSystemFontCacheKey,
  _CPCachedSystemFont, _CPSystemFont) become plain functions with
  verbatim bodies
- all 25 call sites unchanged; all arguments at call sites are pure
  expressions, so evaluation semantics are identical
- file-internal only: no other source file references these names
2026-10-06 17:50:55 -06:00
David Richardson 2322eb87e3 AppKit: remove CGColorSpace macros
- _CGColorSpaceCreateWithModel becomes a function returning the
  model record
- STANDARDIZE, whose body contains a return from the enclosing
  function, is inlined verbatim at its two call sites (alpha
  standardization and the RGB/CMYK component loop)
2026-10-06 17:43:27 -06:00
David Richardson adec5f6c04 AppKit: convert instance-state macros to private methods
- CPScrollView _shouldShowCornerView, CPSplitView
  _maybePostWillResizeNotification/_maybePostDidResizeNotification/
  _didSuppressResizeNotifications/_setResizeNotificationsSuppressed:,
  CPTableView _numberOfColumns/_updateColumnRangesIfNecessary/
  _fullRowHeight/_rowBottomOfHeightInfo:/_hasVariableRowHeights,
  CPMenuItem _decodeValueForKey:defaultValue:coder:/
  _encodeValue:forKey:ifNotEqualTo:coder:, CALayer
  _adjustContentsZIndexForLayer: and DOM: macros that referenced
  ivars, self or the enclosing method's coder become private instance
  methods; call sites rewritten from macro form to message form
2026-10-06 17:42:56 -06:00
David Richardson 315ed7f2df AppKit: convert parameter-only macros to file-scope functions
- CABackingStore PIXEL, CPDragServer DRAGGING_WINDOW,
  CPOutlineView SELECTION_SHOULD_CHANGE and SHOULD_SELECT_ITEM
  become plain functions; call syntax is unchanged at all sites
- these macros reference only their parameters, so no ambient state
  is involved
2026-10-06 17:41:26 -06:00
David Richardson 37d4d5eb96 nib2cib: declare temporaryXibFilePath
- the variable was omitted from the method's var declaration list
  when xib deployment-target handling was added (2024); its
  assignment created an implicit global, flagged by the compiler as
  "creating global variable inside function or method"
- no functional change; the variable is used only within the method
2026-10-06 17:39:28 -06:00
David Richardson 20867949ed Build: remove vestigial PLATFORM macro infrastructure
- AppKit/Platform/Platform.h deleted; it defined only the
  PLATFORM(FEATURE) macro, which no source file uses since the
  AppKit preprocessor-removal work completed
- Foundation/Jakefile: the historical --include of that header into
  every Foundation compilation is removed
- Jake/environment.js and the Objective-J subproject's copy: the
  -DPLATFORM_COMMONJS/-DPLATFORM_BROWSER/-DPLATFORM_DOM flags are
  removed; they defined symbols read only by the deleted macro
- no functional change; capp-build is unaffected (it consumes neither
  the header nor the flags)
2026-10-06 12:07:07 -06:00
David Richardson 6199b8f31b AppKit: pasteboard classes ungated (Increment D, closes structural tail)
- CPPasteboard.j and Platform/DOM/CPPlatformPasteboard.j: the
  PLATFORM(DOM) gates removed; _CPDOMDataTransferPasteboard and
  CPPlatformPasteboard now exist under both targets
- the SUPPRESS_CAPPUCCINO_CUT/PASTE one-statement macros inlined at
  their four call sites; the defines are deleted
- no #if PLATFORM gate remains anywhere in AppKit; the browser/
  CommonJS distinction is now expressed entirely through runtime
  CPDOMAvailable guards
- work-in-progress towards complete removal of CPP directives
2026-10-06 11:50:40 -06:00
David Richardson de0647b299 AppKit: platform classes unified under runtime guards (Increment C)
- CPPlatform.j and CPPlatformString.j: the PLATFORM(DOM) gates and
  CommonJS #else subclasses removed; one implementation serves both
  targets
- CPPlatform: isBrowser and supportsDragAndDrop return NO when no DOM
  is present, preserving the CommonJS results exactly; the NativeHost
  distinction (window.cpIsDesktop) is unchanged
- CPPlatformString: createDOMElements, charPositionOfString,
  sizeOfString and metricsOfFont return the former CommonJS-branch
  values (no-op / zero / zero size / zero metrics) when no DOM is
  present
- work-in-progress towards complete removal of CPP directives
2026-10-04 17:30:56 -06:00
David Richardson 59f07814b1 Merge branch 'main' into refactor-remove-nativehost-target 2026-10-03 13:29:09 -06:00
David Richardson 84729ce7d4 Merge pull request #3322 from enquora/improve-jakefiles
Improve jakefiles
2026-10-03 13:20:56 -06:00
David Richardson eb2f2b2fc2 Fix recursive clean|clobber failures and orphaned build artifacts in Tests/Manual
- Update clean and clobber targets in Tests/Manual/Jakefile to enforce -mindepth 2 -maxdepth 2 traversal. This accurately purges subsidiary Build directories and Frameworks symlinks without triggering subjake dependency cycles.

- Inject explicit clean and clobber overrides into all 150+ subsidiary application Jakefiles. This forces local execution to wipe the top-level Build directory, bypassing applicationtask's default behavior of only targeting configuration-specific intermediate paths.

- Harmonizes artifact sweeping across both root-level orchestration and local leaf-level execution.
2026-10-03 13:18:22 -06:00
David Richardson a4ad133080 Fix Jakefile orchestration and standardize manual test framework resolution
- Consolidate dual root `build` tasks into a unified target that initializes the build environment and spawns the orchestration pipeline cleanly.
- Replace individual test symlink creation in root `Jakefile` with an `assemble-frameworks` task that constructs a complete, portable `Build/Frameworks` directory.
- Update `Tests/Manual/Jakefile` `configure` task to target project root `Build/Frameworks` directly and streamline `clobber` operations.

Caveat: Tests/Manual subsidiary applications do not have functioning ‘clean’ and ‘clobber’ targets.
2026-10-03 13:01:56 -06:00
David Richardson 236e02911c Fix Jakefile orchestration and standardize manual test framework resolution
- Consolidate dual root `build` tasks into a unified target that initializes the build environment and spawns the orchestration pipeline cleanly.
- Replace individual test symlink creation in root `Jakefile` with an `assemble-frameworks` task that constructs a complete, portable `Build/Frameworks` directory.
- Update `Tests/Manual/Jakefile` `configure` task to target project root `Build/Frameworks` directly and streamline `clobber` operations

- Caveat: Jakefile in each subsidiary application does not include ‘clean’ and ‘clobber’ targets.
2026-10-03 12:53:16 -06:00
David Richardson bfbc522721 AppKit: DOM platform window category ungated (Increment B)
- CPWindow.j: the PLATFORM(BROWSER) import gate removed; the
  CPPlatformWindow (DOM) category now loads under both targets
- category _init restructured: DOM setup (window capture, pasteboard,
  registration) behind CPDOMAvailable; CommonJS branch initializes the
  same state as the base class
- SCROLLWHEEL_LINE_PIXELS converted from #define to a file-scope
  variable; its only uses are within this file
- load-time audit: file-scope statements are DOM-free; the single
  typeof-guarded document reference takes its no-DOM branch under Node
- work-in-progress towards complete removal of CPP directives
2026-10-02 11:11:55 -06:00
David Richardson 5b852ca765 AppKit: first method-definition gates removed (Increment A)
- CPTextField, CPTokenField, CPTextView: the PLATFORM(DOM) gates
  around _inputElement (superclass and override) and _cumulativeOffset
  are removed; the methods now exist under both targets with runtime
  CPDOMAvailable guards returning nil (object methods) or a zero
  point (struct method) when no DOM is present
- contract change: under CommonJS these methods change from absent to
  present-and-inert; all callers are browser event paths never
  exercised by the theme blender or nib2cib
- zero preprocessor directives remain in these three files
- work-in-progress towards complete removal of CPP directives
2026-10-01 16:03:10 -06:00
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
David Richardson e5f42bd403 Merge pull request #3321 from enquora/CPTimezone-modernize
Delegate CPTimezone data source to host browser
2026-09-30 11:24:02 -06:00
David Richardson ed66323b7f Merge branch 'main' into CPTimezone-modernize 2026-09-29 20:28:49 -06:00
David Richardson 73bae6df8e Merge pull request #3320 from cappuccino/tests-manual-orchestration-cleanup
Normalize build targets and repair global clean/clobber orchestration
2026-09-29 17:12:45 -06:00
David Richardson b8225fde2c Normalize build targets and repair global clean/clobber orchestration
The legacy dist, debug, and release Jake targets have been deprecated in favor of a unified build command, aligning the repository with standard conventions.

Node toolchain execution is sufficiently fast to generate both release and debug artifacts simultaneously within a single pass.

The symlinks within Tests/Manual/.Frameworks have been redirected to point to the unified Build artifacts rather than the obsolete dist directory.

Repository reset operations have also been corrected to ensure comprehensive artifact removal.
The root Jakefile now explicitly projects clean and clobber tasks into Tests/Manual; the clobber task now correctly removes Tests/Manual/.Frameworks along with the Frameworks directories in each subsidiary test.
2026-09-29 17:05:21 -06:00
daboe01 1566e37943 Merge pull request #3316 from daboe01/new-platform-unload-fix
fixed: terminate on pagehide instead of unload instead of unload
2026-09-28 15:48:47 +02:00
daboe01 66cda41bfc fixed: terminate on pagehide instead of unload instead of unload 2026-09-28 15:46:35 +02:00
daboe01 e6eb14ef65 Merge pull request #3315 from daboe01/chrome-unload-pasteboard-fix
new: replace unload listener with pagehide in CPPlatformPasteboard
2026-09-28 15:15:50 +02:00
daboe01 d72619660f new: replace unload listener with pagehide in CPPlatformPasteboard 2026-09-28 15:12:55 +02:00
daboe01 4183f090e8 Merge pull request #3314 from daboe01/fixed-textfield-blur-race-condition-on-chrome
fixed: NotFoundError race when moving the shared input element
2026-09-28 14:51:20 +02:00