servo: Merge #11696 - use less repetitive name (from mrmiywj:rename-to-less-repetitive); r=ConnorGBrewster
authormrmiywj <jsyangwenjie@gmail.com>
Sun, 12 Jun 2016 14:47:02 -0500
changeset 339068 cfbdca3fad9d854d8594e9e4abf8fe388f680b63
parent 339067 a3f72bb20af7b58e2014e03e190d627ec916ec40
child 339069 4c99d625f7d042c1176631351a06cc28ddb2672f
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersConnorGBrewster
servo: Merge #11696 - use less repetitive name (from mrmiywj:rename-to-less-repetitive); r=ConnorGBrewster <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11689 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because just renaming <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: b5115fc895bb40bce52d39de65a07160935b15fd
servo/components/layout/display_list_builder.rs
servo/components/layout/query.rs
servo/components/style_traits/cursor.rs
servo/ports/cef/window.rs
servo/ports/geckolib/properties.mako.rs
servo/ports/glutin/window.rs
--- a/servo/components/layout/display_list_builder.rs
+++ b/servo/components/layout/display_list_builder.rs
@@ -372,17 +372,17 @@ impl FragmentDisplayListBuilding for Fra
                 bounds.size.width = bounds.size.width - border_padding.horizontal();
                 bounds.size.height = bounds.size.height - border_padding.vertical();
             }
         }
 
         let base = state.create_base_display_item(&bounds,
                                                   &clip,
                                                   self.node,
-                                                  style.get_cursor(Cursor::DefaultCursor),
+                                                  style.get_cursor(Cursor::Default),
                                                   display_list_section);
         state.add_display_item(
             DisplayItem::SolidColorClass(box SolidColorDisplayItem {
                 base: base,
                 color: background_color.to_gfx_color(),
             }));
 
         // The background image is painted on top of the background color.
@@ -564,17 +564,17 @@ impl FragmentDisplayListBuilding for Fra
                                                   image_size.height.to_nearest_px() as u32);
                 }
             };
 
             // Create the image display item.
             let base = state.create_base_display_item(&bounds,
                                                       &clip,
                                                       self.node,
-                                                      style.get_cursor(Cursor::DefaultCursor),
+                                                      style.get_cursor(Cursor::Default),
                                                       display_list_section);
             state.add_display_item(DisplayItem::ImageClass(box ImageDisplayItem {
                 base: base,
                 webrender_image: webrender_image,
                 image_data: image_data.map(Arc::new),
                 stretch_size: Size2D::new(image_size.width, image_size.height),
                 image_rendering: style.get_inheritedbox().image_rendering.clone(),
             }));
@@ -692,17 +692,17 @@ impl FragmentDisplayListBuilding for Fra
         }
 
         let center = Point2D::new(absolute_bounds.origin.x + absolute_bounds.size.width / 2,
                                   absolute_bounds.origin.y + absolute_bounds.size.height / 2);
 
         let base = state.create_base_display_item(absolute_bounds,
                                                   &clip,
                                                   self.node,
-                                                  style.get_cursor(Cursor::DefaultCursor),
+                                                  style.get_cursor(Cursor::Default),
                                                   display_list_section);
         let gradient_display_item = DisplayItem::GradientClass(box GradientDisplayItem {
             base: base,
             start_point: center - delta,
             end_point: center + delta,
             stops: stops,
         });
 
