CPScrollView previously lacked magnification support, preventing document
zooming and leaving view scaling infrastructure without practical test coverage.
Additionally, views resetting to a 1.0 scale retained stale CSS transform properties,
and legacy cibs compiled via nib2cib omitted explicit magnification limits,
breaking zoom functionality in older archives.
* AppKit/CPScrollView.j:
- Implement magnification methods and properties (`magnification`, `setMagnification:`, `setMagnification:centeredAtPoint:`, `allowsMagnification`, `minMagnification`, and `maxMagnification`) modelled on NSScrollView, with keyed archiving.
- Scale clip view bounds and synchronize resizing document view widths.
- Define standard Cocoa default limits (0.25 and 4.0) as named constants.
- Implement robust decoding validation to assign default limits to unset or invalid archive values and reject non-positive magnification inputs, ensuring full compatibility with legacy cibs.
* AppKit/CPView.j:
- Remove stale CSS scale styling when a view's scale factor returns to 1.0.
* Tests/AppKit/CPScrollViewTest.j:
- Add comprehensive unit tests covering magnification scaling, archiving, and fallback decoding for unconfigured limits.
* Tests/Manual/TextEditor/DocumentWindowController.j:
- Implement zoom action handlers (`zoomToLevel:`, `zoomToActualSize:`, `zoomIn:`, and `zoomOut:`) driven by menu item tag values.
* Tests/Manual/TextEditor/Resources/MainMenu.xib, MainMenu.cib:
- Add View menu options for Actual Size, Zoom In, Zoom Out, and explicit Zoom Levels (25% to 200%).
* Tests/Manual/TextEditor/WORKLIST.md:
- Mark zoom functionality as tested; log discovered scaling edge cases as open items.
CPScrollView and TextEditor now support robust document magnification from 25% to 200%, validating core view scaling mechanics.
CPScrollView's frame and content size calculations sized the vertical scroller with scrollerWidthForControlSize:, passing a scroller style, so it always took the legacy width.
* CPScrollView: Use scrollerWidthInStyle: for the vertical scroller in +contentSizeForFrameSize:… and +frameSizeForContentSize:….
* CPScrollViewTest: Add tests for both methods with a scroller whose widths differ by style.
Previously, every AppKit tests used the same sharedApplication. Due to this implementation, a could not pass because a previous test made failed the current test. For instance, a test could fail because the window of the previous test resigned (just imagine a new window is the key window in the current test), and this resign could raise an error. The error was displayed for the current test thought this test was perfect !
We now instead of using sharedApplication create a new CPApplication per unit-test file in the class method setUp.
Previously, the method documentVisibleRect did not return the expected result. An issue happened when using this method on a scaled view. The converted rect was converted in the wrong context.
Unit test in Tests/AppKit/CPScrollViewTest.j
Fixed#2356