CPTextField previously passed the browser's context menu through only when
its next responder was not a view, and no view in the responder chain
supplied one, leaving text fields without a context menu.
Because reading the system clipboard from a custom menu triggers browser permission
prompts, Paste is omitted; Cut and Copy write to the system clipboard via the asynchronous Clipboard API.
- CPTextField:
- Implement +defaultMenu containing Cut, Copy, and Select All.
- Implement -menuForEvent:, prioritizing application-assigned menus and
deferring to enclosing table views for table data views.
- Write to the system clipboard in -copy: when invoked outside native
browser clipboard events.
- Preserve text selection when opening the context menu and restore it
for Cut and Copy actions, restricted exclusively to editable fields.
- CPSearchField: Present the text field context menu on right-click rather
than the search menu returned by -menu.
- CPPasteboard: Extract a shared system clipboard write helper and adopt it
in CPTextView.
- CPTextFieldTest, CPSearchFieldTest: Add unit tests covering context
menu presentation, validation, and override precedence.
- Add theme colour catalog "Theme" with values in CPColor attribute theme-colors
- Accept colours and arrays in CSS dictionaries; convert each value at write time
- Compare converted CSS of appearance-dependent CSS colours and images in setters
- Skip dynamic values in theme load walks; fix resource paths in strings only
- Rename CPView -_applyBackgroundColor to -_writeBackgroundColor (CPWebView clash)
- Resolve event-time DOM writes in owning view appearance; reapply on change
- Write _CPImageAndTextView text colour in layout
- Define 104 Aristo3 constants as 98 theme colours; add dark table for DarkAqua
- Add tests for CSS values, theme catalog, Aristo3 theme colours and audit sites
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.
changes for fix#2332. The test-cased failed, because now a
a CPDecimalNumber has a different UID compared to a CPNumber with the same
value. That means isEqual: will return false. In the test-cases the formatter now
generates CPNumbers to make the two Numbers compareable via isEqual.