diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 18:45:33 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 18:45:33 +0000 |
commit | 78043bddf1744180a28682f8cdf3359a9bfdef4b (patch) | |
tree | 55a8fb8cf8a99a039cb0e3bf2de96c6232782b93 /skia | |
parent | 0a6d4ce8805679d6350dd4ce596d53dcd25837f4 (diff) | |
download | chromium_src-78043bddf1744180a28682f8cdf3359a9bfdef4b.zip chromium_src-78043bddf1744180a28682f8cdf3359a9bfdef4b.tar.gz chromium_src-78043bddf1744180a28682f8cdf3359a9bfdef4b.tar.bz2 |
Mac: Make image dragging 162.4% more awesome.
Also needs a webkit patch to do anything ( https://bugs.webkit.org/show_bug.cgi?id=37069 ), but can be landed independently.
BUG=11457,18992
TEST=(all require the webkit patch, so this won't work yet)
http://html5demos.com/drag and http://ljouanneau.com/lab/html5/demodragdrop.html
Dragging should show image
http://www.google.com/
Dragging google image should show image
http://www.travelvivi.com/wp-content/uploads/2009/09/Eiffel_Tower.jpg
Dragging image should work, drag image should be smaller than image itself
Random website
Mark some text, drag it. Should show drag cursor and no image
Review URL: http://codereview.chromium.org/1539018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/skia_utils_mac.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm index 3568d88..a913587 100644 --- a/skia/ext/skia_utils_mac.mm +++ b/skia/ext/skia_utils_mac.mm @@ -168,6 +168,9 @@ SkBitmap NSImageToSkBitmap(NSImage* image, NSSize size, bool is_opaque) { } NSImage* SkBitmapToNSImage(const SkBitmap& skiaBitmap) { + if (skiaBitmap.isNull()) + return nil; + // First convert SkBitmap to CGImageRef. CGImageRef cgimage = SkCreateCGImageRef(skiaBitmap); |