Mac: Fix stuck hover state in bookmark button
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: de016e52bd170d2d4f2344f9bf92d50478b649e0@69068 0039d316-1c4b-4281-b951-d872f2087c98

Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,ropik/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium