The Window menu never listed the application's windows, because AppKit had none of Cocoa's Windows menu support.
* CPApplication.j: Add windowsMenu, setWindowsMenu:, addWindowsItem:title:filename:, changeWindowsItem:title:filename:, removeWindowsItem:, updateWindowsItem: and arrangeInFront:; find the menu named _CPWindowsMenu in the main menu, and list the visible windows when the main menu is set.
* CPWindow/CPWindow.j: Add isExcludedFromWindowsMenu and setExcludedFromWindowsMenu:, and keep the window's item current when the window is ordered in or out, retitled, made main or no longer main, miniaturized, deminiaturized or closed.
* Tests/AppKit/CPApplicationWindowsMenuTest.j: Add tests for listing, retitling, exclusion, the main window check mark, separator handling, file name titles and moving items to another Windows menu.
* Tests/Manual/TextEditor/WORKLIST.md: Remove the entry for this gap, and record the Window menu as tested.
The Show Toolbar menu item toggled the toolbar, but CPWindow did not validate it, so its title never changed and it stayed enabled in windows without a toolbar.
* CPWindow/CPWindow.j: Add validateUserInterfaceItem:, which sets the toggleToolbarShown: item's title to Hide Toolbar or Show Toolbar and enables it only when the window has a toolbar.
* Tests/Manual/TextEditor/WORKLIST.md: Remove the entry for this defect, and record the menu item as tested.
A window stored the proposed size in its frame before asking its delegate through windowWillResize:toSize:, and gave the delegate's size only to the window view. When the delegate enlarged the size, hit testing used the smaller frame, so the window could no longer be moved or resized.
* CPWindow/CPWindow.j: Ask the delegate before storing the new size, and store the size it returns in the frame.
* CPWindow/_CPWindowView.j: Ask the delegate during a user resize, and move the origin by the delegate's adjustment when resizing from the left or top edge, so that the opposite edge stays in place.
* Tests/Manual/TextEditor/Resources/DocumentWindow.xib: Make the document window's content view resize with the window.
* Tests/Manual/TextEditor/WORKLIST.md: Remove the entry for this defect, record the minimum window size behaviour as tested, and add the content view resizing setting that does not reach the cib.
- 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
- CPWindow.j: 16 of 17 PLATFORM blocks resolved; purely mechanical
translation to runtime CPDOMAvailable guards (wrapped or compound),
one ivar un-gated; one latent no-return bug preserved as-is
- The PLATFORM(BROWSER) import gate remains, out of scope for this change
- work-in-progress towards complete removal of CPP directives
This speed improvement is very notable when resizing a browser window of altering the size of split views.
The fix uses a variable on the window to control when to update the tracking areas.
If the view is not connected to a window the tracking areas will not be updated as they will
be when added to a window.
Also fixed CPView -(BOOL)inLiveResize
If a view is added during a live resize, it will not receive a
willStart notif.
If a view is removed during a live resize it will not receive a Didend
notif.