Bug 346690 - Add support for the 'none' keyword for the CSS cursor property. r=dbaron, sr=mats, a=schrep
authorjwalden@mit.edu
Fri, 18 Jan 2008 10:39:49 -0800
changeset 10405 6c8d9d12d0b6f8b979520d7755b8f494a7896336
parent 10404 e43fa22ec9a8c6c26f5306c3b9eded9a172e7fb2
child 10406 13b94dbf1286ad71f92e5597a951ec047781fffe
push idunknown
push userunknown
push dateunknown
reviewersdbaron, mats, schrep
bugs346690
milestone1.9b3pre
Bug 346690 - Add support for the 'none' keyword for the CSS cursor property. r=dbaron, sr=mats, a=schrep
browser/app/splash.rc
browser/app/splashos2.rc
content/events/src/nsEventStateManager.cpp
layout/base/nsStyleConsts.h
layout/style/nsCSSProps.cpp
layout/style/test/property_database.js
toolkit/library/xulrunos2.rc
widget/public/nsIWidget.h
widget/src/beos/nsWindow.cpp
widget/src/build/res/none.cur
widget/src/build/widget.rc
widget/src/cocoa/nsCursorManager.mm
widget/src/gtk2/nsGtkCursors.h
widget/src/gtk2/nsWindow.cpp
widget/src/os2/nsWindow.cpp
widget/src/os2/wdgtos2rc.h
widget/src/os2/widget.rc
widget/src/windows/nsWindow.cpp
widget/src/windows/resource.h
xulrunner/app/splash.rc
xulrunner/app/splashos2.rc
--- a/browser/app/splash.rc
+++ b/browser/app/splash.rc
@@ -63,21 +63,23 @@ END
 #define IDC_CELL                        4103
 #define IDC_COPY                        4104
 #define IDC_ALIAS                       4105
 #define IDC_ZOOMIN                      4106
 #define IDC_ZOOMOUT                     4107
 #define IDC_COLRESIZE                   4108
 #define IDC_ROWRESIZE                   4109
 #define IDC_VERTICALTEXT                4110
+#define IDC_NONE                        4112
 
 IDC_GRAB                CURSOR  DISCARDABLE     "../../widget/src/build/res/grab.cur"
 IDC_GRABBING            CURSOR  DISCARDABLE     "../../widget/src/build/res/grabbing.cur"
 IDC_CELL                CURSOR  DISCARDABLE     "../../widget/src/build/res/cell.cur"
 IDC_COPY                CURSOR  DISCARDABLE     "../../widget/src/build/res/copy.cur"
 IDC_ALIAS               CURSOR  DISCARDABLE     "../../widget/src/build/res/aliasb.cur"
 IDC_ZOOMIN              CURSOR  DISCARDABLE     "../../widget/src/build/res/zoom_in.cur"
 IDC_ZOOMOUT             CURSOR  DISCARDABLE     "../../widget/src/build/res/zoom_out.cur"
 IDC_COLRESIZE           CURSOR  DISCARDABLE     "../../widget/src/build/res/col_resize.cur"
 IDC_ROWRESIZE           CURSOR  DISCARDABLE     "../../widget/src/build/res/row_resize.cur"
 IDC_VERTICALTEXT        CURSOR  DISCARDABLE     "../../widget/src/build/res/vertical_text.cur"
+IDC_NONE                CURSOR  DISCARDABLE     "../../widget/src/build/res/none.cur"
 
 #endif
--- a/browser/app/splashos2.rc
+++ b/browser/app/splashos2.rc
@@ -66,12 +66,13 @@ POINTER IDC_CELL           "..\\..\\widg
 POINTER IDC_COPY           "..\\..\\widget\\src\\os2\\res\\copy.ptr"
 POINTER IDC_ALIAS          "..\\..\\widget\\src\\os2\\res\\aliasb.ptr"
 POINTER IDC_ZOOMIN         "..\\..\\widget\\src\\os2\\res\\zoom_in.ptr"
 POINTER IDC_ZOOMOUT        "..\\..\\widget\\src\\os2\\res\\zoom_out.ptr"
 
 POINTER IDC_ARROWWAIT      "..\\..\\widget\\src\\os2\\res\\arrow_wait.ptr"
 POINTER IDC_CROSS          "..\\..\\widget\\src\\os2\\res\\crosshair.ptr"
 POINTER IDC_HELP           "..\\..\\widget\\src\\os2\\res\\help.ptr"
+POINTER IDC_NONE           "..\\..\\widget\\src\\os2\\res\\help.ptr"
 
 ICON    IDC_DNDURL         "..\\..\\widget\\src\\os2\\res\\dndurl.ico"
 ICON    IDC_DNDTEXT        "..\\..\\widget\\src\\os2\\res\\dndtext.ico"
 #endif
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -2854,16 +2854,19 @@ nsEventStateManager::SetCursor(PRInt32 a
     c = eCursor_nwse_resize;
     break;
   case NS_STYLE_CURSOR_NS_RESIZE:
     c = eCursor_ns_resize;
     break;
   case NS_STYLE_CURSOR_EW_RESIZE:
     c = eCursor_ew_resize;
     break;
+  case NS_STYLE_CURSOR_NONE:
+    c = eCursor_none;
+    break;
   }
 
   // First, try the imgIContainer, if non-null
   nsresult rv = NS_ERROR_FAILURE;
   if (aContainer) {
     PRUint32 hotspotX, hotspotY;
 
     // css3-ui says to use the CSS-specified hotspot if present,
--- a/layout/base/nsStyleConsts.h
+++ b/layout/base/nsStyleConsts.h
@@ -319,16 +319,17 @@
 #define NS_STYLE_CURSOR_ROW_RESIZE              28
 #define NS_STYLE_CURSOR_NO_DROP                 29
 #define NS_STYLE_CURSOR_VERTICAL_TEXT           30
 #define NS_STYLE_CURSOR_ALL_SCROLL              31
 #define NS_STYLE_CURSOR_NESW_RESIZE             32
 #define NS_STYLE_CURSOR_NWSE_RESIZE             33
 #define NS_STYLE_CURSOR_NS_RESIZE               34
 #define NS_STYLE_CURSOR_EW_RESIZE               35
+#define NS_STYLE_CURSOR_NONE                    36
 
 // See nsStyleDisplay
 #define NS_STYLE_DIRECTION_LTR                  0
 #define NS_STYLE_DIRECTION_RTL                  1
 #define NS_STYLE_DIRECTION_INHERIT              2
 
 // See nsStyleDisplay
 #define NS_STYLE_DISPLAY_NONE                   0
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -495,16 +495,17 @@ const PRInt32 nsCSSProps::kCursorKTable[
   eCSSKeyword_row_resize, NS_STYLE_CURSOR_ROW_RESIZE,
   eCSSKeyword_no_drop, NS_STYLE_CURSOR_NO_DROP,
   eCSSKeyword_vertical_text, NS_STYLE_CURSOR_VERTICAL_TEXT,
   eCSSKeyword_all_scroll, NS_STYLE_CURSOR_ALL_SCROLL,
   eCSSKeyword_nesw_resize, NS_STYLE_CURSOR_NESW_RESIZE,
   eCSSKeyword_nwse_resize, NS_STYLE_CURSOR_NWSE_RESIZE,
   eCSSKeyword_ns_resize, NS_STYLE_CURSOR_NS_RESIZE,
   eCSSKeyword_ew_resize, NS_STYLE_CURSOR_EW_RESIZE,
+  eCSSKeyword_none, NS_STYLE_CURSOR_NONE,
   // -moz- prefixed aliases for some CSS3 cursors for backward compat
   eCSSKeyword__moz_copy, NS_STYLE_CURSOR_COPY,
   eCSSKeyword__moz_alias, NS_STYLE_CURSOR_ALIAS,
   eCSSKeyword__moz_context_menu, NS_STYLE_CURSOR_CONTEXT_MENU,
   eCSSKeyword__moz_cell, NS_STYLE_CURSOR_CELL,
   // -moz- prefixed vendor specific
   eCSSKeyword__moz_grab, NS_STYLE_CURSOR_GRAB,
   eCSSKeyword__moz_grabbing, NS_STYLE_CURSOR_GRABBING,
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -831,17 +831,17 @@ var gCSSProperties = {
 		other_values: [ "url(404.wav)" ],
 		invalid_values: []
 	},
 	"cursor": {
 		domProp: "cursor",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "auto" ],
-		other_values: [ "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress" ],
+		other_values: [ "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress", "none" ],
 		invalid_values: []
 	},
 	"direction": {
 		domProp: "direction",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "ltr" ],
 		other_values: [ "rtl" ],
--- a/toolkit/library/xulrunos2.rc
+++ b/toolkit/library/xulrunos2.rc
@@ -44,11 +44,12 @@ POINTER IDC_CELL           "..\\..\\widg
 POINTER IDC_COPY           "..\\..\\widget\\src\\os2\\res\\copy.ptr"
 POINTER IDC_ALIAS          "..\\..\\widget\\src\\os2\\res\\aliasb.ptr"
 POINTER IDC_ZOOMIN         "..\\..\\widget\\src\\os2\\res\\zoom_in.ptr"
 POINTER IDC_ZOOMOUT        "..\\..\\widget\\src\\os2\\res\\zoom_out.ptr"
 
 POINTER IDC_ARROWWAIT      "..\\..\\widget\\src\\os2\\res\\arrow_wait.ptr"
 POINTER IDC_CROSS          "..\\..\\widget\\src\\os2\\res\\crosshair.ptr"
 POINTER IDC_HELP           "..\\..\\widget\\src\\os2\\res\\help.ptr"
+POINTER IDC_NONE           "..\\..\\widget\\src\\os2\\res\\help.ptr"
 
 ICON    IDC_DNDURL         "..\\..\\widget\\src\\os2\\res\\dndurl.ico"
 ICON    IDC_DNDTEXT        "..\\..\\widget\\src\\os2\\res\\dndtext.ico"
--- a/widget/public/nsIWidget.h
+++ b/widget/public/nsIWidget.h
@@ -201,16 +201,17 @@ enum nsCursor {   ///(normal cursor,    
                 eCursor_row_resize,
                 eCursor_no_drop,
                 eCursor_vertical_text,
                 eCursor_all_scroll,
                 eCursor_nesw_resize,
                 eCursor_nwse_resize,
                 eCursor_ns_resize,
                 eCursor_ew_resize,
+                eCursor_none,
                 // This one better be the last one in this list.
                 eCursorCount
                 }; 
 
 enum nsContentType {
   eContentTypeInherit = -1,
   eContentTypeUI = 0,
   eContentTypeContent = 1,
--- a/widget/src/beos/nsWindow.cpp
+++ b/widget/src/beos/nsWindow.cpp
@@ -1415,16 +1415,20 @@ NS_METHOD nsWindow::SetCursor(nsCursor a
 			case eCursor_ns_resize:
 				newCursor = (BCursor *)gCursorArray.SafeElementAt(2);
 				break;
 
 			case eCursor_ew_resize:
 				newCursor = (BCursor *)gCursorArray.SafeElementAt(1);
 				break;
 
+			case eCursor_none:
+				// XXX: No suitable cursor, needs implementing
+				break;
+
 			default:
 				NS_ASSERTION(0, "Invalid cursor type");
 				break;
 		}
 		NS_ASSERTION(newCursor != nsnull, "Cursor not stored in array properly!");
 		mCursor = aCursor;
 		be_app->SetCursor(newCursor, true);
 	}
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2114dfaee3acce126e79dc0de72edfa7cfc87e1b
GIT binary patch
literal 326
zc$~$>u?+w)2m`@~AyQMO%m~?kDPkga;H;OyF(RCD43>VYP*<7u^%d_*W-={@J$wg)
AnE(I)
--- a/widget/src/build/widget.rc
+++ b/widget/src/build/widget.rc
@@ -45,16 +45,17 @@ IDC_GRABBING            CURSOR  DISCARDA
 IDC_CELL                CURSOR  DISCARDABLE     "res/cell.cur"
 IDC_COPY                CURSOR  DISCARDABLE     "res/copy.cur"
 IDC_ALIAS               CURSOR  DISCARDABLE     "res/aliasb.cur"
 IDC_ZOOMIN              CURSOR  DISCARDABLE     "res/zoom_in.cur"
 IDC_ZOOMOUT             CURSOR  DISCARDABLE     "res/zoom_out.cur"
 IDC_COLRESIZE           CURSOR  DISCARDABLE     "res/col_resize.cur"
 IDC_ROWRESIZE           CURSOR  DISCARDABLE     "res/row_resize.cur"
 IDC_VERTICALTEXT        CURSOR  DISCARDABLE     "res/vertical_text.cur"
+IDC_NONE                CURSOR  DISCARDABLE     "res/none.cur"
 
 OPTPROPSHEET DIALOG DISCARDABLE  32, 32, 288, 226
 STYLE DS_MODALFRAME | DS_3DLOOK | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | 
     WS_CAPTION | WS_SYSMENU
 CAPTION "Options"
 FONT 8, "MS Sans Serif"
 BEGIN
 
--- a/widget/src/cocoa/nsCursorManager.mm
+++ b/widget/src/cocoa/nsCursorManager.mm
@@ -194,16 +194,23 @@ static nsCursorManager *gInstance;
   return self;
 }
 
 - (void) setCursor: (enum nsCursor) aCursor
 {
   if (aCursor != mCurrentCursor) {
     [[self getCursor: mCurrentCursor] unset];
     [[self getCursor: aCursor] set];
+
+    if (aCursor == eCursor_none) {
+      [NSCursor hide];
+    } else if (mCurrentCursor == eCursor_none) {
+      [NSCursor unhide];
+    }
+
     mCurrentCursor = aCursor;
   }
 }
 
 - (nsMacCursor *) getCursor: (enum nsCursor) aCursor
 {
   nsMacCursor * result = [mCursors objectForKey: [NSNumber numberWithInt: aCursor]];
   if (!result) {
--- a/widget/src/gtk2/nsGtkCursors.h
+++ b/widget/src/gtk2/nsGtkCursors.h
@@ -421,31 +421,59 @@ static const unsigned char moz_nwse_resi
   0x00, 0xfe, 0x01, 0x00, 0x00, 0xff, 0x01, 0x00, 0xc0, 0xff, 0x01, 0x00,
   0xc0, 0xff, 0x01, 0x00, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
 
+/* MOZ_CURSOR_NONE */
+static const unsigned char moz_none_bits[] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+static const unsigned char moz_none_mask_bits[] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
 enum {
   MOZ_CURSOR_HAND_GRAB,
   MOZ_CURSOR_HAND_GRABBING,
   MOZ_CURSOR_COPY,
   MOZ_CURSOR_ALIAS,
   MOZ_CURSOR_CONTEXT_MENU,
   MOZ_CURSOR_SPINNING,
   MOZ_CURSOR_ZOOM_IN,
   MOZ_CURSOR_ZOOM_OUT,
   MOZ_CURSOR_NOT_ALLOWED,
   MOZ_CURSOR_COL_RESIZE,
   MOZ_CURSOR_ROW_RESIZE,
   MOZ_CURSOR_VERTICAL_TEXT,
   MOZ_CURSOR_NESW_RESIZE,
-  MOZ_CURSOR_NWSE_RESIZE
+  MOZ_CURSOR_NWSE_RESIZE,
+  MOZ_CURSOR_NONE
 };
 
 // create custom pixmap cursor from cursors in nsGTKCursorData.h
 static const nsGtkCursor GtkCursors[] = {
   { moz_hand_grab_bits,      moz_hand_grab_mask_bits,      10, 10 },
   { moz_hand_grabbing_bits,  moz_hand_grabbing_mask_bits,  10, 10 },
   { moz_copy_bits,           moz_copy_mask_bits,           2,  2  },
   { moz_alias_bits,          moz_alias_mask_bits,          2,  2  },
@@ -453,12 +481,13 @@ static const nsGtkCursor GtkCursors[] = 
   { moz_spinning_bits,       moz_spinning_mask_bits,       2,  2  },
   { moz_zoom_in_bits,        moz_zoom_in_mask_bits,        6,  6  },
   { moz_zoom_out_bits,       moz_zoom_out_mask_bits,       6,  6  },
   { moz_not_allowed_bits,    moz_not_allowed_mask_bits,    9,  9  },
   { moz_col_resize_bits,     moz_col_resize_mask_bits,     9,  7  },
   { moz_row_resize_bits,     moz_row_resize_mask_bits,     7,  9  },
   { moz_vertical_text_bits,  moz_vertical_text_mask_bits,  8,  4  },
   { moz_nesw_resize_bits,    moz_nesw_resize_mask_bits,    8,  8  },
-  { moz_nwse_resize_bits,    moz_nwse_resize_mask_bits,    8,  8  }
+  { moz_nwse_resize_bits,    moz_nwse_resize_mask_bits,    8,  8  },
+  { moz_none_bits,           moz_none_mask_bits,           0,  0  }
 };
 
 #endif /* nsGtkCursors_h__ */
--- a/widget/src/gtk2/nsWindow.cpp
+++ b/widget/src/gtk2/nsWindow.cpp
@@ -4351,16 +4351,19 @@ get_gtk_cursor(nsCursor aCursor)
         newType = MOZ_CURSOR_NWSE_RESIZE;
         break;
     case eCursor_ns_resize:
         gdkcursor = gdk_cursor_new(GDK_SB_V_DOUBLE_ARROW);
         break;
     case eCursor_ew_resize:
         gdkcursor = gdk_cursor_new(GDK_SB_H_DOUBLE_ARROW);
         break;
+    case eCursor_none:
+        newType = MOZ_CURSOR_NONE;
+        break;
     default:
         NS_ASSERTION(aCursor, "Invalid cursor type");
         gdkcursor = gdk_cursor_new(GDK_LEFT_PTR);
         break;
     }
 
     // if by now we don't have a xcursor, this means we have to make a
     // custom one
--- a/widget/src/os2/nsWindow.cpp
+++ b/widget/src/os2/nsWindow.cpp
@@ -1802,16 +1802,20 @@ NS_METHOD nsWindow::SetCursor(nsCursor a
     case eCursor_ns_resize:
       newPointer = ::WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZENS, FALSE);
       break;
   
     case eCursor_ew_resize:
       newPointer = ::WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZEWE, FALSE);
       break;
   
+    case eCursor_none:
+      newPointer = gPtrArray[IDC_NONE-IDC_BASE];
+      break;
+  
     default:
       NS_ASSERTION(0, "Invalid cursor type");
       break;
   }
 
   if (newPointer) {
     WinSetPointer(HWND_DESKTOP, newPointer);
   }
--- a/widget/src/os2/wdgtos2rc.h
+++ b/widget/src/os2/wdgtos2rc.h
@@ -43,21 +43,22 @@
 #define IDC_CELL                        4103
 #define IDC_COPY                        4104
 #define IDC_ALIAS                       4105
 #define IDC_ZOOMIN                      4106
 #define IDC_ZOOMOUT                     4107
 #define IDC_COLRESIZE                   4108
 #define IDC_ROWRESIZE                   4109
 #define IDC_VERTICALTEXT                4110
+#define IDC_NONE                        4112
 
 /* OS/2 specific */
-#define IDC_ARROWWAIT                   4111
-#define IDC_CROSS                       4112
-#define IDC_HELP                        4113
+#define IDC_ARROWWAIT                   4113
+#define IDC_CROSS                       4114
+#define IDC_HELP                        4115
 
 #define IDC_COUNT IDC_HELP-IDC_BASE+1
 
 /* drag & drop icons */
 #define IDC_DNDBASE                     4150
 #define IDC_DNDURL                      4150
 #define IDC_DNDTEXT                     4151
 
--- a/widget/src/os2/widget.rc
+++ b/widget/src/os2/widget.rc
@@ -47,12 +47,13 @@ POINTER IDC_ZOOMIN         res\zoom_in.p
 POINTER IDC_ZOOMOUT        res\zoom_out.ptr
 POINTER IDC_COLRESIZE      res\col_resize.ptr
 POINTER IDC_ROWRESIZE      res\row_resize.ptr
 POINTER IDC_VERTICALTEXT   res\vertical_text.ptr
 
 POINTER IDC_ARROWWAIT      res\arrow_wait.ptr
 POINTER IDC_CROSS          res\crosshair.ptr
 POINTER IDC_HELP           res\help.ptr
+POINTER IDC_NONE           res\help.ptr
 
 ICON    IDC_DNDURL         res\dndurl.ico
 ICON    IDC_DNDTEXT        res\dndtext.ico
 
--- a/widget/src/windows/nsWindow.cpp
+++ b/widget/src/windows/nsWindow.cpp
@@ -2495,16 +2495,20 @@ NS_METHOD nsWindow::SetCursor(nsCursor a
     case eCursor_ns_resize:
       newCursor = ::LoadCursor(NULL, IDC_SIZENS);
       break;
 
     case eCursor_ew_resize:
       newCursor = ::LoadCursor(NULL, IDC_SIZEWE);
       break;
 
+    case eCursor_none:
+      newCursor = ::LoadCursor(nsToolkit::mDllInstance, MAKEINTRESOURCE(IDC_NONE));
+      break;
+
     default:
       NS_ERROR("Invalid cursor type");
       break;
   }
 
   if (NULL != newCursor) {
     mCursor = aCursor;
     HCURSOR oldCursor = ::SetCursor(newCursor);
--- a/widget/src/windows/resource.h
+++ b/widget/src/windows/resource.h
@@ -40,9 +40,9 @@
 #define IDC_COPY                        4104
 #define IDC_ALIAS                       4105
 #define IDC_ZOOMIN                      4106
 #define IDC_ZOOMOUT                     4107
 #define IDC_COLRESIZE                   4108
 #define IDC_ROWRESIZE                   4109
 #define IDC_VERTICALTEXT                4110
 #define IDC_DUMMY_CE_MENUBAR            4111
-
+#define IDC_NONE                        4112
--- a/xulrunner/app/splash.rc
+++ b/xulrunner/app/splash.rc
@@ -67,21 +67,23 @@ END
 #define IDC_CELL                        4103
 #define IDC_COPY                        4104
 #define IDC_ALIAS                       4105
 #define IDC_ZOOMIN                      4106
 #define IDC_ZOOMOUT                     4107
 #define IDC_COLRESIZE                   4108
 #define IDC_ROWRESIZE                   4109
 #define IDC_VERTICALTEXT                4110
+#define IDC_NONE                        4112
 
 IDC_GRAB                CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\grab.cur"
 IDC_GRABBING            CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\grabbing.cur"
 IDC_CELL                CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\cell.cur"
 IDC_COPY                CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\copy.cur"
 IDC_ALIAS               CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\aliasb.cur"
 IDC_ZOOMIN              CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\zoom_in.cur"
 IDC_ZOOMOUT             CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\zoom_out.cur"
 IDC_COLRESIZE           CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\col_resize.cur"
 IDC_ROWRESIZE           CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\row_resize.cur"
 IDC_VERTICALTEXT        CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\vertical_text.cur"
+IDC_NONE                CURSOR  DISCARDABLE     "..\\..\\widget\\src\\build\\res\\none.cur"
 
 #endif
--- a/xulrunner/app/splashos2.rc
+++ b/xulrunner/app/splashos2.rc
@@ -66,12 +66,13 @@ POINTER IDC_CELL           "..\\..\\widg
 POINTER IDC_COPY           "..\\..\\widget\\src\\os2\\res\\copy.ptr"
 POINTER IDC_ALIAS          "..\\..\\widget\\src\\os2\\res\\aliasb.ptr"
 POINTER IDC_ZOOMIN         "..\\..\\widget\\src\\os2\\res\\zoom_in.ptr"
 POINTER IDC_ZOOMOUT        "..\\..\\widget\\src\\os2\\res\\zoom_out.ptr"
 
 POINTER IDC_ARROWWAIT      "..\\..\\widget\\src\\os2\\res\\arrow_wait.ptr"
 POINTER IDC_CROSS          "..\\..\\widget\\src\\os2\\res\\crosshair.ptr"
 POINTER IDC_HELP           "..\\..\\widget\\src\\os2\\res\\help.ptr"
+POINTER IDC_NONE           "..\\..\\widget\\src\\os2\\res\\help.ptr"
 
 ICON    IDC_DNDURL         "..\\..\\widget\\src\\os2\\res\\dndurl.ico"
 ICON    IDC_DNDTEXT        "..\\..\\widget\\src\\os2\\res\\dndtext.ico"
 #endif