Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: webkit/api/src/WebImageCG.cpp

Issue 155320: Fix custom cursors on Mac. Null and 0 turn out not to be opposites.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/glue/webcursor_mac.mm » ('j') | webkit/glue/webcursor_mac.mm » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 m_imageRef = 0; 69 m_imageRef = 0;
70 } 70 }
71 71
72 void WebImage::assign(const WebImage& image) 72 void WebImage::assign(const WebImage& image)
73 { 73 {
74 assign(image.m_imageRef); 74 assign(image.m_imageRef);
75 } 75 }
76 76
77 bool WebImage::isNull() const 77 bool WebImage::isNull() const
78 { 78 {
79 return m_imageRef != 0; 79 return m_imageRef == 0;
80 } 80 }
81 81
82 WebSize WebImage::size() const 82 WebSize WebImage::size() const
83 { 83 {
84 return WebSize(CGImageGetWidth(m_imageRef), CGImageGetHeight(m_imageRef)); 84 return WebSize(CGImageGetWidth(m_imageRef), CGImageGetHeight(m_imageRef));
85 } 85 }
86 86
87 WebImage::WebImage(const PassRefPtr<Image>& image) 87 WebImage::WebImage(const PassRefPtr<Image>& image)
88 : m_imageRef(0) 88 : m_imageRef(0)
89 { 89 {
(...skipping 10 matching lines...) Expand all
100 return *this; 100 return *this;
101 } 101 }
102 102
103 void WebImage::assign(CGImageRef imageRef) 103 void WebImage::assign(CGImageRef imageRef)
104 { 104 {
105 CGImageRelease(m_imageRef); 105 CGImageRelease(m_imageRef);
106 CGImageRetain(m_imageRef = imageRef); 106 CGImageRetain(m_imageRef = imageRef);
107 } 107 }
108 108
109 } // namespace WebKit 109 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/webcursor_mac.mm » ('j') | webkit/glue/webcursor_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698