From de56f378336660dcc848763c80267a5e063ae47d Mon Sep 17 00:00:00 2001 From: "tc@google.com" Date: Wed, 1 Oct 2008 22:31:35 +0000 Subject: Merge the chrome_webkit_merge_branch back on to trunk. This brings us up to webkit@36102. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2778 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/webcursor.cc | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'webkit/glue/webcursor.cc') diff --git a/webkit/glue/webcursor.cc b/webkit/glue/webcursor.cc index e1d97db..19b34b0 100644 --- a/webkit/glue/webcursor.cc +++ b/webkit/glue/webcursor.cc @@ -7,24 +7,31 @@ #include "webkit/glue/webkit_resources.h" WebCursor::WebCursor() - : type_(ARROW), - hotspot_x_(0), - hotspot_y_(0) { + : type_(ARROW), + hotspot_x_(0), + hotspot_y_(0) { memset(&bitmap_, 0, sizeof(bitmap_)); } WebCursor::WebCursor(Type cursor_type) - : type_(cursor_type), - hotspot_x_(0), - hotspot_y_(0) { + : type_(cursor_type), + hotspot_x_(0), + hotspot_y_(0) { memset(&bitmap_, 0, sizeof(bitmap_)); } WebCursor::WebCursor(const SkBitmap* bitmap, int hotspot_x, int hotspot_y) - : type_(CUSTOM) { - hotspot_x_ = hotspot_x; - hotspot_y_ = hotspot_y; - bitmap_ = *bitmap; + : type_(ARROW), + hotspot_x_(0), + hotspot_y_(0) { + if (bitmap) { + type_ = CUSTOM; + hotspot_x_ = hotspot_x; + hotspot_y_ = hotspot_y; + bitmap_ = *bitmap; + } else { + memset(&bitmap_, 0, sizeof(bitmap_)); + } } WebCursor::~WebCursor() { -- cgit v1.1