Mac: Fix stuck hover state in bookmark button

Bookmark buttons would get stuck with a hover state if they were obscured while the mouse was inside the button.

The problem was that the hover state only tracked the mouse entered and exited events. Unfortunately if the button is obscured because it has been removed from the window then a mouse exited event is not sent.

Fix was to also update the hover state in the -[NSCell resetCursorRect:inView:] event.

This change also improves the mouse tracking code by checking if the mouse is already in over the button.

BUG=27073
TEST=Changed tabs with the mouse over a bookmark button. Verified that the hover effect was no longer there after closing the new tab. Did a similar test by entering full screen. Verified that the hover effect was no longer there.


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69068 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed