summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webcursor.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-01 22:31:35 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-01 22:31:35 +0000
commitde56f378336660dcc848763c80267a5e063ae47d (patch)
tree7f551b88923b35bc4022ce6ab3a3f602fb60d91c /webkit/glue/webcursor.cc
parentdc4f63c80cb90efe594131030aad6776e5945fcc (diff)
downloadchromium_src-de56f378336660dcc848763c80267a5e063ae47d.zip
chromium_src-de56f378336660dcc848763c80267a5e063ae47d.tar.gz
chromium_src-de56f378336660dcc848763c80267a5e063ae47d.tar.bz2
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
Diffstat (limited to 'webkit/glue/webcursor.cc')
-rw-r--r--webkit/glue/webcursor.cc27
1 files changed, 17 insertions, 10 deletions
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() {