• darin's avatar
    JavaScriptCore: · d4ca2268
    darin authored
            * kjs/property_map.cpp: Rearrange code a little bit and tweak indentation.
    	This might provide a tiny speedup because we don't look at the single entry
    	any more in cases where the _table pointer is non-0.
    
    WebKit:
    
    	- fixed a problem I discovered in testing where multiple identical bookmarks confuse us
    
            * Bookmarks.subproj/WebBookmarkList.m:
            (-[WebBookmarkList removeChild:]): Use indexOfObjectIdenticalTo: and removeObjectIdenticalTo:
    	instead of containsObject: and removeObject:.
            (-[WebBookmarkList insertChild:atIndex:]): Use indexOfObjectIdenticalTo: instead of
    	containsObject: in the assertion.
    
    WebBrowser:
    
            - fixed 3042781 -- slidey animation sometimes draws partial item behind overflow indicator
            - fixed 3090845 -- would be nice to be able to drop bookmarks into folders using the bookmark toolbar
            - fixed 3107422 -- bookmark in toolbar gets stuck highlighted if window is moved by the stacking code
            - fixed problem where you would get an overflow indicator even if there was room for the last bookmark
            - fixed problem where the cursor could change to an I-beam during a constrained drag
    
            * FavoriteButton.h: Add canAcceptDroppedBookmark, setHighlighted, and
    	acceptDroppedBookmark methods for use when doing a constrained drag that
    	drop items into folders. Also add a category on NSView to be used to pause
    	animation when over a button that will accept a drop.
            * FavoriteButton.m:
            (-[FavoriteButton registerForDraggedTypes]): Accept DraggedFavoriteButtonPboardType.
            (-[FavoriteButton initTrackingRect]): Add an observer so we update the tracking rect
    	when the window moves too. This fixes bug 3107422.
            (-[FavoriteButton bookmarksFromPasteboard:]): Added. Helper method that accepts drag
    	from DraggedFavoriteButtonPboardType as well as the other bookmark pasteboard types,
    	but only within the same superview.
            (-[FavoriteButton determineDragOperation:]): Call [self bookmarksFromPasteboard:]
    	instead of [WebBookmark bookmarksFromPasteboard].
            (-[FavoriteButton draggingEntered:]): Pause animation when we enter a button that can
    	accept a dropped bookmark. This makes sure that the button doesn't slide out from under
    	the mouse.
            (-[FavoriteButton draggingUpdated:]): Don't do any highlighting here because it's not
    	necessary.
            (-[FavoriteButton draggingExited:]): Resume the animation in case we paused it.
            (-[FavoriteButton performDragOperation:]): Call [self bookmarksFromPasteboard:]
    	instead of [WebBookmark bookmarksFromPasteboard]. Also resume the animation in case we
    	paused it.
            (-[FavoriteButton canAcceptDroppedBookmark]): Added. Returns YES if the bookmark's type
    	is WebBookmarkTypeList.
            (-[FavoriteButton setHighlighted:]): Added. Calls setHighlighted: on the button's cell.
            (-[FavoriteButton acceptDroppedBookmark:]): Added. Does the same work that performDragOperation
    	does for the case of moving a button within the same bar.
            (-[FavoriteButton _hitTest:dragTypes:]): Don't accept drags at the edges of the button.
    	This makes space between buttons so there's room to put new buttons between two old ones, even
    	if the old ones are both for folders.
            (-[NSView pauseAnimation]): Added. Passes the call up the superview chain.
            (-[NSView resumeAnimation]): Added. Passes the call up the superview chain.
    
            * FavoritesBar.m:
            (-[FavoritesBar maxButtonXWithoutClipIndicator]): Added. Leaves a margin,
    	currently 3 pixels.
            (-[FavoritesBar maxButtonXWithClipIndicator]): Added. Leaves a margin,
    	currently 3 pixels.
            (-[FavoritesBar maxButtonX]): Modified to call either maxButtonXWithoutClipIndicator
    	or maxButtonXWithClipIndicator depending on whether the clip indicator is showing.
            (-[FavoritesBar slideButtonsIntoPlace]): Slide buttons off the right side of the bar
    	if they are going to be clipped out. Allow the last button to go all the way to the
    	right, using the space that would otherwise be used by the clip indicator. Make the
    	clip indicator disappear if buttons are going to slide past it to the left or the right.
            (-[FavoritesBar _layOutButtons]): Include the smarts about leaving space for the
    	item to be dropped and about leaving out the currently dragged item that was formerly
    	only in slideButtonsIntoPlace. Also include the smarts about positioning mentioned
    	above, and do positioning here, rather than in _refreshButtons. To allow calling this
    	during constrained dragging, add the dragged item after adding all the other items.
            (-[FavoritesBar finishedSlidingAnimation:]): Added. Calls _layOutButtons. This is used
    	to make the clip indicator reappear in case slideButtonsIntoPlace made it disappear.
            (-[FavoritesBar addButtonForBookmark:]): Removed left edge parameter. This no method longer
            tries to position bookmarks at all.
            (-[FavoritesBar _refreshButtons]): Get rid of code that attempts to position the buttons.
    	We now do that in _layOutButtons.
            (-[FavoritesBar initWithView:]): Initialize _dragSourceIndexIfMoving to NSNotFound.
    	Make us the animation's delegate so we get a finishedSlidingAnimation:.
            (-[FavoritesBar performDragOperation:]): Check for drags within the favorites bar by
    	checking _dragSourceIndexIfMoving rather than looking for DraggedFavoriteButtonPboardType.
    	Also reset _dropIndex since _layOutButtons now looks at it.
            (-[FavoritesBar draggingEnded:]): Reset _dragSourceIndexIfMoving since _layOutButtons
    	now looks at it.
            (-[FavoritesBar reorderFavoriteButton:fromMouseDownEvent:]): Disable cursor rectangles and
    	set the cursor to the arrow cursor during the reorder process. Add hit testing so that the
    	constrained dragging can drop items in FavoriteButtons that are folders. Pause animation
    	when over such a FavoriteButton, and resume it when not over it.
            (-[FavoritesBar pauseAnimation]): Added.
            (-[FavoritesBar resumeAnimation]): Added.
    
            * FavoritesBarView.h: Add pauseAnimation and resumeAnimation methods to the delegate.
            * FavoritesBarView.m:
            (-[FavoritesBarView pauseAnimation]): Pass call on to the delegate.
            (-[FavoritesBarView resumeAnimation]): Ditto.
    
            * SlidingAnimation.h: Add delegate, setDelegate method, pause and resume methods, and
    	finishedSlidingAnimation: method for the delegate.
            * SlidingAnimation.m:
            (-[SlidingAnimation updateTimer]): Take the paused state into account, and also call the
    	finishedSlidingAnimation: method when the animation completes.
            (-[SlidingAnimation showNextFrame]): Simplify by using a call to updateTimer to do most
    	of the work.
            (-[SlidingAnimation setDelegate:]): Added. Just sets the delegate field.
            (-[SlidingAnimation pause]): Added. Just sets the paused state and calls updateTimer.
            (-[SlidingAnimation resume]): Added. Just sets the paused state and calls updateTimer.
    
    	- fixed a problem I discovered in testing where multiple identical bookmarks confuse us
    
            * BookmarksViewController.m:
            ([BookmarksViewController anyAncestorOfBookmark:inArray:]): Use indexOfObjectIdenticalTo:
    	instead of containsObject:, because we want to use identity on bookmarks, not equality
    	comparison.
    	([BookmarksViewController bookmarkOrAnyAncestor:inArray:]): Ditto.
    	([BookmarksViewController newContentItemWithTitle:URLString:type:positionIgnoresSelection:]): Ditto.
    	([BookmarksViewController sourceRowForBookmark:]): Ditto.
    	([BookmarksViewController outlineView:validateDrop:proposedItem:proposedChildIndex:]): Ditto.
    	([BookmarksViewController paste:]): Ditto.
    	([UndoRemoveInfo initWithBookmark:]): Ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d4ca2268
ChangeLog 77.9 KB