Fix incorrect use of UnrefCustomCursor.
BUG=None Review URL: https://chromiumcodereview.appspot.com/10928154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156471 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
ui/base/cursor
@ -42,9 +42,9 @@ void Cursor::SetPlatformCursor(const PlatformCursor& platform) {
|
||||
void Cursor::Assign(const Cursor& cursor) {
|
||||
if (*this == cursor)
|
||||
return;
|
||||
native_type_ = cursor.native_type_;
|
||||
if (native_type_ == kCursorCustom)
|
||||
UnrefCustomCursor();
|
||||
native_type_ = cursor.native_type_;
|
||||
platform_cursor_ = cursor.platform_cursor_;
|
||||
if (native_type_ == kCursorCustom)
|
||||
RefCustomCursor();
|
||||
|
@ -9,11 +9,13 @@
|
||||
namespace ui {
|
||||
|
||||
void Cursor::RefCustomCursor() {
|
||||
ui::RefCustomXCursor(platform_cursor_);
|
||||
if (platform_cursor_)
|
||||
ui::RefCustomXCursor(platform_cursor_);
|
||||
}
|
||||
|
||||
void Cursor::UnrefCustomCursor() {
|
||||
ui::UnrefCustomXCursor(platform_cursor_);
|
||||
if (platform_cursor_)
|
||||
ui::UnrefCustomXCursor(platform_cursor_);
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
|
Reference in New Issue
Block a user