@@ -722,17 +722,17 @@ impl FragmentDisplayListBuilding for Fra
                                                                        box_shadow.offset_y)),
                               box_shadow.blur_radius,
                               box_shadow.spread_radius);
 
             // TODO(pcwalton): Multiple border radii; elliptical border radii.
             let base = state.create_base_display_item(&bounds,
                                                       &clip,
                                                       self.node,
-                                                      style.get_cursor(Cursor::DefaultCursor),
+                                                      style.get_cursor(Cursor::Default),
                                                       display_list_section);
             state.add_display_item(DisplayItem::BoxShadowClass(box BoxShadowDisplayItem {
                 base: base,
                 box_bounds: *absolute_bounds,
                 color: style.resolve_color(box_shadow.color).to_gfx_color(),
                 offset: Point2D::new(box_shadow.offset_x, box_shadow.offset_y),
                 blur_radius: box_shadow.blur_radius,
                 spread_radius: box_shadow.spread_radius,
@@ -794,17 +794,17 @@ impl FragmentDisplayListBuilding for Fra
         if let BorderPaintingMode::Collapse(collapsed_borders) = border_painting_mode {
             collapsed_borders.adjust_border_bounds_for_painting(&mut bounds, style.writing_mode)
         }
 
         // Append the border to the display list.
         let base = state.create_base_display_item(&bounds,
                                                   &clip,
                                                   self.node,
-                                                  style.get_cursor(Cursor::DefaultCursor),
+                                                  style.get_cursor(Cursor::Default),
                                                   display_list_section);
         state.add_display_item(DisplayItem::BorderClass(box BorderDisplayItem {
             base: base,
             border_widths: border.to_physical(style.writing_mode),
             color: SideOffsets2D::new(colors.top.to_gfx_color(),
                                       colors.right.to_gfx_color(),
                                       colors.bottom.to_gfx_color(),
                                       colors.left.to_gfx_color()),
@@ -837,17 +837,17 @@ impl FragmentDisplayListBuilding for Fra
         bounds.size.width = bounds.size.width + offset + offset;
         bounds.size.height = bounds.size.height + offset + offset;
 
         // Append the outline to the display list.
         let color = style.resolve_color(style.get_outline().outline_color).to_gfx_color();
         let base = state.create_base_display_item(&bounds,
                                                   &clip,
                                                   self.node,
-                                                  style.get_cursor(Cursor::DefaultCursor),
+                                                  style.get_cursor(Cursor::Default),
                                                   DisplayListSection::Outlines);
         state.add_display_item(DisplayItem::BorderClass(box BorderDisplayItem {
             base: base,
             border_widths: SideOffsets2D::new_all_same(width),
             color: SideOffsets2D::new_all_same(color),
             style: SideOffsets2D::new_all_same(outline_style),
             radius: Default::default(),
         }));
@@ -862,17 +862,17 @@ impl FragmentDisplayListBuilding for Fra
                                                  clip: &ClippingRegion) {
         // FIXME(pcwalton, #2795): Get the real container size.
         let container_size = Size2D::zero();
 
         // Compute the text fragment bounds and draw a border surrounding them.
         let base = state.create_base_display_item(stacking_relative_border_box,
                                                   clip,
                                                   self.node,
-                                                  style.get_cursor(Cursor::DefaultCursor),
+                                                  style.get_cursor(Cursor::Default),
                                                   DisplayListSection::Content);
         state.add_display_item(DisplayItem::BorderClass(box BorderDisplayItem {
             base: base,
             border_widths: SideOffsets2D::new_all_same(Au::from_px(1)),
             color: SideOffsets2D::new_all_same(color::rgb(0, 0, 200)),
             style: SideOffsets2D::new_all_same(border_style::T::solid),
             radius: Default::default(),
         }));
@@ -883,34 +883,34 @@ impl FragmentDisplayListBuilding for Fra
                                                       container_size);
         baseline.start.b = baseline.start.b + text_fragment.run.ascent();
         baseline.size.block = Au(0);
         let baseline = baseline.to_physical(self.style.writing_mode, container_size);
 
         let base = state.create_base_display_item(&baseline,
                                                   clip,
                                                   self.node,
-                                                  style.get_cursor(Cursor::DefaultCursor),
+                                                  style.get_cursor(Cursor::Default),
                                                   DisplayListSection::Content);
         state.add_display_item(DisplayItem::LineClass(box LineDisplayItem {
             base: base,
             color: color::rgb(0, 200, 0),
             style: border_style::T::dashed,
         }));
     }
 
     fn build_debug_borders_around_fragment(&self,
                                            state: &mut DisplayListBuildState,
                                            stacking_relative_border_box: &Rect<Au>,
                                            clip: &ClippingRegion) {
         // This prints a debug border around the border of this fragment.
         let base = state.create_base_display_item(stacking_relative_border_box,
                                                   clip,
                                                   self.node,
-                                                  self.style.get_cursor(Cursor::DefaultCursor),
+                                                  self.style.get_cursor(Cursor::Default),
                                                   DisplayListSection::Content);
         state.add_display_item(DisplayItem::BorderClass(box BorderDisplayItem {
             base: base,
             border_widths: SideOffsets2D::new_all_same(Au::from_px(1)),
             color: SideOffsets2D::new_all_same(color::rgb(0, 0, 200)),
             style: SideOffsets2D::new_all_same(border_style::T::solid),
             radius: Default::default(),
         }));
@@ -951,17 +951,17 @@ impl FragmentDisplayListBuilding for Fra
         //
         // TODO: Allow non-text fragments to be selected too.
         if scanned_text_fragment_info.selected() {
             let style = self.selected_style();
             let background_color = style.resolve_color(style.get_background().background_color);
             let base = state.create_base_display_item(stacking_relative_border_box,
                                                       &clip,
                                                       self.node,
-                                                      self.style.get_cursor(Cursor::DefaultCursor),
+                                                      self.style.get_cursor(Cursor::Default),
                                                       display_list_section);
             state.add_display_item(
                 DisplayItem::SolidColorClass(box SolidColorDisplayItem {
                     base: base,
                     color: background_color.to_gfx_color(),
             }));
         }
 
@@ -976,24 +976,24 @@ impl FragmentDisplayListBuilding for Fra
         let insertion_point_bounds;
         let cursor;
         if !self.style.writing_mode.is_vertical() {
             insertion_point_bounds =
                 Rect::new(Point2D::new(stacking_relative_border_box.origin.x + advance,
                                        stacking_relative_border_box.origin.y),
                           Size2D::new(INSERTION_POINT_LOGICAL_WIDTH,
                                       stacking_relative_border_box.size.height));
-            cursor = Cursor::TextCursor;
+            cursor = Cursor::Text;
         } else {
             insertion_point_bounds =
                 Rect::new(Point2D::new(stacking_relative_border_box.origin.x,
                                        stacking_relative_border_box.origin.y + advance),
                           Size2D::new(stacking_relative_border_box.size.width,
                                       INSERTION_POINT_LOGICAL_WIDTH));
-            cursor = Cursor::VerticalTextCursor;
+            cursor = Cursor::VerticalText;
         };
 
         let base = state.create_base_display_item(&insertion_point_bounds,
                                                   &clip,
                                                   self.node,
                                                   self.style.get_cursor(cursor),
                                                   display_list_section);
         state.add_display_item(DisplayItem::SolidColorClass(box SolidColorDisplayItem {
@@ -1203,17 +1203,17 @@ impl FragmentDisplayListBuilding for Fra
                 }
             }
             SpecificFragmentInfo::Iframe(ref fragment_info) => {
                 if !stacking_relative_content_box.is_empty() {
                     let base = state.create_base_display_item(
                         &stacking_relative_content_box,
                         clip,
                         self.node,
-                        self.style.get_cursor(Cursor::DefaultCursor),
+                        self.style.get_cursor(Cursor::Default),
                         DisplayListSection::Content);
                     let item = DisplayItem::IframeClass(box IframeDisplayItem {
                         base: base,
                         iframe: fragment_info.pipeline_id,
                     });
 
                     if opts::get().use_webrender {
                         state.add_display_item(item);
@@ -1230,17 +1230,17 @@ impl FragmentDisplayListBuilding for Fra
             }
             SpecificFragmentInfo::Image(ref mut image_fragment) => {
                 // Place the image into the display list.
                 if let Some(ref image) = image_fragment.image {
                     let base = state.create_base_display_item(
                         &stacking_relative_content_box,
                         clip,
                         self.node,
-                        self.style.get_cursor(Cursor::DefaultCursor),
+                        self.style.get_cursor(Cursor::Default),
                         DisplayListSection::Content);
                     state.add_display_item(DisplayItem::ImageClass(box ImageDisplayItem {
                         base: base,
                         webrender_image: WebRenderImageInfo::from_image(image),
                         image_data: Some(Arc::new(image.bytes.clone())),
                         stretch_size: stacking_relative_content_box.size,
                         image_rendering: self.style.get_inheritedbox().image_rendering.clone(),
                     }));
@@ -1266,17 +1266,17 @@ impl FragmentDisplayListBuilding for Fra
                         },
                         None => return,
                     };
 
                     let base = state.create_base_display_item(
                         &stacking_relative_content_box,
                         clip,
                         self.node,
-                        self.style.get_cursor(Cursor::DefaultCursor),
+                        self.style.get_cursor(Cursor::Default),
                         DisplayListSection::Content);
                     let display_item = match canvas_data {
                         CanvasData::Pixels(canvas_data) => {
                             DisplayItem::ImageClass(box ImageDisplayItem {
                                 base: base,
                                 image_data: Some(Arc::new(canvas_data.image_data)),
                                 webrender_image: WebRenderImageInfo {
                                     width: computed_width as u32,
@@ -1540,22 +1540,22 @@ impl FragmentDisplayListBuilding for Fra
                                             text_color: RGBA,
                                             stacking_relative_content_box: &Rect<Au>,
                                             shadow_blur_radius: Option<Au>,
                                             offset: &Point2D<Au>,
                                             clip: &ClippingRegion) {
         // Determine the orientation and cursor to use.
         let (orientation, cursor) = if self.style.writing_mode.is_vertical() {
             if self.style.writing_mode.is_sideways_left() {
-                (TextOrientation::SidewaysLeft, Cursor::VerticalTextCursor)
+                (TextOrientation::SidewaysLeft, Cursor::VerticalText)
             } else {
-                (TextOrientation::SidewaysRight, Cursor::VerticalTextCursor)
+                (TextOrientation::SidewaysRight, Cursor::VerticalText)
             }
         } else {
-            (TextOrientation::Upright, Cursor::TextCursor)
+            (TextOrientation::Upright, Cursor::Text)
         };
 
         // Compute location of the baseline.
         //
         // FIXME(pcwalton): Get the real container size.
         let container_size = Size2D::zero();
         let metrics = &text_fragment.run.font_metrics;
         let stacking_relative_content_box = stacking_relative_content_box.translate(offset);
@@ -1644,17 +1644,17 @@ impl FragmentDisplayListBuilding for Fra
         // FIXME(pcwalton, #2795): Get the real container size.
         let container_size = Size2D::zero();
         let stacking_relative_box = stacking_relative_box.to_physical(self.style.writing_mode,
                                                                       container_size);
         let base = state.create_base_display_item(
             &shadow_bounds(&stacking_relative_box, blur_radius, Au(0)),
             clip,
             self.node,
-            self.style.get_cursor(Cursor::DefaultCursor),
+            self.style.get_cursor(Cursor::Default),
             DisplayListSection::Content);
         state.add_display_item(DisplayItem::BoxShadowClass(box BoxShadowDisplayItem {
             base: base,
             box_bounds: stacking_relative_box,
             color: color.to_gfx_color(),
             offset: Point2D::zero(),
             blur_radius: blur_radius,
             spread_radius: Au(0),
--- a/servo/components/layout/query.rs
+++ b/servo/components/layout/query.rs
@@ -69,17 +69,17 @@ impl LayoutRPC for LayoutRPCImpl {
     /// Requests the node containing the point of interest.
     fn hit_test(&self) -> HitTestResponse {
         let &LayoutRPCImpl(ref rw_data) = self;
         let rw_data = rw_data.lock().unwrap();
         let &(ref result, update_cursor) = &rw_data.hit_test_response;
         if update_cursor {
             // Compute the new cursor.
             let cursor = match *result {
-                None => Cursor::DefaultCursor,
+                None => Cursor::Default,
                 Some(dim) => dim.pointing.unwrap(),
             };
             rw_data.constellation_chan.send(ConstellationMsg::SetCursor(cursor)).unwrap();
         }
         HitTestResponse {
             node_address: result.map(|dim| dim.node.to_untrusted_node_address()),
         }
     }
--- a/servo/components/style_traits/cursor.rs
+++ b/servo/components/style_traits/cursor.rs
@@ -30,44 +30,44 @@ macro_rules! define_cursor {
                 }
             }
         }
     }
 }
 
 
 define_cursor! {
-    "none" => NoCursor = 0,
-    "default" => DefaultCursor = 1,
-    "pointer" => PointerCursor = 2,
-    "context-menu" => ContextMenuCursor = 3,
-    "help" => HelpCursor = 4,
-    "progress" => ProgressCursor = 5,
-    "wait" => WaitCursor = 6,
-    "cell" => CellCursor = 7,
-    "crosshair" => CrosshairCursor = 8,
-    "text" => TextCursor = 9,
-    "vertical-text" => VerticalTextCursor = 10,
-    "alias" => AliasCursor = 11,
-    "copy" => CopyCursor = 12,
-    "move" => MoveCursor = 13,
-    "no-drop" => NoDropCursor = 14,
-    "not-allowed" => NotAllowedCursor = 15,
-    "grab" => GrabCursor = 16,
-    "grabbing" => GrabbingCursor = 17,
-    "e-resize" => EResizeCursor = 18,
-    "n-resize" => NResizeCursor = 19,
-    "ne-resize" => NeResizeCursor = 20,
-    "nw-resize" => NwResizeCursor = 21,
-    "s-resize" => SResizeCursor = 22,
-    "se-resize" => SeResizeCursor = 23,
-    "sw-resize" => SwResizeCursor = 24,
-    "w-resize" => WResizeCursor = 25,
-    "ew-resize" => EwResizeCursor = 26,
-    "ns-resize" => NsResizeCursor = 27,
-    "nesw-resize" => NeswResizeCursor = 28,
-    "nwse-resize" => NwseResizeCursor = 29,
-    "col-resize" => ColResizeCursor = 30,
-    "row-resize" => RowResizeCursor = 31,
-    "all-scroll" => AllScrollCursor = 32,
-    "zoom-in" => ZoomInCursor = 33,
-    "zoom-out" => ZoomOutCursor = 34,
+    "none" => None = 0,
+    "default" => Default = 1,
+    "pointer" => Pointer = 2,
+    "context-menu" => ContextMenu = 3,
+    "help" => Help = 4,
+    "progress" => Progress = 5,
+    "wait" => Wait = 6,
+    "cell" => Cell = 7,
+    "crosshair" => Crosshair = 8,
+    "text" => Text = 9,
+    "vertical-text" => VerticalText = 10,
+    "alias" => Alias = 11,
+    "copy" => Copy = 12,
+    "move" => Move = 13,
+    "no-drop" => NoDrop = 14,
+    "not-allowed" => NotAllowed = 15,
+    "grab" => Grab = 16,
+    "grabbing" => Grabbing = 17,
+    "e-resize" => EResize = 18,
+    "n-resize" => NResize = 19,
+    "ne-resize" => NeResize = 20,
+    "nw-resize" => NwResize = 21,
+    "s-resize" => SResize = 22,
+    "se-resize" => SeResize = 23,
+    "sw-resize" => SwResize = 24,
+    "w-resize" => WResize = 25,
+    "ew-resize" => EwResize = 26,
+    "ns-resize" => NsResize = 27,
+    "nesw-resize" => NeswResize = 28,
+    "nwse-resize" => NwseResize = 29,
+    "col-resize" => ColResize = 30,
+    "row-resize" => RowResize = 31,
+    "all-scroll" => AllScroll = 32,
+    "zoom-in" => ZoomIn = 33,
+    "zoom-out" => ZoomOut = 34,
 }
--- a/servo/ports/cef/window.rs
+++ b/servo/ports/cef/window.rs
@@ -100,70 +100,70 @@ impl Window {
 
     /// Currently unimplemented.
     pub fn wait_events(&self) -> Vec<WindowEvent> {
         vec![WindowEvent::Idle]
     }
 
     fn cursor_type_for_cursor(&self, cursor: Cursor) -> cef_cursor_type_t {
         match cursor {
-            Cursor::NoCursor => return cef_cursor_type_t::CT_NONE,
-            Cursor::ContextMenuCursor => return cef_cursor_type_t::CT_CONTEXTMENU,
-            Cursor::GrabbingCursor => return cef_cursor_type_t::CT_GRABBING,
-            Cursor::CrosshairCursor => return cef_cursor_type_t::CT_CROSS,
-            Cursor::CopyCursor => return cef_cursor_type_t::CT_COPY,
-            Cursor::AliasCursor => return cef_cursor_type_t::CT_ALIAS,
-            Cursor::TextCursor => return cef_cursor_type_t::CT_IBEAM,
-            Cursor::GrabCursor | Cursor::AllScrollCursor =>
+            Cursor::None => return cef_cursor_type_t::CT_NONE,
+            Cursor::ContextMenu => return cef_cursor_type_t::CT_CONTEXTMENU,
+            Cursor::Grabbing => return cef_cursor_type_t::CT_GRABBING,
+            Cursor::Crosshair => return cef_cursor_type_t::CT_CROSS,
+            Cursor::Copy => return cef_cursor_type_t::CT_COPY,
+            Cursor::Alias => return cef_cursor_type_t::CT_ALIAS,
+            Cursor::Text => return cef_cursor_type_t::CT_IBEAM,
+            Cursor::Grab | Cursor::AllScroll =>
                 return cef_cursor_type_t::CT_GRAB,
-            Cursor::NoDropCursor => return cef_cursor_type_t::CT_NODROP,
-            Cursor::NotAllowedCursor => return cef_cursor_type_t::CT_NOTALLOWED,
-            Cursor::PointerCursor => return cef_cursor_type_t::CT_POINTER,
-            Cursor::SResizeCursor => return cef_cursor_type_t::CT_SOUTHRESIZE,
-            Cursor::WResizeCursor => return cef_cursor_type_t::CT_WESTRESIZE,
-            Cursor::EwResizeCursor => return cef_cursor_type_t::CT_EASTWESTRESIZE,
-            Cursor::ColResizeCursor => return cef_cursor_type_t::CT_COLUMNRESIZE,
-            Cursor::EResizeCursor => return cef_cursor_type_t::CT_EASTRESIZE,
-            Cursor::NResizeCursor => return cef_cursor_type_t::CT_NORTHRESIZE,
-            Cursor::NsResizeCursor => return cef_cursor_type_t::CT_NORTHSOUTHRESIZE,
-            Cursor::RowResizeCursor => return cef_cursor_type_t::CT_ROWRESIZE,
-            Cursor::VerticalTextCursor => return cef_cursor_type_t::CT_VERTICALTEXT,
+            Cursor::NoDrop => return cef_cursor_type_t::CT_NODROP,
+            Cursor::NotAllowed => return cef_cursor_type_t::CT_NOTALLOWED,
+            Cursor::Pointer => return cef_cursor_type_t::CT_POINTER,
+            Cursor::SResize => return cef_cursor_type_t::CT_SOUTHRESIZE,
+            Cursor::WResize => return cef_cursor_type_t::CT_WESTRESIZE,
+            Cursor::EwResize => return cef_cursor_type_t::CT_EASTWESTRESIZE,
+            Cursor::ColResize => return cef_cursor_type_t::CT_COLUMNRESIZE,
+            Cursor::EResize => return cef_cursor_type_t::CT_EASTRESIZE,
+            Cursor::NResize => return cef_cursor_type_t::CT_NORTHRESIZE,
+            Cursor::NsResize => return cef_cursor_type_t::CT_NORTHSOUTHRESIZE,
+            Cursor::RowResize => return cef_cursor_type_t::CT_ROWRESIZE,
+            Cursor::VerticalText => return cef_cursor_type_t::CT_VERTICALTEXT,
             _ => return cef_cursor_type_t::CT_POINTER,
         }
     }
 
     /// Returns the Cocoa cursor for a CSS cursor. These match Firefox, except where Firefox
     /// bundles custom resources (which we don't yet do).
     #[cfg(target_os="macos")]
     fn cursor_handle_for_cursor(&self, cursor: Cursor) -> cef_cursor_handle_t {
         use cocoa::base::class;
 
         unsafe {
             match cursor {
-                Cursor::NoCursor => return 0 as cef_cursor_handle_t,
-                Cursor::ContextMenuCursor => msg_send![class("NSCursor"), contextualMenuCursor],
-                Cursor::GrabbingCursor => msg_send![class("NSCursor"), closedHandCursor],
-                Cursor::CrosshairCursor => msg_send![class("NSCursor"), crosshairCursor],
-                Cursor::CopyCursor => msg_send![class("NSCursor"), dragCopyCursor],
-                Cursor::AliasCursor => msg_send![class("NSCursor"), dragLinkCursor],
-                Cursor::TextCursor => msg_send![class("NSCursor"), IBeamCursor],
-                Cursor::GrabCursor | Cursor::AllScrollCursor =>
+                Cursor::None => return 0 as cef_cursor_handle_t,
+                Cursor::ContextMenu => msg_send![class("NSCursor"), contextualMenuCursor],
+                Cursor::Grabbing => msg_send![class("NSCursor"), closedHandCursor],
+                Cursor::Crosshair => msg_send![class("NSCursor"), crosshairCursor],
+                Cursor::Copy => msg_send![class("NSCursor"), dragCopyCursor],
+                Cursor::Alias => msg_send![class("NSCursor"), dragLinkCursor],
+                Cursor::Text => msg_send![class("NSCursor"), IBeamCursor],
+                Cursor::Grab | Cursor::AllScroll =>
                     msg_send![class("NSCursor"), openHandCursor],
-                Cursor::NoDropCursor | Cursor::NotAllowedCursor =>
+                Cursor::NoDrop | Cursor::NotAllowed =>
                     msg_send![class("NSCursor"), operationNotAllowedCursor],
-                Cursor::PointerCursor => msg_send![class("NSCursor"), pointingHandCursor],
-                Cursor::SResizeCursor => msg_send![class("NSCursor"), resizeDownCursor],
-                Cursor::WResizeCursor => msg_send![class("NSCursor"), resizeLeftCursor],
-                Cursor::EwResizeCursor | Cursor::ColResizeCursor =>
+                Cursor::Pointer => msg_send![class("NSCursor"), pointingHandCursor],
+                Cursor::SResize => msg_send![class("NSCursor"), resizeDownCursor],
+                Cursor::WResize => msg_send![class("NSCursor"), resizeLeftCursor],
+                Cursor::EwResize | Cursor::ColResize =>
                     msg_send![class("NSCursor"), resizeLeftRightCursor],
-                Cursor::EResizeCursor => msg_send![class("NSCursor"), resizeRightCursor],
-                Cursor::NResizeCursor => msg_send![class("NSCursor"), resizeUpCursor],
-                Cursor::NsResizeCursor | Cursor::RowResizeCursor =>
+                Cursor::EResize => msg_send![class("NSCursor"), resizeRightCursor],
+                Cursor::NResize => msg_send![class("NSCursor"), resizeUpCursor],
+                Cursor::NsResize | Cursor::RowResize =>
                     msg_send![class("NSCursor"), resizeUpDownCursor],
-                Cursor::VerticalTextCursor => msg_send![class("NSCursor"), IBeamCursorForVerticalLayout],
+                Cursor::VerticalText => msg_send![class("NSCursor"), IBeamCursorForVerticalLayout],
                 _ => msg_send![class("NSCursor"), arrowCursor],
             }
         }
     }
 
     #[cfg(not(target_os="macos"))]
     fn cursor_handle_for_cursor(&self, _: Cursor) -> cef_cursor_handle_t {
         0
--- a/servo/ports/geckolib/properties.mako.rs
+++ b/servo/ports/geckolib/properties.mako.rs
@@ -972,51 +972,51 @@ fn static_assert() {
 
     fn set_cursor(&mut self, v: longhands::cursor::computed_value::T) {
         use style::properties::longhands::cursor::computed_value::T;
         use style_traits::cursor::Cursor;
 
         self.gecko.mCursor = match v {
             T::AutoCursor => structs::NS_STYLE_CURSOR_AUTO,
             T::SpecifiedCursor(cursor) => match cursor {
-                Cursor::NoCursor => structs::NS_STYLE_CURSOR_NONE,
-                Cursor::DefaultCursor => structs::NS_STYLE_CURSOR_DEFAULT,
-                Cursor::PointerCursor => structs::NS_STYLE_CURSOR_POINTER,
-                Cursor::ContextMenuCursor => structs::NS_STYLE_CURSOR_CONTEXT_MENU,
-                Cursor::HelpCursor => structs::NS_STYLE_CURSOR_HELP,
-                Cursor::ProgressCursor => structs::NS_STYLE_CURSOR_DEFAULT, // Gecko doesn't support "progress" yet
-                Cursor::WaitCursor => structs::NS_STYLE_CURSOR_WAIT,
-                Cursor::CellCursor => structs::NS_STYLE_CURSOR_CELL,
-                Cursor::CrosshairCursor => structs::NS_STYLE_CURSOR_CROSSHAIR,
-                Cursor::TextCursor => structs::NS_STYLE_CURSOR_TEXT,
-                Cursor::VerticalTextCursor => structs::NS_STYLE_CURSOR_VERTICAL_TEXT,
-                Cursor::AliasCursor => structs::NS_STYLE_CURSOR_ALIAS,
-                Cursor::CopyCursor => structs::NS_STYLE_CURSOR_COPY,
-                Cursor::MoveCursor => structs::NS_STYLE_CURSOR_MOVE,
-                Cursor::NoDropCursor => structs::NS_STYLE_CURSOR_NO_DROP,
-                Cursor::NotAllowedCursor => structs::NS_STYLE_CURSOR_NOT_ALLOWED,
-                Cursor::GrabCursor => structs::NS_STYLE_CURSOR_GRAB,
-                Cursor::GrabbingCursor => structs::NS_STYLE_CURSOR_GRABBING,
-                Cursor::EResizeCursor => structs::NS_STYLE_CURSOR_E_RESIZE,
-                Cursor::NResizeCursor => structs::NS_STYLE_CURSOR_N_RESIZE,
-                Cursor::NeResizeCursor => structs::NS_STYLE_CURSOR_NE_RESIZE,
-                Cursor::NwResizeCursor => structs::NS_STYLE_CURSOR_NW_RESIZE,
-                Cursor::SResizeCursor => structs::NS_STYLE_CURSOR_S_RESIZE,
-                Cursor::SeResizeCursor => structs::NS_STYLE_CURSOR_SE_RESIZE,
-                Cursor::SwResizeCursor => structs::NS_STYLE_CURSOR_SW_RESIZE,
-                Cursor::WResizeCursor => structs::NS_STYLE_CURSOR_W_RESIZE,
-                Cursor::EwResizeCursor => structs::NS_STYLE_CURSOR_EW_RESIZE,
-                Cursor::NsResizeCursor => structs::NS_STYLE_CURSOR_NS_RESIZE,
-                Cursor::NeswResizeCursor => structs::NS_STYLE_CURSOR_NESW_RESIZE,
-                Cursor::NwseResizeCursor => structs::NS_STYLE_CURSOR_NWSE_RESIZE,
-                Cursor::ColResizeCursor => structs::NS_STYLE_CURSOR_COL_RESIZE,
-                Cursor::RowResizeCursor => structs::NS_STYLE_CURSOR_ROW_RESIZE,
-                Cursor::AllScrollCursor => structs::NS_STYLE_CURSOR_ALL_SCROLL,
-                Cursor::ZoomInCursor => structs::NS_STYLE_CURSOR_ZOOM_IN,
-                Cursor::ZoomOutCursor => structs::NS_STYLE_CURSOR_ZOOM_OUT,
+                Cursor::None => structs::NS_STYLE_CURSOR_NONE,
+                Cursor::Default => structs::NS_STYLE_CURSOR_DEFAULT,
+                Cursor::Pointer => structs::NS_STYLE_CURSOR_POINTER,
+                Cursor::ContextMenu => structs::NS_STYLE_CURSOR_CONTEXT_MENU,
+                Cursor::Help => structs::NS_STYLE_CURSOR_HELP,
+                Cursor::Progress => structs::NS_STYLE_CURSOR_DEFAULT, // Gecko doesn't support "progress" yet
+                Cursor::Wait => structs::NS_STYLE_CURSOR_WAIT,
+                Cursor::Cell => structs::NS_STYLE_CURSOR_CELL,
+                Cursor::Crosshair => structs::NS_STYLE_CURSOR_CROSSHAIR,
+                Cursor::Text => structs::NS_STYLE_CURSOR_TEXT,
+                Cursor::VerticalText => structs::NS_STYLE_CURSOR_VERTICAL_TEXT,
+                Cursor::Alias => structs::NS_STYLE_CURSOR_ALIAS,
+                Cursor::Copy => structs::NS_STYLE_CURSOR_COPY,
+                Cursor::Move => structs::NS_STYLE_CURSOR_MOVE,
+                Cursor::NoDrop => structs::NS_STYLE_CURSOR_NO_DROP,
+                Cursor::NotAllowed => structs::NS_STYLE_CURSOR_NOT_ALLOWED,
+                Cursor::Grab => structs::NS_STYLE_CURSOR_GRAB,
+                Cursor::Grabbing => structs::NS_STYLE_CURSOR_GRABBING,
+                Cursor::EResize => structs::NS_STYLE_CURSOR_E_RESIZE,
+                Cursor::NResize => structs::NS_STYLE_CURSOR_N_RESIZE,
+                Cursor::NeResize => structs::NS_STYLE_CURSOR_NE_RESIZE,
+                Cursor::NwResize => structs::NS_STYLE_CURSOR_NW_RESIZE,
+                Cursor::SResize => structs::NS_STYLE_CURSOR_S_RESIZE,
+                Cursor::SeResize => structs::NS_STYLE_CURSOR_SE_RESIZE,
+                Cursor::SwResize => structs::NS_STYLE_CURSOR_SW_RESIZE,
+                Cursor::WResize => structs::NS_STYLE_CURSOR_W_RESIZE,
+                Cursor::EwResize => structs::NS_STYLE_CURSOR_EW_RESIZE,
+                Cursor::NsResize => structs::NS_STYLE_CURSOR_NS_RESIZE,
+                Cursor::NeswResize => structs::NS_STYLE_CURSOR_NESW_RESIZE,
+                Cursor::NwseResize => structs::NS_STYLE_CURSOR_NWSE_RESIZE,
+                Cursor::ColResize => structs::NS_STYLE_CURSOR_COL_RESIZE,
+                Cursor::RowResize => structs::NS_STYLE_CURSOR_ROW_RESIZE,
+                Cursor::AllScroll => structs::NS_STYLE_CURSOR_ALL_SCROLL,
+                Cursor::ZoomIn => structs::NS_STYLE_CURSOR_ZOOM_IN,
+                Cursor::ZoomOut => structs::NS_STYLE_CURSOR_ZOOM_OUT,
             }
         } as u8;
     }
 
     ${impl_simple_copy('cursor', 'mCursor')}
 
 </%self:impl_trait>
 
--- a/servo/ports/glutin/window.rs
+++ b/servo/ports/glutin/window.rs
@@ -722,51 +722,51 @@ impl WindowMethods for Window {
     fn head_parsed(&self) {
     }
 
     /// Has no effect on Android.
     fn set_cursor(&self, c: Cursor) {
         use glutin::MouseCursor;
 
         let glutin_cursor = match c {
-            Cursor::NoCursor => MouseCursor::NoneCursor,
-            Cursor::DefaultCursor => MouseCursor::Default,
-            Cursor::PointerCursor => MouseCursor::Hand,
-            Cursor::ContextMenuCursor => MouseCursor::ContextMenu,
-            Cursor::HelpCursor => MouseCursor::Help,
-            Cursor::ProgressCursor => MouseCursor::Progress,
-            Cursor::WaitCursor => MouseCursor::Wait,
-            Cursor::CellCursor => MouseCursor::Cell,
-            Cursor::CrosshairCursor => MouseCursor::Crosshair,
-            Cursor::TextCursor => MouseCursor::Text,
-            Cursor::VerticalTextCursor => MouseCursor::VerticalText,
-            Cursor::AliasCursor => MouseCursor::Alias,
-            Cursor::CopyCursor => MouseCursor::Copy,
-            Cursor::MoveCursor => MouseCursor::Move,
-            Cursor::NoDropCursor => MouseCursor::NoDrop,
-            Cursor::NotAllowedCursor => MouseCursor::NotAllowed,
-            Cursor::GrabCursor => MouseCursor::Grab,
-            Cursor::GrabbingCursor => MouseCursor::Grabbing,
-            Cursor::EResizeCursor => MouseCursor::EResize,
-            Cursor::NResizeCursor => MouseCursor::NResize,
-            Cursor::NeResizeCursor => MouseCursor::NeResize,
-            Cursor::NwResizeCursor => MouseCursor::NwResize,
-            Cursor::SResizeCursor => MouseCursor::SResize,
-            Cursor::SeResizeCursor => MouseCursor::SeResize,
-            Cursor::SwResizeCursor => MouseCursor::SwResize,
-            Cursor::WResizeCursor => MouseCursor::WResize,
-            Cursor::EwResizeCursor => MouseCursor::EwResize,
-            Cursor::NsResizeCursor => MouseCursor::NsResize,
-            Cursor::NeswResizeCursor => MouseCursor::NeswResize,
-            Cursor::NwseResizeCursor => MouseCursor::NwseResize,
-            Cursor::ColResizeCursor => MouseCursor::ColResize,
-            Cursor::RowResizeCursor => MouseCursor::RowResize,
-            Cursor::AllScrollCursor => MouseCursor::AllScroll,
-            Cursor::ZoomInCursor => MouseCursor::ZoomIn,
-            Cursor::ZoomOutCursor => MouseCursor::ZoomOut,
+            Cursor::None => MouseCursor::NoneCursor,
+            Cursor::Default => MouseCursor::Default,
+            Cursor::Pointer => MouseCursor::Hand,
+            Cursor::ContextMenu => MouseCursor::ContextMenu,
+            Cursor::Help => MouseCursor::Help,
+            Cursor::Progress => MouseCursor::Progress,
+            Cursor::Wait => MouseCursor::Wait,
+            Cursor::Cell => MouseCursor::Cell,
+            Cursor::Crosshair => MouseCursor::Crosshair,
+            Cursor::Text => MouseCursor::Text,
+            Cursor::VerticalText => MouseCursor::VerticalText,
+            Cursor::Alias => MouseCursor::Alias,
+            Cursor::Copy => MouseCursor::Copy,
+            Cursor::Move => MouseCursor::Move,
+            Cursor::NoDrop => MouseCursor::NoDrop,
+            Cursor::NotAllowed => MouseCursor::NotAllowed,
+            Cursor::Grab => MouseCursor::Grab,
+            Cursor::Grabbing => MouseCursor::Grabbing,
+            Cursor::EResize => MouseCursor::EResize,
+            Cursor::NResize => MouseCursor::NResize,
+            Cursor::NeResize => MouseCursor::NeResize,
+            Cursor::NwResize => MouseCursor::NwResize,
+            Cursor::SResize => MouseCursor::SResize,
+            Cursor::SeResize => MouseCursor::SeResize,
+            Cursor::SwResize => MouseCursor::SwResize,
+            Cursor::WResize => MouseCursor::WResize,
+            Cursor::EwResize => MouseCursor::EwResize,
+            Cursor::NsResize => MouseCursor::NsResize,
+            Cursor::NeswResize => MouseCursor::NeswResize,
+            Cursor::NwseResize => MouseCursor::NwseResize,
+            Cursor::ColResize => MouseCursor::ColResize,
+            Cursor::RowResize => MouseCursor::RowResize,
+            Cursor::AllScroll => MouseCursor::AllScroll,
+            Cursor::ZoomIn => MouseCursor::ZoomIn,
+            Cursor::ZoomOut => MouseCursor::ZoomOut,
         };
         self.window.set_cursor(glutin_cursor);
     }
 
     fn set_favicon(&self, _: Url) {
     }
 
     fn prepare_for_composite(&self, _width: usize, _height: usize) -> bool {