Commit Graph
329 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
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 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
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
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 4edcf0fecc Merge branch 'main' into refactor-remove-nativehost-target
# Conflicts:
#	AppKit/CPTextView/_CPTableTextAttachment.j
2026-08-21 09:52:57 -06:00
David Richardson e5c34e3dd7 Remove NativeHost platform target; require CommonJS/Node for tooling
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
2026-08-12 13:25:52 -06:00
daboe01 ce2803f354 replace unload event listener with pagehide and add DOM safety checks 2026-08-12 16:58:12 +02:00
David Richardson c97839905c Refactor CPPlatformPasteboard: Remove CPP macros and legacy IE fallbacks
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.
2026-07-23 17:22:36 -06:00
daboe01 1223cfc965 new: register wheel event listeners as non-passive 2026-06-17 16:10:39 +02:00
daboe01 e198fbdc40 Merge pull request #3122 from daboe01/fixed-keycode-management-in-cptextview
fixed: Keyboard-event handling is based on the deprecated charCode
2026-01-28 20:57:07 +01:00
daboe01 134688ef5c improved: double click emulation by double tapping 2025-07-18 21:48:09 +02:00
daboe01 b3695ed710 formatting 2025-07-06 12:48:31 +02:00
daboe01 9e15700f93 cleanup stuff 2025-07-03 22:10:57 +02:00
daboe01 6b2494ede4 fixed: arrow navigation 2025-07-02 19:54:52 +02:00
daboe01 f4ac0630b8 formatting 2025-07-01 22:25:20 +02:00
daboe01 b3cb22caef more modernisations 2025-07-01 22:16:33 +02:00
daboe01 b1d96dfdee improved reliance of key 2025-07-01 21:53:53 +02:00
daboe01 5ecdaafadf fixed: arrow keys did not work 2025-07-01 20:23:29 +02:00
daboe01 223bbc86e1 fixed: arrow keys did not work 2025-07-01 19:42:12 +02:00
daboe01 0867e718d1 Revert "fixed: arrow keys did not work"
This reverts commit c814b5daed.
2025-07-01 19:40:47 +02:00
daboe01 c814b5daed fixed: arrow keys did not work 2025-07-01 19:36:02 +02:00
daboe01 9c6ce6d200 fixed: missing _momentumScrollStep 2025-06-23 09:40:27 +02:00
daboe01 a1aad41a6b fixed: missing ivars 2025-06-23 09:30:52 +02:00
daboe01 38cb3cb1a2 fixed: touch scrolling did not support momentum 2025-06-23 09:19:02 +02:00
daboe01 751e1d27a6 Update CPPlatformWindow+DOMKeys.j 2025-06-23 09:02:28 +02:00
daboe01 36d4bd32b5 Update CPPlatformWindow+DOM.j 2025-06-23 08:58:12 +02:00
Martin Carlberg edfba15d6f Merge branch 'master' into node 2022-03-21 15:55:08 +01:00
daboe01 f21555bb6c Fixed: Width of text sizing was slightly off in chrome due to a Chrome bug (#2975)
This is a real bug in chrome. see https://bugs.chromium.org/p/chromium/issues/detail?id=1192834

Also fixed: ellipsis clipping in segmented controls
and
fixed: tooltip wrapping issues from fractional pixels
2022-03-21 14:08:45 +01:00
daboe01 b0684929e2 Fixed: key event issues of handling escape in recent firefox … (#3020) 2022-03-21 13:02:37 +01:00
Alfred Wärnsäter 2ecea40fdc lots of Node fixes 2021-08-19 10:56:13 +02:00
Alfred Wärnsäter 0a2aae3bc2 some restructuring of the repo, trying to fix problems when building with node 2021-06-30 10:13:52 +02:00
Martin Carlberg 7dc77ed609 Fixed: Make sure we handle undefined when testing for nil values (#2862) 2020-01-31 13:43:58 +01:00
daboe01 8daa53dd3e Fixed: CPTextView keyboard issue in recent Firefox versions (#2874)
Wrong characters were sometimes emitted in keyboard events on Firefox
2020-01-07 12:34:39 +01:00
Martin Carlberg aaed1a934e Fixed: When in modal mode make sure a focus event will make the modal window the key window (#2867)
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.
2019-11-27 19:16:03 +01:00
daboe01 ce4fa3c027 Fixed: Pressing capslock inserted whitespaces under certain conditions (#2857)
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.
2019-09-10 08:34:07 +02:00
daboe01 129ca185e4 Fixed: backspace triggered page back in FireFox (#2849) 2019-06-13 15:59:35 +02:00
daniel fb2d0ed170 Fixed: Return types in CPPlatformPasteboard.j should return BOOL
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
2019-03-28 13:42:39 -07:00
daniel d4e139eaf5 Fixed: Return type for method in CPPlatformPasteboard.j
Method return type is labeled as void despite returning a BOOL and the DOC comment stating that it should return a BOOL
2019-03-28 13:38:33 -07:00
daboe01 e6475c1a9e Fixed: setMinSize: had no effect in platform windows (#2609) 2018-08-20 12:47:29 +02:00
daboe01 fa6177b56d Fixed: touch scrolling events to scrollviews also scrolled the document body (#2750) 2018-08-20 11:05:13 +02:00
daboe01 e35e87fb05 fixed: obsolete code remnants from nativehost 2018-08-08 19:19:58 +02:00
Martin Carlberg 4afbfc6e57 Revert "Removed: dead code and dom clutter from nativehost (#2608)"
This reverts commit 5bfafaf241.
2018-07-11 09:20:49 +02:00
daboe01 5bfafaf241 Removed: dead code and dom clutter from nativehost (#2608) 2018-07-05 11:40:10 +02:00
daboe01 7909bae065 Fixed: touch-scrolling did not work (#2612) 2018-04-09 13:19:18 +02:00
Alexandre Wilhelm d3c56d635d Merge pull request #2669 from bedalton/formatting-add-semi-colons-cpplatformwindow
Formatting: minor formatting updates in CPPlatformWindow+DOM.j
2018-04-08 11:32:58 -07:00