- 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
- 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
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.
- 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
Cappuccino previously supported three platform contexts behind the
PLATFORM() preprocessor macro: Browser, CommonJS/Node, and a NativeHost
target. NativeHost is no longer supported; this removes it and
consolidates on Browser (for the app) and CommonJS/Node (still needed
by the toolchain itself, for theme compilation and testing).
PLATFORM(DOM) conditionals throughout AppKit governed both distinctions
at once - Browser vs NativeHost, and separately, DOM-dependent code vs
the CommonJS/Node build. Each conditional was reviewed individually:
NativeHost-only branches were removed, while branches needed for
CommonJS/Node were kept intact rather than collapsed to Browser-only.
Also included, found in the course of this work:
- Fixed two pre-existing duplicate instance-variable declarations
(_ephemeralSubviews in CPView, _scrollingTimer in CPTextView)
- Added a missing @import for CPTextContainer.j in CPTextView.j so
it resolves when compiled outside the full framework bundle
- Merged two Platform/DOM/*.j files into their parents to resolve a
build-tool basename collision, preserving the CommonJS fallback path
As part of the ongoing technical debt cleanup, this commit modernizes
CPPlatformPasteboard.j by removing its reliance on the C-preprocessor
and stripping obsolete Internet Explorer compatibility code.
Key changes:
- Inlined the `SUPPRESS_CAPPUCCINO_CUT_FOR_EVENT` and `SUPPRESS_CAPPUCCINO_PASTE_FOR_EVENT`
macros directly to standard property assignments.
- Removed the IE `srcElement` fallback in `hasEditableTarget`.
- Removed the IE `attachEvent`/`detachEvent` branch in `createDOMElements`,
keeping only the standard `addEventListener` path.
- Replaced `var` with `const` and `let` for proper block scoping and immutability.
- Retained the `#if PLATFORM(DOM)` guards to protect the Node.js CI during
the phased modernization effort.
All changes are annotated with `// MODIFICATION:` comments for clear
review tracking.
The default was to make the first window in the most background layer the key window if nothing else was used.
This does not work well if there is a modal window that should have all the attention.
This solution will first choose the modal window if in modal mode. If not the old variant is used.
This was present in a CPTextView.
A press on caps lock should also result in a flagsChanged event.
An event should have the corresponding flag for caps lock in modifierFlags.
Method _mayRequireDOMPasteboardElementHack:flags had return type of void, despite returning a BOOL value, and also being annotated with a doc comment stating that it should return a BOOL value
Also some methods had return type "boolean", should possibly be BOOL