Previously, when assigning a listDelegate to a CPComboBox, we never deleted the observers added by this method. Now we add and delete these observers in the method addObservers and removeObservers.
This PR fix another issue. Previously, the behavior of the panel of the comboBox wasn't the same as the one in Cocoa. Now, when closing the panel, the hit view won't be the first responder as it was. Cocoa works like this as well.
Previously, the CPClipView registered the documentView to the notificationCenter as an observer to be notified when the frame/bounds of the documentView change.
Now, we don't use the notificationCenter anymore. The class CPView send a message to its superview (when it's a clipView) when the frame or bounds change. This fix the memory leak of the CPClipView
Fixed#2264
Prevously, when removing a CPTableView or a CPScrollView, the CPNotificationCenter kept a reference of these observers in the notification center.
Now, the CPNotificationCenter does only have a observer when necessary.
When setting controlSize, CPTextfield height was forced to min-size height.
Now we check that the frame size is between the min and the max size. It allows to constrain
a CPControl to have a fixed height by specifying a min-size equivalent to the maxsize.
In CPTextField case, we only have a min-size which enable us to have a specific size.
Changes has been made in Aristo2 only.
This patch adds support for CPTextField with multiline content. It uses
a DOM textarea when needed, instead of DOM input.
It also disable the spellchecking, fixes a bug where the input element was not
correctly resized when the frame changed, and refactor some code
Previously, when moving from platformWindow to another platformWindow, the targeted window didn't get the new event because the keyWindow of the application was still set to the other platformWindow.
This PR fixes another issue about opening panel in a platformWindow. When opening a panel in a platformWindow, cappuccino set the new key window to the wrong platformWindow.
Previously, the text cursor of the CPTextField didn't take in account the content-inset. This raised issue with class as the CPComboBox, when the mouse was over the popUpButton, there was still the text cursor instead of the default one.
Now it works as in Cocoa.
Previously, when setting font, alignement, intercellSpacing or itemHeight, CPComboBox was assuming the listDelegate was already created.
This patch stores the values in CPComboBox if the listDelegate is not ready, and apply them once it is.
Previously when chaining sheet on the same window, Cappuccino crashed.
Now chaining a sheet in the delegate method of the method endSheet: will open the next sheet.
Now when opening a sheet, we check if another sheet is currently closing. If yes, we wait till we get the notification of the closing of the previous sheet. And then we open the next sheet.
Fixed#2159
Test app in Tests/Manual/AttachedSheet2/SheetWindowController.j
Previously, when the cursor was hover a CPTextField the cursor was an arrow till we selected the textField.
Now when the cursor is hover a CPTextField, and if this textField is enabled and editable or selectable we show the selecting cursor. This is the default behavior in Cocoa as well.
Updated manual test Tests/Manual/CPTextField/
Previously, when having a CPTableView with a selectionStyle set to CPTableViewSelectionHighlightStyleNone, we needed two clicks to be able to select or click on a control of the cell. Now we only need one click as in Cocoa.
This is fixed by changing the method hitTest and returning the good view which can become the firstResponder.
Previously, when making a right click on a non-selectable CPTextField which is contained in a dataView of a CPTableView set the bezel attribute to yes.
Now, when making this things, Cappuccino will check if the CPTextField if editable or not.