Previously, when reloading the CPOutlineView and changing an item to another parentItem, the CPOutlineView deleted the reference of the item.
Now, when removing old data to avoid memory leaks, the CPOutlineView checks if the pending item to delete doesn't have another parent item.
Previously, when a CPTextField was in a CPPlatformWindow, the checking of if the CPTextField was usable or not (depending on its position) in a CPPlatformWindow didn't take in account the content-inset of the CPTextField. Now it does.
Previously, when reloading a CPOutlineView with different datas than before, the CPOutlineView kept a reference of the previous datas.
Now, when reloading, the CPOutlineView will delete these references when we don't need it anymore. For that, the CPOutlineView will only try to delete the previous reference when we have reloaded the children of a node, otherwise it will keep the other references.
This PR fix some issue with the following methods :
- (BOOL)isExpandable:(id)anItem;
- (BOOL)isItemExpanded:(id)anItem;
- (CPInteger)rowForItem:(id)anItem;
- (CPInteger)levelForItem:(id)anItem;
- (id)itemAtRow:(CPInteger)aRow;
- (CPInteger)levelForItem:(id)anItem;
- (CPInteger)levelForRow:(CPInteger)aRow;
Previously these methods took care about not displayed items. Now they just work with displayed items.
Added unit-tests in Test/AppKit/CPOutlineViewTest.j
Test app in Test/Manual/CPOutlineViewTestCib
Previously, when opening a popover after another one, the CPPopover was blurred.
This occurred due to some CSS Transitions specification :
"Since this specification does not define when a style change event occurs, and thus what changes to computed values are considered simultaneous, authors should be aware that changing any of the transition properties a small amount of time after making a change that might transition can result in behavior that varies between implementations, since the changes might be considered simultaneous in some implementations but not others."
The fix consists to access to a transform value of the style of the _DOMElement to force it to recalculate the values.
More information here : https://code.google.com/p/chromium/issues/detail?id=388082Fixed#2143
Test app in Test/Manual/CPPopover
Previously, the deleteForward:, deleteBackward: and delete: methods in CPTextField called setStringValue, which would consult a formatter, and if the formatter failed all of the text would be deleted.
Now the code has been refactored such that when one of the delete methods is invoked via a key event, the formatter is not used and the DOM event is used, which results in the expected behavior.
A bug in checking the selected range was also fixed in deleteForward:.
The CPFormatter test was updated with buttons to call the delete methods directly to ensure they work correctly when not invoked from a key event.
Closes#1997