aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-06-12 14:47:02 -0500
committerGitHub <noreply@github.com>2016-06-12 14:47:02 -0500
commitb5115fc895bb40bce52d39de65a07160935b15fd (patch)
tree1cc341c142106dde33c89fbdf83324c2634be721
parent0b2cc910d40aeed81d2de3296d371df4d0e81f60 (diff)
parent46cadfdd2ce17172fc508e0240b6ac43f5470e10 (diff)
downloadservo-b5115fc895bb40bce52d39de65a07160935b15fd.tar.gz
servo-b5115fc895bb40bce52d39de65a07160935b15fd.zip
Auto merge of #11696 - mrmiywj:rename-to-less-repetitive, r=ConnorGBrewster
use less repetitive name <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11696) <!-- Reviewable:end -->
-rw-r--r--components/layout/display_list_builder.rs38
-rw-r--r--components/layout/query.rs2
-rw-r--r--components/style_traits/cursor.rs70
-rw-r--r--ports/cef/window.rs74
-rw-r--r--ports/geckolib/properties.mako.rs70
-rw-r--r--ports/glutin/window.rs70
6 files changed, 162 insertions, 162 deletions
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs
index 94596844684..62d490b4439 100644
--- a/components/layout/display_list_builder.rs
+++ b/components/layout/display_list_builder.rs
@@ -377,7 +377,7 @@ impl FragmentDisplayListBuilding for Fragment {
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 {
@@ -569,7 +569,7 @@ impl FragmentDisplayListBuilding for Fragment {
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,
@@ -697,7 +697,7 @@ impl FragmentDisplayListBuilding for Fragment {
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,
@@ -727,7 +727,7 @@ impl FragmentDisplayListBuilding for Fragment {
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,
@@ -799,7 +799,7 @@ impl FragmentDisplayListBuilding for Fragment {
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,
@@ -842,7 +842,7 @@ impl FragmentDisplayListBuilding for Fragment {
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,
@@ -867,7 +867,7 @@ impl FragmentDisplayListBuilding for Fragment {
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,
@@ -888,7 +888,7 @@ impl FragmentDisplayListBuilding for Fragment {
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,
@@ -905,7 +905,7 @@ impl FragmentDisplayListBuilding for 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,
@@ -956,7 +956,7 @@ impl FragmentDisplayListBuilding for 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),
display_list_section);
state.add_display_item(
DisplayItem::SolidColorClass(box SolidColorDisplayItem {
@@ -981,14 +981,14 @@ impl FragmentDisplayListBuilding for Fragment {
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,
@@ -1208,7 +1208,7 @@ impl FragmentDisplayListBuilding for Fragment {
&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,
@@ -1235,7 +1235,7 @@ impl FragmentDisplayListBuilding for Fragment {
&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,
@@ -1271,7 +1271,7 @@ impl FragmentDisplayListBuilding for Fragment {
&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) => {
@@ -1545,12 +1545,12 @@ impl FragmentDisplayListBuilding for Fragment {
// 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.
@@ -1649,7 +1649,7 @@ impl FragmentDisplayListBuilding for Fragment {
&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,
diff --git a/components/layout/query.rs b/components/layout/query.rs
index 21b0998b1d8..59da80802af 100644
--- a/components/layout/query.rs
+++ b/components/layout/query.rs
@@ -74,7 +74,7 @@ impl LayoutRPC for LayoutRPCImpl {
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();
diff --git a/components/style_traits/cursor.rs b/components/style_traits/cursor.rs
index 873bb3527a4..be1d9b3c0b3 100644
--- a/components/style_traits/cursor.rs
+++ b/components/style_traits/cursor.rs
@@ -35,39 +35,39 @@ 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,
}
diff --git a/ports/cef/window.rs b/ports/cef/window.rs
index f8dbd596d99..1d4ee0a3281 100644
--- a/ports/cef/window.rs
+++ b/ports/cef/window.rs
@@ -105,27 +105,27 @@ impl Window {
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,
}
}
@@ -138,27 +138,27 @@ impl Window {
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],
}
}
diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs
index f7eb1f9708c..3444403271f 100644
--- a/ports/geckolib/properties.mako.rs
+++ b/ports/geckolib/properties.mako.rs
@@ -977,41 +977,41 @@ fn static_assert() {
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;
}
diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs
index fa99f754b6b..bd106eddd6c 100644
--- a/ports/glutin/window.rs
+++ b/ports/glutin/window.rs
@@ -727,41 +727,41 @@ impl WindowMethods for Window {
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);
}