- 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
- 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
- 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
- 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
- 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
- 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
- _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)
- 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
- 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
- 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)
- 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
- 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
- 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
- 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
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.
- 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
- 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
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.
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.
- 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
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.
- 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