Bug 1520154 - Move cursor to cbindgen. r=boris
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 15 Jan 2019 15:05:45 +0100
changeset 514075 036c3b7cde376187c8df91f7d764e528371adace
parent 514074 cee37d07397cdffd16e63db1cdfff27a57d09eea
child 514076 1312db5d495953cc6e18b16d082d06d611a21166
child 514183 6f69caa667c90fe7df4aaa429f1813c5144719f6
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersboris
bugs1520154
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1520154 - Move cursor to cbindgen. r=boris The only reason it was on style_traits is so that they could use it from some other crates, but Servo eventually ends up getting the value from an integer, so may as well pass it around and do that in the end of the process anyway. Differential Revision: https://phabricator.services.mozilla.com/D16557
dom/base/Document.cpp
dom/base/Document.h
dom/base/nsGlobalWindowOuter.cpp
dom/events/EventStateManager.cpp
dom/events/EventStateManager.h
layout/forms/nsImageControlFrame.cpp
layout/generic/nsFrame.cpp
layout/generic/nsFrameSetFrame.cpp
layout/generic/nsIFrame.h
layout/generic/nsImageFrame.cpp
layout/generic/nsTextFrame.cpp
layout/style/ServoBindings.toml
layout/style/ServoCSSPropList.mako.py
layout/style/nsCSSProps.cpp
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
layout/style/nsStyleConsts.h
layout/style/nsStyleStruct.cpp
layout/style/nsStyleStruct.h
layout/xul/tree/nsTreeBodyFrame.cpp
servo/components/style/cbindgen.toml
servo/components/style/properties/gecko.mako.rs
servo/components/style/values/computed/mod.rs
servo/components/style/values/computed/ui.rs
servo/components/style/values/generics/ui.rs
servo/components/style/values/specified/ui.rs
servo/components/style_traits/cursor.rs
servo/components/style_traits/lib.rs
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -8701,18 +8701,18 @@ void Document::ScrollToRef() {
           rv = shell->GoToAnchor(utf16Str, mChangeScrollPosWhenScrollingToRef);
         }
       }
 
       // If UTF-8 URI failed then try to assume the string as a
       // document's charset.
       if (NS_FAILED(rv)) {
         const Encoding* encoding = GetDocumentCharacterSet();
-        rv = encoding->DecodeWithoutBOMHandling(
-            unescaped ? buff : mScrollToRef, ref);
+        rv = encoding->DecodeWithoutBOMHandling(unescaped ? buff : mScrollToRef,
+                                                ref);
         if (NS_SUCCEEDED(rv) && !ref.IsEmpty()) {
           rv = shell->GoToAnchor(ref, mChangeScrollPosWhenScrollingToRef);
         }
       }
     }
     if (NS_SUCCEEDED(rv)) {
       mScrolledToRefAlready = true;
     }
@@ -10694,17 +10694,17 @@ PointerLockRequest::Run() {
       return NS_OK;
     }
   }
   // If it is neither user input initiated, nor requested in fullscreen,
   // it should be rejected.
   if (!error && !mUserInputOrChromeCaller && !doc->GetFullscreenElement()) {
     error = "PointerLockDeniedNotInputDriven";
   }
-  if (!error && !doc->SetPointerLock(e, NS_STYLE_CURSOR_NONE)) {
+  if (!error && !doc->SetPointerLock(e, StyleCursorKind::None)) {
     error = "PointerLockDeniedFailedToLock";
   }
   if (error) {
     DispatchPointerLockError(doc, error);
     return NS_OK;
   }
 
   ChangePointerLockedElement(e, doc, nullptr);
@@ -10732,17 +10732,17 @@ void Document::RequestPointerLock(Elemen
 
   bool userInputOrSystemCaller = EventStateManager::IsHandlingUserInput() ||
                                  aCallerType == CallerType::System;
   nsCOMPtr<nsIRunnable> request =
       new PointerLockRequest(aElement, userInputOrSystemCaller);
   Dispatch(TaskCategory::Other, request.forget());
 }
 
-bool Document::SetPointerLock(Element* aElement, int aCursorStyle) {
+bool Document::SetPointerLock(Element* aElement, StyleCursorKind aCursorStyle) {
   MOZ_ASSERT(!aElement || aElement->OwnerDoc() == this,
              "We should be either unlocking pointer (aElement is nullptr), "
              "or locking pointer to an element in this document");
 #ifdef DEBUG
   if (!aElement) {
     nsCOMPtr<Document> pointerLockedDoc =
         do_QueryReferent(EventStateManager::sPointerLockedDoc);
     MOZ_ASSERT(pointerLockedDoc == this);
@@ -10792,17 +10792,17 @@ void Document::UnlockPointer(Document* a
     return;
   }
 
   nsCOMPtr<Document> pointerLockedDoc =
       do_QueryReferent(EventStateManager::sPointerLockedDoc);
   if (!pointerLockedDoc || (aDoc && aDoc != pointerLockedDoc)) {
     return;
   }
-  if (!pointerLockedDoc->SetPointerLock(nullptr, NS_STYLE_CURSOR_AUTO)) {
+  if (!pointerLockedDoc->SetPointerLock(nullptr, StyleCursorKind::Auto)) {
     return;
   }
 
   nsCOMPtr<Element> pointerLockedElement =
       do_QueryReferent(EventStateManager::sPointerLockedElement);
   ChangePointerLockedElement(nullptr, pointerLockedDoc, pointerLockedElement);
 
   RefPtr<AsyncEventDispatcher> asyncDispatcher = new AsyncEventDispatcher(
@@ -11691,17 +11691,17 @@ void Document::MaybeNotifyAutoplayBlocke
       CanBubble::eYes, ChromeOnlyDispatch::eYes);
   asyncDispatcher->PostDOMEvent();
 }
 
 void Document::ClearUserGestureActivation() {
   Document* doc = this;
   while (doc) {
     MOZ_LOG(gUserInteractionPRLog, LogLevel::Debug,
-          ("Reset user activation flag for document %p.", this));
+            ("Reset user activation flag for document %p.", this));
     doc->mUserGestureActivated = false;
     doc = doc->GetSameTypeParentDocument();
   }
 }
 
 void Document::SetDocTreeHadAudibleMedia() {
   Document* topLevelDoc = GetTopLevelContentDocument();
   if (!topLevelDoc) {
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
@@ -131,16 +131,17 @@ class Encoding;
 class ErrorResult;
 class EventStates;
 class EventListenerManager;
 class FullscreenExit;
 class FullscreenRequest;
 class PendingAnimationTracker;
 class ServoStyleSet;
 class SMILAnimationController;
+enum class StyleCursorKind : uint8_t;
 template <typename>
 class OwningNonNull;
 struct URLExtraData;
 
 namespace css {
 class Loader;
 class ImageLoader;
 class Rule;
@@ -440,17 +441,18 @@ class Document : public nsINode,
  protected:
   explicit Document(const char* aContentType);
   virtual ~Document();
 
   Document(const Document&) = delete;
   Document& operator=(const Document&) = delete;
 
  public:
-  typedef mozilla::dom::ExternalResourceMap::ExternalResourceLoad ExternalResourceLoad;
+  typedef mozilla::dom::ExternalResourceMap::ExternalResourceLoad
+      ExternalResourceLoad;
   typedef net::ReferrerPolicy ReferrerPolicyEnum;
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_IID)
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   NS_DECL_ADDSIZEOFEXCLUDINGTHIS
 
@@ -1815,18 +1817,18 @@ class Document : public nsINode,
 
   /**
    * Handles any pending fullscreen in aDocument or its subdocuments.
    *
    * Returns whether there is any fullscreen request handled.
    */
   static bool HandlePendingFullscreenRequests(Document* aDocument);
 
-  void RequestPointerLock(Element* aElement, mozilla::dom::CallerType);
-  bool SetPointerLock(Element* aElement, int aCursorStyle);
+  void RequestPointerLock(Element* aElement, CallerType);
+  bool SetPointerLock(Element* aElement, StyleCursorKind);
 
   static void UnlockPointer(Document* aDoc = nullptr);
 
   // ScreenOrientation related APIs
 
   void SetCurrentOrientation(mozilla::dom::OrientationType aType,
                              uint16_t aAngle) {
     mCurrentOrientationType = aType;
@@ -3091,17 +3093,19 @@ class Document : public nsINode,
                                                        JSObject* aObject);
   static bool AreWebAnimationsTimelinesEnabled(JSContext* aCx,
                                                JSObject* aObject);
   // Checks that the caller is either chrome or some addon.
   static bool IsCallerChromeOrAddon(JSContext* aCx, JSObject* aObject);
 
 #ifdef MOZILLA_INTERNAL_API
   bool Hidden() const { return mVisibilityState != VisibilityState::Visible; }
-  mozilla::dom::VisibilityState VisibilityState() const { return mVisibilityState; }
+  mozilla::dom::VisibilityState VisibilityState() const {
+    return mVisibilityState;
+  }
 #endif
   void GetSelectedStyleSheetSet(nsAString& aSheetSet);
   void SetSelectedStyleSheetSet(const nsAString& aSheetSet);
   void GetLastStyleSheetSet(nsAString& aSheetSet) {
     aSheetSet = mLastStyleSheetSet;
   }
   const nsString& GetCurrentStyleSheetSet() const {
     return mLastStyleSheetSet.IsEmpty() ? mPreferredStyleSheetSet
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -7046,28 +7046,31 @@ already_AddRefed<nsWindowRoot> nsGlobalW
 nsIDOMWindowUtils* nsGlobalWindowOuter::WindowUtils() {
   if (!mWindowUtils) {
     mWindowUtils = new nsDOMWindowUtils(this);
   }
   return mWindowUtils;
 }
 
 // Note: This call will lock the cursor, it will not change as it moves.
-// To unlock, the cursor must be set back to CURSOR_AUTO.
+// To unlock, the cursor must be set back to Auto.
 void nsGlobalWindowOuter::SetCursorOuter(const nsAString& aCursor,
                                          ErrorResult& aError) {
-  int32_t cursor;
-
-  if (aCursor.EqualsLiteral("auto"))
-    cursor = NS_STYLE_CURSOR_AUTO;
-  else {
+  StyleCursorKind cursor;
+
+  if (aCursor.EqualsLiteral("auto")) {
+    cursor = StyleCursorKind::Auto;
+  } else {
+    // TODO(emilio): Use Servo for this instead.
     nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(aCursor);
-    if (!nsCSSProps::FindKeyword(keyword, nsCSSProps::kCursorKTable, cursor)) {
+    int32_t c;
+    if (!nsCSSProps::FindKeyword(keyword, nsCSSProps::kCursorKTable, c)) {
       return;
     }
+    cursor = static_cast<StyleCursorKind>(c);
   }
 
   RefPtr<nsPresContext> presContext;
   if (mDocShell) {
     presContext = mDocShell->GetPresContext();
   }
 
   if (presContext) {
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -216,22 +216,24 @@ TimeStamp EventStateManager::sHandlingIn
 EventStateManager::WheelPrefs* EventStateManager::WheelPrefs::sInstance =
     nullptr;
 bool EventStateManager::WheelPrefs::sWheelEventsEnabledOnPlugins = true;
 bool EventStateManager::WheelPrefs::sIsAutoDirEnabled = false;
 bool EventStateManager::WheelPrefs::sHonoursRootForAutoDir = false;
 EventStateManager::DeltaAccumulator*
     EventStateManager::DeltaAccumulator::sInstance = nullptr;
 
+constexpr const StyleCursorKind kInvalidCursorKind =
+  static_cast<StyleCursorKind>(255);
+
 EventStateManager::EventStateManager()
-    : mLockCursor(0),
+    : mLockCursor(kInvalidCursorKind),
       mLastFrameConsumedSetCursor(false),
-      mCurrentTarget(nullptr)
+      mCurrentTarget(nullptr),
       // init d&d gesture state machine variables
-      ,
       mGestureDownPoint(0, 0),
       mGestureModifiers(0),
       mGestureDownButtons(0),
       mPresContext(nullptr),
       mLClickCount(0),
       mMClickCount(0),
       mRClickCount(0),
       mInTouchDrag(false),
@@ -3607,23 +3609,23 @@ void EventStateManager::ClearFrameRefs(n
 void EventStateManager::UpdateCursor(nsPresContext* aPresContext,
                                      WidgetEvent* aEvent,
                                      nsIFrame* aTargetFrame,
                                      nsEventStatus* aStatus) {
   if (aTargetFrame && IsRemoteTarget(aTargetFrame->GetContent())) {
     return;
   }
 
-  int32_t cursor = NS_STYLE_CURSOR_DEFAULT;
+  auto cursor = StyleCursorKind::Default;
   imgIContainer* container = nullptr;
   bool haveHotspot = false;
   float hotspotX = 0.0f, hotspotY = 0.0f;
 
   // If cursor is locked just use the locked one
-  if (mLockCursor) {
+  if (mLockCursor != kInvalidCursorKind) {
     cursor = mLockCursor;
   }
   // If not locked, look for correct cursor
   else if (aTargetFrame) {
     nsIFrame::Cursor framecursor;
     nsPoint pt =
         nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, aTargetFrame);
     // Avoid setting cursor when the mouse is over a windowless pluign.
@@ -3658,171 +3660,171 @@ void EventStateManager::UpdateCursor(nsP
     // Check whether or not to show the busy cursor
     nsCOMPtr<nsIDocShell> docShell(aPresContext->GetDocShell());
     if (!docShell) return;
     auto busyFlags = docShell->GetBusyFlags();
 
     // Show busy cursor everywhere before page loads
     // and just replace the arrow cursor after page starts loading
     if (busyFlags & nsIDocShell::BUSY_FLAGS_BUSY &&
-        (cursor == NS_STYLE_CURSOR_AUTO || cursor == NS_STYLE_CURSOR_DEFAULT)) {
-      cursor = NS_STYLE_CURSOR_SPINNING;
+        (cursor == StyleCursorKind::Auto || cursor == StyleCursorKind::Default)) {
+      cursor = StyleCursorKind::Progress;
       container = nullptr;
     }
   }
 
   if (aTargetFrame) {
     SetCursor(cursor, container, haveHotspot, hotspotX, hotspotY,
               aTargetFrame->GetNearestWidget(), false);
     gLastCursorSourceFrame = aTargetFrame;
     gLastCursorUpdateTime = TimeStamp::NowLoRes();
   }
 
-  if (mLockCursor || NS_STYLE_CURSOR_AUTO != cursor) {
+  if (mLockCursor != kInvalidCursorKind || StyleCursorKind::Auto != cursor) {
     *aStatus = nsEventStatus_eConsumeDoDefault;
   }
 }
 
 void EventStateManager::ClearCachedWidgetCursor(nsIFrame* aTargetFrame) {
   if (!aTargetFrame) {
     return;
   }
   nsIWidget* aWidget = aTargetFrame->GetNearestWidget();
   if (!aWidget) {
     return;
   }
   aWidget->ClearCachedCursor();
 }
 
-nsresult EventStateManager::SetCursor(int32_t aCursor,
+nsresult EventStateManager::SetCursor(StyleCursorKind aCursor,
                                       imgIContainer* aContainer,
                                       bool aHaveHotspot, float aHotspotX,
                                       float aHotspotY, nsIWidget* aWidget,
                                       bool aLockCursor) {
   EnsureDocument(mPresContext);
   NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);
   sMouseOverDocument = mDocument.get();
 
   nsCursor c;
 
   NS_ENSURE_TRUE(aWidget, NS_ERROR_FAILURE);
   if (aLockCursor) {
-    if (NS_STYLE_CURSOR_AUTO != aCursor) {
+    if (StyleCursorKind::Auto != aCursor) {
       mLockCursor = aCursor;
     } else {
       // If cursor style is set to auto we unlock the cursor again.
-      mLockCursor = 0;
+      mLockCursor = kInvalidCursorKind;
     }
   }
   switch (aCursor) {
     default:
-    case NS_STYLE_CURSOR_AUTO:
-    case NS_STYLE_CURSOR_DEFAULT:
+    case StyleCursorKind::Auto:
+    case StyleCursorKind::Default:
       c = eCursor_standard;
       break;
-    case NS_STYLE_CURSOR_POINTER:
+    case StyleCursorKind::Pointer:
       c = eCursor_hyperlink;
       break;
-    case NS_STYLE_CURSOR_CROSSHAIR:
+    case StyleCursorKind::Crosshair:
       c = eCursor_crosshair;
       break;
-    case NS_STYLE_CURSOR_MOVE:
+    case StyleCursorKind::Move:
       c = eCursor_move;
       break;
-    case NS_STYLE_CURSOR_TEXT:
+    case StyleCursorKind::Text:
       c = eCursor_select;
       break;
-    case NS_STYLE_CURSOR_WAIT:
+    case StyleCursorKind::Wait:
       c = eCursor_wait;
       break;
-    case NS_STYLE_CURSOR_HELP:
+    case StyleCursorKind::Help:
       c = eCursor_help;
       break;
-    case NS_STYLE_CURSOR_N_RESIZE:
+    case StyleCursorKind::NResize:
       c = eCursor_n_resize;
       break;
-    case NS_STYLE_CURSOR_S_RESIZE:
+    case StyleCursorKind::SResize:
       c = eCursor_s_resize;
       break;
-    case NS_STYLE_CURSOR_W_RESIZE:
+    case StyleCursorKind::WResize:
       c = eCursor_w_resize;
       break;
-    case NS_STYLE_CURSOR_E_RESIZE:
+    case StyleCursorKind::EResize:
       c = eCursor_e_resize;
       break;
-    case NS_STYLE_CURSOR_NW_RESIZE:
+    case StyleCursorKind::NwResize:
       c = eCursor_nw_resize;
       break;
-    case NS_STYLE_CURSOR_SE_RESIZE:
+    case StyleCursorKind::SeResize:
       c = eCursor_se_resize;
       break;
-    case NS_STYLE_CURSOR_NE_RESIZE:
+    case StyleCursorKind::NeResize:
       c = eCursor_ne_resize;
       break;
-    case NS_STYLE_CURSOR_SW_RESIZE:
+    case StyleCursorKind::SwResize:
       c = eCursor_sw_resize;
       break;
-    case NS_STYLE_CURSOR_COPY:  // CSS3
+    case StyleCursorKind::Copy:  // CSS3
       c = eCursor_copy;
       break;
-    case NS_STYLE_CURSOR_ALIAS:
+    case StyleCursorKind::Alias:
       c = eCursor_alias;
       break;
-    case NS_STYLE_CURSOR_CONTEXT_MENU:
+    case StyleCursorKind::ContextMenu:
       c = eCursor_context_menu;
       break;
-    case NS_STYLE_CURSOR_CELL:
+    case StyleCursorKind::Cell:
       c = eCursor_cell;
       break;
-    case NS_STYLE_CURSOR_GRAB:
+    case StyleCursorKind::Grab:
       c = eCursor_grab;
       break;
-    case NS_STYLE_CURSOR_GRABBING:
+    case StyleCursorKind::Grabbing:
       c = eCursor_grabbing;
       break;
-    case NS_STYLE_CURSOR_SPINNING:
+    case StyleCursorKind::Progress:
       c = eCursor_spinning;
       break;
-    case NS_STYLE_CURSOR_ZOOM_IN:
+    case StyleCursorKind::ZoomIn:
       c = eCursor_zoom_in;
       break;
-    case NS_STYLE_CURSOR_ZOOM_OUT:
+    case StyleCursorKind::ZoomOut:
       c = eCursor_zoom_out;
       break;
-    case NS_STYLE_CURSOR_NOT_ALLOWED:
+    case StyleCursorKind::NotAllowed:
       c = eCursor_not_allowed;
       break;
-    case NS_STYLE_CURSOR_COL_RESIZE:
+    case StyleCursorKind::ColResize:
       c = eCursor_col_resize;
       break;
-    case NS_STYLE_CURSOR_ROW_RESIZE:
+    case StyleCursorKind::RowResize:
       c = eCursor_row_resize;
       break;
-    case NS_STYLE_CURSOR_NO_DROP:
+    case StyleCursorKind::NoDrop:
       c = eCursor_no_drop;
       break;
-    case NS_STYLE_CURSOR_VERTICAL_TEXT:
+    case StyleCursorKind::VerticalText:
       c = eCursor_vertical_text;
       break;
-    case NS_STYLE_CURSOR_ALL_SCROLL:
+    case StyleCursorKind::AllScroll:
       c = eCursor_all_scroll;
       break;
-    case NS_STYLE_CURSOR_NESW_RESIZE:
+    case StyleCursorKind::NeswResize:
       c = eCursor_nesw_resize;
       break;
-    case NS_STYLE_CURSOR_NWSE_RESIZE:
+    case StyleCursorKind::NwseResize:
       c = eCursor_nwse_resize;
       break;
-    case NS_STYLE_CURSOR_NS_RESIZE:
+    case StyleCursorKind::NsResize:
       c = eCursor_ns_resize;
       break;
-    case NS_STYLE_CURSOR_EW_RESIZE:
+    case StyleCursorKind::EwResize:
       c = eCursor_ew_resize;
       break;
-    case NS_STYLE_CURSOR_NONE:
+    case StyleCursorKind::None:
       c = eCursor_none;
       break;
   }
 
   // First, try the imgIContainer, if non-null
   nsresult rv = NS_ERROR_FAILURE;
   if (aContainer) {
     uint32_t hotspotX, hotspotY;
--- a/dom/events/EventStateManager.h
+++ b/dom/events/EventStateManager.h
@@ -226,17 +226,17 @@ class EventStateManager : public nsSuppo
    * aEvent in the process but won't execute it.
    *
    * @return            true if there is accesskey which aEvent matches with
    *                    in this process.  Otherwise, false.
    */
   bool CheckIfEventMatchesAccessKey(WidgetKeyboardEvent* aEvent,
                                     nsPresContext* aPresContext);
 
-  nsresult SetCursor(int32_t aCursor, imgIContainer* aContainer,
+  nsresult SetCursor(StyleCursorKind aCursor, imgIContainer* aContainer,
                      bool aHaveHotspot, float aHotspotX, float aHotspotY,
                      nsIWidget* aWidget, bool aLockCursor);
 
   /**
    * StartHandlingUserInput() is called when we start to handle a user input.
    * StopHandlingUserInput() is called when we finish handling a user input.
    * If the caller knows which input event caused that, it should set
    * aMessage to the event message.  Otherwise, set eVoidEvent.
@@ -1166,17 +1166,17 @@ class EventStateManager : public nsSuppo
    * gestures which are eKeyUp, eMouseUp, eTouchEnd.
    */
   void NotifyTargetUserActivation(WidgetEvent* aEvent,
                                   nsIContent* aTargetContent);
 
   already_AddRefed<EventStateManager> ESMFromContentOrThis(
       nsIContent* aContent);
 
-  int32_t mLockCursor;
+  StyleCursorKind mLockCursor;
   bool mLastFrameConsumedSetCursor;
 
   // Last mouse event mRefPoint (the offset from the widget's origin in
   // device pixels) when mouse was locked, used to restore mouse position
   // after unlocking.
   static LayoutDeviceIntPoint sPreLockPoint;
 
   // Stores the mRefPoint of the last synthetic mouse move we dispatched
--- a/layout/forms/nsImageControlFrame.cpp
+++ b/layout/forms/nsImageControlFrame.cpp
@@ -150,18 +150,18 @@ nsresult nsImageControlFrame::HandleEven
 void nsImageControlFrame::SetFocus(bool aOn, bool aRepaint) {}
 
 nsresult nsImageControlFrame::GetCursor(const nsPoint& aPoint,
                                         nsIFrame::Cursor& aCursor) {
   // Use style defined cursor if one is provided, otherwise when
   // the cursor style is "auto" we use the pointer cursor.
   FillCursorInformationFromStyle(StyleUI(), aCursor);
 
-  if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
-    aCursor.mCursor = NS_STYLE_CURSOR_POINTER;
+  if (StyleCursorKind::Auto == aCursor.mCursor) {
+    aCursor.mCursor = StyleCursorKind::Pointer;
   }
 
   return NS_OK;
 }
 
 nsresult nsImageControlFrame::SetFormProperty(nsAtom* aName,
                                               const nsAString& aValue) {
   return NS_OK;
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -5037,27 +5037,27 @@ void nsIFrame::AssociateImage(const nsSt
       aPresContext->Document()->StyleImageLoader();
 
   // If this fails there's not much we can do ...
   loader->AssociateRequestToFrame(req, this, aImageLoaderFlags);
 }
 
 nsresult nsFrame::GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) {
   FillCursorInformationFromStyle(StyleUI(), aCursor);
-  if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
+  if (StyleCursorKind::Auto == aCursor.mCursor) {
     // If this is editable, I-beam cursor is better for most elements.
     aCursor.mCursor = (mContent && mContent->IsEditable())
-                          ? NS_STYLE_CURSOR_TEXT
-                          : NS_STYLE_CURSOR_DEFAULT;
-  }
-  if (NS_STYLE_CURSOR_TEXT == aCursor.mCursor &&
+                          ? StyleCursorKind::Text
+                          : StyleCursorKind::Default;
+  }
+  if (StyleCursorKind::Text == aCursor.mCursor &&
       GetWritingMode().IsVertical()) {
     // Per CSS UI spec, UA may treat value 'text' as
     // 'vertical-text' for vertical text.
-    aCursor.mCursor = NS_STYLE_CURSOR_VERTICAL_TEXT;
+    aCursor.mCursor = StyleCursorKind::VerticalText;
   }
 
   return NS_OK;
 }
 
 // Resize and incremental reflow
 
 /* virtual */ void nsFrame::MarkIntrinsicISizesDirty() {
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -627,20 +627,20 @@ nsresult nsHTMLFramesetFrame::HandleEven
   }
   return NS_OK;
 }
 
 nsresult nsHTMLFramesetFrame::GetCursor(const nsPoint& aPoint,
                                         nsIFrame::Cursor& aCursor) {
   aCursor.mLoading = false;
   if (mDragger) {
-    aCursor.mCursor = (mDragger->mVertical) ? NS_STYLE_CURSOR_EW_RESIZE
-                                            : NS_STYLE_CURSOR_NS_RESIZE;
+    aCursor.mCursor = (mDragger->mVertical) ? StyleCursorKind::EwResize
+                                            : StyleCursorKind::NsResize;
   } else {
-    aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
+    aCursor.mCursor = StyleCursorKind::Default;
   }
   return NS_OK;
 }
 
 void nsHTMLFramesetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
                                            const nsDisplayListSet& aLists) {
   BuildDisplayListForInline(aBuilder, aLists);
 
@@ -1463,20 +1463,20 @@ nsresult nsHTMLFramesetBorderFrame::Hand
   }
   return NS_OK;
 }
 
 nsresult nsHTMLFramesetBorderFrame::GetCursor(const nsPoint& aPoint,
                                               nsIFrame::Cursor& aCursor) {
   aCursor.mLoading = false;
   if (!mCanResize) {
-    aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
+    aCursor.mCursor = StyleCursorKind::Default;
   } else {
     aCursor.mCursor =
-        (mVertical) ? NS_STYLE_CURSOR_EW_RESIZE : NS_STYLE_CURSOR_NS_RESIZE;
+        (mVertical) ? StyleCursorKind::EwResize: StyleCursorKind::NsResize;
   }
   return NS_OK;
 }
 
 #ifdef DEBUG_FRAME_DUMP
 nsresult nsHTMLFramesetBorderFrame::GetFrameName(nsAString& aResult) const {
   return MakeFrameName(NS_LITERAL_STRING("FramesetBorder"), aResult);
 }
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -1980,17 +1980,17 @@ class nsIFrame : public nsQueryFrame {
 
   /**
    * This structure holds information about a cursor. mContainer represents a
    * loaded image that should be preferred. If it is not possible to use it, or
    * if it is null, mCursor should be used.
    */
   struct MOZ_STACK_CLASS Cursor {
     nsCOMPtr<imgIContainer> mContainer;
-    int32_t mCursor = NS_STYLE_CURSOR_AUTO;
+    mozilla::StyleCursorKind mCursor = mozilla::StyleCursorKind::Auto;
     bool mHaveHotspot = false;
     bool mLoading = false;
     float mHotspotX = 0.0f, mHotspotY = 0.0f;
   };
   /**
    * Get the cursor for a given frame.
    */
   virtual nsresult GetCursor(const nsPoint& aPoint, Cursor& aCursor) = 0;
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -1613,27 +1613,27 @@ ImgDrawResult nsImageFrame::DisplayAltFe
       nsCOMPtr<imgIContainer> imgCon;
       request->GetImage(getter_AddRefs(imgCon));
       MOZ_ASSERT(imgCon, "Load complete, but no image container?");
 
       nsRect dest(flushRight ? inner.XMost() - size : inner.x, inner.y, size,
                   size);
 
       const int32_t factor = PresContext()->AppUnitsPerDevPixel();
-      LayoutDeviceRect destRect(
-          LayoutDeviceRect::FromAppUnits(dest, factor));
+      LayoutDeviceRect destRect(LayoutDeviceRect::FromAppUnits(dest, factor));
       destRect.Round();
 
       Maybe<SVGImageContext> svgContext;
       IntSize decodeSize =
           nsLayoutUtils::ComputeImageContainerDrawingParameters(
               imgCon, this, destRect, aSc, aFlags, svgContext);
       RefPtr<ImageContainer> container;
-      result = imgCon->GetImageContainerAtSize(
-          aManager->LayerManager(), decodeSize, svgContext, aFlags, getter_AddRefs(container));
+      result = imgCon->GetImageContainerAtSize(aManager->LayerManager(),
+                                               decodeSize, svgContext, aFlags,
+                                               getter_AddRefs(container));
       if (container) {
         bool wrResult = aManager->CommandBuilder().PushImage(
             aItem, container, aBuilder, aResources, aSc, destRect, bounds);
         result &= wrResult ? ImgDrawResult::SUCCESS : ImgDrawResult::NOT_READY;
       } else {
         // We don't use &= here because we want the result to be NOT_READY so
         // the next block executes.
         result = ImgDrawResult::NOT_READY;
@@ -2306,18 +2306,18 @@ nsresult nsImageFrame::GetCursor(const n
       // XXX Using the image as the parent ComputedStyle isn't
       // technically correct, but it's probably the right thing to do
       // here, since it means that areas on which the cursor isn't
       // specified will inherit the style from the image.
       RefPtr<ComputedStyle> areaStyle =
           PresShell()->StyleSet()->ResolveStyleFor(area->AsElement(),
                                                    LazyComputeBehavior::Allow);
       FillCursorInformationFromStyle(areaStyle->StyleUI(), aCursor);
-      if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
-        aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
+      if (StyleCursorKind::Auto == aCursor.mCursor) {
+        aCursor.mCursor = StyleCursorKind::Default;
       }
       return NS_OK;
     }
   }
   return nsFrame::GetCursor(aPoint, aCursor);
 }
 
 nsresult nsImageFrame::AttributeChanged(int32_t aNameSpaceID,
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -4585,23 +4585,23 @@ nsIFrame* NS_NewContinuingTextFrame(nsIP
 
 NS_IMPL_FRAMEARENA_HELPERS(nsContinuingTextFrame)
 
 nsTextFrame::~nsTextFrame() {}
 
 nsresult nsTextFrame::GetCursor(const nsPoint& aPoint,
                                 nsIFrame::Cursor& aCursor) {
   FillCursorInformationFromStyle(StyleUI(), aCursor);
-  if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
+  if (StyleCursorKind::Auto == aCursor.mCursor) {
     if (!IsSelectable(nullptr)) {
-      aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
+      aCursor.mCursor = StyleCursorKind::Default;
     } else {
       aCursor.mCursor = GetWritingMode().IsVertical()
-                            ? NS_STYLE_CURSOR_VERTICAL_TEXT
-                            : NS_STYLE_CURSOR_TEXT;
+                            ? StyleCursorKind::VerticalText
+                            : StyleCursorKind::Text;
     }
     return NS_OK;
   } else {
     return nsFrame::GetCursor(aPoint, aCursor);
   }
 }
 
 nsTextFrame* nsTextFrame::LastInFlow() const {
--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -384,16 +384,17 @@ opaque-types = [
 
 # All cbindgen-types are in mod "structs::root::mozilla".
 cbindgen-types = [
     { gecko = "StyleAppearance", servo = "values::specified::Appearance" },
     { gecko = "StyleComputedFontStretchRange", servo = "font_face::ComputedFontStretchRange" },
     { gecko = "StyleComputedFontStyleDescriptor", servo = "font_face::ComputedFontStyleDescriptor" },
     { gecko = "StyleComputedFontWeightRange", servo = "font_face::ComputedFontWeightRange" },
     { gecko = "StyleComputedTimingFunction", servo = "values::computed::easing::TimingFunction" },
+    { gecko = "StyleCursorKind", servo = "values::computed::ui::CursorKind" },
     { gecko = "StyleDisplay", servo = "values::specified::Display" },
     { gecko = "StyleDisplayMode", servo = "gecko::media_features::DisplayMode" },
     { gecko = "StyleExtremumLength", servo = "values::computed::length::ExtremumLength" },
     { gecko = "StyleFillRule", servo = "values::generics::basic_shape::FillRule" },
     { gecko = "StyleFontDisplay", servo = "font_face::FontDisplay" },
     { gecko = "StyleFontFaceSourceListComponent", servo = "font_face::FontFaceSourceListComponent" },
     { gecko = "StyleFontLanguageOverride", servo = "values::computed::font::FontLanguageOverride" },
     { gecko = "StylePathCommand", servo = "values::specified::svg_path::PathCommand" },
--- a/layout/style/ServoCSSPropList.mako.py
+++ b/layout/style/ServoCSSPropList.mako.py
@@ -77,16 +77,17 @@ SERIALIZED_PREDEFINED_TYPES = [
     "BreakBetween",
     "BreakWithin",
     "Clear",
     "ClipRectOrAuto",
     "Color",
     "Content",
     "CounterIncrement",
     "CounterReset",
+    "Cursor",
     "FillRule",
     "Float",
     "FontFamily",
     "FontFeatureSettings",
     "FontLanguageOverride",
     "FontSize",
     "FontSizeAdjust",
     "FontStretch",
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -172,59 +172,59 @@ const nsCString& nsCSSProps::GetStringVa
 /***************************************************************************/
 
 const KTableEntry nsCSSProps::kBoxShadowTypeKTable[] = {
     {eCSSKeyword_inset, uint8_t(StyleBoxShadowType::Inset)},
     {eCSSKeyword_UNKNOWN, -1}};
 
 const KTableEntry nsCSSProps::kCursorKTable[] = {
     // CSS 2.0
-    {eCSSKeyword_auto, NS_STYLE_CURSOR_AUTO},
-    {eCSSKeyword_crosshair, NS_STYLE_CURSOR_CROSSHAIR},
-    {eCSSKeyword_default, NS_STYLE_CURSOR_DEFAULT},
-    {eCSSKeyword_pointer, NS_STYLE_CURSOR_POINTER},
-    {eCSSKeyword_move, NS_STYLE_CURSOR_MOVE},
-    {eCSSKeyword_e_resize, NS_STYLE_CURSOR_E_RESIZE},
-    {eCSSKeyword_ne_resize, NS_STYLE_CURSOR_NE_RESIZE},
-    {eCSSKeyword_nw_resize, NS_STYLE_CURSOR_NW_RESIZE},
-    {eCSSKeyword_n_resize, NS_STYLE_CURSOR_N_RESIZE},
-    {eCSSKeyword_se_resize, NS_STYLE_CURSOR_SE_RESIZE},
-    {eCSSKeyword_sw_resize, NS_STYLE_CURSOR_SW_RESIZE},
-    {eCSSKeyword_s_resize, NS_STYLE_CURSOR_S_RESIZE},
-    {eCSSKeyword_w_resize, NS_STYLE_CURSOR_W_RESIZE},
-    {eCSSKeyword_text, NS_STYLE_CURSOR_TEXT},
-    {eCSSKeyword_wait, NS_STYLE_CURSOR_WAIT},
-    {eCSSKeyword_help, NS_STYLE_CURSOR_HELP},
+    {eCSSKeyword_auto, StyleCursorKind::Auto},
+    {eCSSKeyword_crosshair, StyleCursorKind::Crosshair},
+    {eCSSKeyword_default, StyleCursorKind::Default},
+    {eCSSKeyword_pointer, StyleCursorKind::Pointer},
+    {eCSSKeyword_move, StyleCursorKind::Move},
+    {eCSSKeyword_e_resize, StyleCursorKind::EResize},
+    {eCSSKeyword_ne_resize, StyleCursorKind::NeResize},
+    {eCSSKeyword_nw_resize, StyleCursorKind::NwResize},
+    {eCSSKeyword_n_resize, StyleCursorKind::NResize},
+    {eCSSKeyword_se_resize, StyleCursorKind::SeResize},
+    {eCSSKeyword_sw_resize, StyleCursorKind::SwResize},
+    {eCSSKeyword_s_resize, StyleCursorKind::SResize},
+    {eCSSKeyword_w_resize, StyleCursorKind::WResize},
+    {eCSSKeyword_text, StyleCursorKind::Text},
+    {eCSSKeyword_wait, StyleCursorKind::Wait},
+    {eCSSKeyword_help, StyleCursorKind::Help},
     // CSS 2.1
-    {eCSSKeyword_progress, NS_STYLE_CURSOR_SPINNING},
+    {eCSSKeyword_progress, StyleCursorKind::Progress},
     // CSS3 basic user interface module
-    {eCSSKeyword_copy, NS_STYLE_CURSOR_COPY},
-    {eCSSKeyword_alias, NS_STYLE_CURSOR_ALIAS},
-    {eCSSKeyword_context_menu, NS_STYLE_CURSOR_CONTEXT_MENU},
-    {eCSSKeyword_cell, NS_STYLE_CURSOR_CELL},
-    {eCSSKeyword_not_allowed, NS_STYLE_CURSOR_NOT_ALLOWED},
-    {eCSSKeyword_col_resize, NS_STYLE_CURSOR_COL_RESIZE},
-    {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},
-    {eCSSKeyword_grab, NS_STYLE_CURSOR_GRAB},
-    {eCSSKeyword_grabbing, NS_STYLE_CURSOR_GRABBING},
-    {eCSSKeyword_zoom_in, NS_STYLE_CURSOR_ZOOM_IN},
-    {eCSSKeyword_zoom_out, NS_STYLE_CURSOR_ZOOM_OUT},
+    {eCSSKeyword_copy, StyleCursorKind::Copy},
+    {eCSSKeyword_alias, StyleCursorKind::Alias},
+    {eCSSKeyword_context_menu, StyleCursorKind::ContextMenu},
+    {eCSSKeyword_cell, StyleCursorKind::Cell},
+    {eCSSKeyword_not_allowed, StyleCursorKind::NotAllowed},
+    {eCSSKeyword_col_resize, StyleCursorKind::ColResize},
+    {eCSSKeyword_row_resize, StyleCursorKind::RowResize},
+    {eCSSKeyword_no_drop, StyleCursorKind::NoDrop},
+    {eCSSKeyword_vertical_text, StyleCursorKind::VerticalText},
+    {eCSSKeyword_all_scroll, StyleCursorKind::AllScroll},
+    {eCSSKeyword_nesw_resize, StyleCursorKind::NeswResize},
+    {eCSSKeyword_nwse_resize, StyleCursorKind::NwseResize},
+    {eCSSKeyword_ns_resize, StyleCursorKind::NsResize},
+    {eCSSKeyword_ew_resize, StyleCursorKind::EwResize},
+    {eCSSKeyword_none, StyleCursorKind::None},
+    {eCSSKeyword_grab, StyleCursorKind::Grab},
+    {eCSSKeyword_grabbing, StyleCursorKind::Grabbing},
+    {eCSSKeyword_zoom_in, StyleCursorKind::ZoomIn},
+    {eCSSKeyword_zoom_out, StyleCursorKind::ZoomOut},
     // -moz- prefixed vendor specific
-    {eCSSKeyword__moz_grab, NS_STYLE_CURSOR_GRAB},
-    {eCSSKeyword__moz_grabbing, NS_STYLE_CURSOR_GRABBING},
-    {eCSSKeyword__moz_zoom_in, NS_STYLE_CURSOR_ZOOM_IN},
-    {eCSSKeyword__moz_zoom_out, NS_STYLE_CURSOR_ZOOM_OUT},
+    {eCSSKeyword__moz_grab, StyleCursorKind::Grab},
+    {eCSSKeyword__moz_grabbing, StyleCursorKind::Grabbing},
+    {eCSSKeyword__moz_zoom_in, StyleCursorKind::ZoomIn},
+    {eCSSKeyword__moz_zoom_out, StyleCursorKind::ZoomOut},
     {eCSSKeyword_UNKNOWN, -1}};
 
 KTableEntry nsCSSProps::kDisplayKTable[] = {
     {eCSSKeyword_none, StyleDisplay::None},
     {eCSSKeyword_inline, StyleDisplay::Inline},
     {eCSSKeyword_block, StyleDisplay::Block},
     {eCSSKeyword_inline_block, StyleDisplay::InlineBlock},
     {eCSSKeyword_list_item, StyleDisplay::ListItem},
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -2256,48 +2256,16 @@ static_assert(NS_STYLE_UNICODE_BIDI_NORM
               "unicode-bidi style constants not as expected");
 
 already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetCaretColor() {
   RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
   SetValueFromComplexColor(val, StyleUI()->mCaretColor);
   return val.forget();
 }
 
-already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetCursor() {
-  RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
-
-  const nsStyleUI* ui = StyleUI();
-
-  for (const nsCursorImage& item : ui->mCursorImages) {
-    RefPtr<nsDOMCSSValueList> itemList = GetROCSSValueList(false);
-
-    RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
-    SetValueToURLValue(item.mImage->GetImageValue(), val);
-    itemList->AppendCSSValue(val.forget());
-
-    if (item.mHaveHotspot) {
-      RefPtr<nsROCSSPrimitiveValue> valX = new nsROCSSPrimitiveValue;
-      RefPtr<nsROCSSPrimitiveValue> valY = new nsROCSSPrimitiveValue;
-
-      valX->SetNumber(item.mHotspotX);
-      valY->SetNumber(item.mHotspotY);
-
-      itemList->AppendCSSValue(valX.forget());
-      itemList->AppendCSSValue(valY.forget());
-    }
-    valueList->AppendCSSValue(itemList.forget());
-  }
-
-  RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
-  val->SetIdent(
-      nsCSSProps::ValueToKeywordEnum(ui->mCursor, nsCSSProps::kCursorKTable));
-  valueList->AppendCSSValue(val.forget());
-  return valueList.forget();
-}
-
 already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetBoxFlex() {
   RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
   val->SetNumber(StyleXUL()->mBoxFlex);
   return val.forget();
 }
 
 /* Border image properties */
 
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -339,17 +339,16 @@ class nsComputedDOMStyle final : public 
   already_AddRefed<CSSValue> DoGetPerspective();
   already_AddRefed<CSSValue> DoGetPerspectiveOrigin();
   already_AddRefed<CSSValue> DoGetScrollSnapPointsX();
   already_AddRefed<CSSValue> DoGetScrollSnapPointsY();
   already_AddRefed<CSSValue> DoGetScrollbarColor();
 
   /* User interface properties */
   already_AddRefed<CSSValue> DoGetCaretColor();
-  already_AddRefed<CSSValue> DoGetCursor();
   already_AddRefed<CSSValue> DoGetForceBrokenImageIcon();
 
   /* Column properties */
   already_AddRefed<CSSValue> DoGetColumnCount();
   already_AddRefed<CSSValue> DoGetColumnWidth();
   already_AddRefed<CSSValue> DoGetColumnRuleWidth();
 
   /* CSS Transitions */
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -292,54 +292,16 @@ enum class StyleBorderImageRepeat : uint
 enum class StyleContent : uint8_t {
   OpenQuote,
   CloseQuote,
   NoOpenQuote,
   NoCloseQuote,
   AltContent
 };
 
-// See nsStyleUI
-#define NS_STYLE_CURSOR_AUTO 1
-#define NS_STYLE_CURSOR_CROSSHAIR 2
-#define NS_STYLE_CURSOR_DEFAULT 3  // ie: an arrow
-#define NS_STYLE_CURSOR_POINTER 4  // for links
-#define NS_STYLE_CURSOR_MOVE 5
-#define NS_STYLE_CURSOR_E_RESIZE 6
-#define NS_STYLE_CURSOR_NE_RESIZE 7
-#define NS_STYLE_CURSOR_NW_RESIZE 8
-#define NS_STYLE_CURSOR_N_RESIZE 9
-#define NS_STYLE_CURSOR_SE_RESIZE 10
-#define NS_STYLE_CURSOR_SW_RESIZE 11
-#define NS_STYLE_CURSOR_S_RESIZE 12
-#define NS_STYLE_CURSOR_W_RESIZE 13
-#define NS_STYLE_CURSOR_TEXT 14  // ie: i-beam
-#define NS_STYLE_CURSOR_WAIT 15
-#define NS_STYLE_CURSOR_HELP 16
-#define NS_STYLE_CURSOR_COPY 17  // CSS3
-#define NS_STYLE_CURSOR_ALIAS 18
-#define NS_STYLE_CURSOR_CONTEXT_MENU 19
-#define NS_STYLE_CURSOR_CELL 20
-#define NS_STYLE_CURSOR_GRAB 21
-#define NS_STYLE_CURSOR_GRABBING 22
-#define NS_STYLE_CURSOR_SPINNING 23
-#define NS_STYLE_CURSOR_ZOOM_IN 24
-#define NS_STYLE_CURSOR_ZOOM_OUT 25
-#define NS_STYLE_CURSOR_NOT_ALLOWED 26
-#define NS_STYLE_CURSOR_COL_RESIZE 27
-#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 nsStyleVisibility
 #define NS_STYLE_DIRECTION_LTR 0
 #define NS_STYLE_DIRECTION_RTL 1
 
 // See nsStyleVisibility
 // NOTE: WritingModes.h depends on the particular values used here.
 #define NS_STYLE_WRITING_MODE_HORIZONTAL_TB 0
 #define NS_STYLE_WRITING_MODE_VERTICAL_RL 1
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -3994,17 +3994,17 @@ bool nsCursorImage::operator==(const nsC
          DefinitelyEqualImages(mImage, aOther.mImage);
 }
 
 nsStyleUI::nsStyleUI(const nsPresContext* aContext)
     : mUserInput(StyleUserInput::Auto),
       mUserModify(StyleUserModify::ReadOnly),
       mUserFocus(StyleUserFocus::None),
       mPointerEvents(NS_STYLE_POINTER_EVENTS_AUTO),
-      mCursor(NS_STYLE_CURSOR_AUTO),
+      mCursor(StyleCursorKind::Auto),
       mCaretColor(StyleComplexColor::Auto()),
       mScrollbarFaceColor(StyleComplexColor::Auto()),
       mScrollbarTrackColor(StyleComplexColor::Auto()) {
   MOZ_COUNT_CTOR(nsStyleUI);
 }
 
 nsStyleUI::nsStyleUI(const nsStyleUI& aSource)
     : mUserInput(aSource.mUserInput),
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -2569,17 +2569,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
 
   nsChangeHint CalcDifference(const nsStyleUI& aNewData) const;
 
   mozilla::StyleUserInput mUserInput;
   mozilla::StyleUserModify mUserModify;  // (modify-content)
   mozilla::StyleUserFocus mUserFocus;    // (auto-select)
   uint8_t mPointerEvents;                // NS_STYLE_POINTER_EVENTS_*
 
-  uint8_t mCursor;                        // NS_STYLE_CURSOR_*
+  mozilla::StyleCursorKind mCursor;
   nsTArray<nsCursorImage> mCursorImages;  // images and coords
   mozilla::StyleComplexColor mCaretColor;
 
   mozilla::StyleComplexColor mScrollbarFaceColor;
   mozilla::StyleComplexColor mScrollbarTrackColor;
 
   inline uint8_t GetEffectivePointerEvents(nsIFrame* aFrame) const;
 
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2228,18 +2228,18 @@ nsresult nsTreeBodyFrame::GetCursor(cons
     nsCSSAnonBoxPseudoStaticAtom* child;
     GetCellAt(aPoint.x, aPoint.y, &row, &col, &child);
 
     if (child) {
       // Our scratch array is already prefilled.
       ComputedStyle* childContext = GetPseudoComputedStyle(child);
 
       FillCursorInformationFromStyle(childContext->StyleUI(), aCursor);
-      if (aCursor.mCursor == NS_STYLE_CURSOR_AUTO)
-        aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
+      if (aCursor.mCursor == StyleCursorKind::Auto)
+        aCursor.mCursor = StyleCursorKind::Default;
 
       return NS_OK;
     }
   }
 
   return nsLeafBoxFrame::GetCursor(aPoint, aCursor);
 }
 
--- a/servo/components/style/cbindgen.toml
+++ b/servo/components/style/cbindgen.toml
@@ -43,16 +43,17 @@ include = [
   "BreakBetween",
   "BreakWithin",
   "BorderStyle",
   "OutlineStyle",
   "ComputedFontStretchRange",
   "ComputedFontStyleDescriptor",
   "ComputedFontWeightRange",
   "ComputedTimingFunction",
+  "CursorKind",
   "Display",
   "DisplayMode",
   "ExtremumLength",
   "FillRule",
   "FontDisplay",
   "FontFaceSourceListComponent",
   "FontLanguageOverride",
   "OverflowWrap",
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -5157,62 +5157,17 @@ clip-path
         let color = ${get_gecko_property("mColor")} as u32;
         convert_nscolor_to_rgba(color)
     }
 </%self:impl_trait>
 
 <%self:impl_trait style_struct_name="InheritedUI"
                   skip_longhands="cursor scrollbar-color">
     pub fn set_cursor(&mut self, v: longhands::cursor::computed_value::T) {
-        use style_traits::cursor::CursorKind;
-
-        self.gecko.mCursor = match v.keyword {
-            CursorKind::Auto => structs::NS_STYLE_CURSOR_AUTO,
-            CursorKind::None => structs::NS_STYLE_CURSOR_NONE,
-            CursorKind::Default => structs::NS_STYLE_CURSOR_DEFAULT,
-            CursorKind::Pointer => structs::NS_STYLE_CURSOR_POINTER,
-            CursorKind::ContextMenu => structs::NS_STYLE_CURSOR_CONTEXT_MENU,
-            CursorKind::Help => structs::NS_STYLE_CURSOR_HELP,
-            CursorKind::Progress => structs::NS_STYLE_CURSOR_SPINNING,
-            CursorKind::Wait => structs::NS_STYLE_CURSOR_WAIT,
-            CursorKind::Cell => structs::NS_STYLE_CURSOR_CELL,
-            CursorKind::Crosshair => structs::NS_STYLE_CURSOR_CROSSHAIR,
-            CursorKind::Text => structs::NS_STYLE_CURSOR_TEXT,
-            CursorKind::VerticalText => structs::NS_STYLE_CURSOR_VERTICAL_TEXT,
-            CursorKind::Alias => structs::NS_STYLE_CURSOR_ALIAS,
-            CursorKind::Copy => structs::NS_STYLE_CURSOR_COPY,
-            CursorKind::Move => structs::NS_STYLE_CURSOR_MOVE,
-            CursorKind::NoDrop => structs::NS_STYLE_CURSOR_NO_DROP,
-            CursorKind::NotAllowed => structs::NS_STYLE_CURSOR_NOT_ALLOWED,
-            CursorKind::Grab => structs::NS_STYLE_CURSOR_GRAB,
-            CursorKind::Grabbing => structs::NS_STYLE_CURSOR_GRABBING,
-            CursorKind::EResize => structs::NS_STYLE_CURSOR_E_RESIZE,
-            CursorKind::NResize => structs::NS_STYLE_CURSOR_N_RESIZE,
-            CursorKind::NeResize => structs::NS_STYLE_CURSOR_NE_RESIZE,
-            CursorKind::NwResize => structs::NS_STYLE_CURSOR_NW_RESIZE,
-            CursorKind::SResize => structs::NS_STYLE_CURSOR_S_RESIZE,
-            CursorKind::SeResize => structs::NS_STYLE_CURSOR_SE_RESIZE,
-            CursorKind::SwResize => structs::NS_STYLE_CURSOR_SW_RESIZE,
-            CursorKind::WResize => structs::NS_STYLE_CURSOR_W_RESIZE,
-            CursorKind::EwResize => structs::NS_STYLE_CURSOR_EW_RESIZE,
-            CursorKind::NsResize => structs::NS_STYLE_CURSOR_NS_RESIZE,
-            CursorKind::NeswResize => structs::NS_STYLE_CURSOR_NESW_RESIZE,
-            CursorKind::NwseResize => structs::NS_STYLE_CURSOR_NWSE_RESIZE,
-            CursorKind::ColResize => structs::NS_STYLE_CURSOR_COL_RESIZE,
-            CursorKind::RowResize => structs::NS_STYLE_CURSOR_ROW_RESIZE,
-            CursorKind::AllScroll => structs::NS_STYLE_CURSOR_ALL_SCROLL,
-            CursorKind::ZoomIn => structs::NS_STYLE_CURSOR_ZOOM_IN,
-            CursorKind::ZoomOut => structs::NS_STYLE_CURSOR_ZOOM_OUT,
-            // note: the following properties are gecko-only.
-            CursorKind::MozGrab => structs::NS_STYLE_CURSOR_GRAB,
-            CursorKind::MozGrabbing => structs::NS_STYLE_CURSOR_GRABBING,
-            CursorKind::MozZoomIn => structs::NS_STYLE_CURSOR_ZOOM_IN,
-            CursorKind::MozZoomOut => structs::NS_STYLE_CURSOR_ZOOM_OUT,
-        } as u8;
-
+        self.gecko.mCursor = v.keyword;
         unsafe {
             Gecko_SetCursorArrayLength(&mut self.gecko, v.images.len());
         }
         for i in 0..v.images.len() {
             unsafe {
                 Gecko_SetCursorImageValue(
                     &mut self.gecko.mCursorImages[i],
                     v.images[i].url.url_value_ptr(),
@@ -5241,57 +5196,18 @@ clip-path
 
     pub fn reset_cursor(&mut self, other: &Self) {
         self.copy_cursor_from(other)
     }
 
     pub fn clone_cursor(&self) -> longhands::cursor::computed_value::T {
         use crate::values::computed::ui::CursorImage;
         use crate::values::computed::url::ComputedImageUrl;
-        use style_traits::cursor::CursorKind;
-
-        let keyword = match self.gecko.mCursor as u32 {
-            structs::NS_STYLE_CURSOR_AUTO => CursorKind::Auto,
-            structs::NS_STYLE_CURSOR_NONE => CursorKind::None,
-            structs::NS_STYLE_CURSOR_DEFAULT => CursorKind::Default,
-            structs::NS_STYLE_CURSOR_POINTER => CursorKind::Pointer,
-            structs::NS_STYLE_CURSOR_CONTEXT_MENU => CursorKind::ContextMenu,
-            structs::NS_STYLE_CURSOR_HELP => CursorKind::Help,
-            structs::NS_STYLE_CURSOR_SPINNING => CursorKind::Progress,
-            structs::NS_STYLE_CURSOR_WAIT => CursorKind::Wait,
-            structs::NS_STYLE_CURSOR_CELL => CursorKind::Cell,
-            structs::NS_STYLE_CURSOR_CROSSHAIR => CursorKind::Crosshair,
-            structs::NS_STYLE_CURSOR_TEXT => CursorKind::Text,
-            structs::NS_STYLE_CURSOR_VERTICAL_TEXT => CursorKind::VerticalText,
-            structs::NS_STYLE_CURSOR_ALIAS => CursorKind::Alias,
-            structs::NS_STYLE_CURSOR_COPY => CursorKind::Copy,
-            structs::NS_STYLE_CURSOR_MOVE => CursorKind::Move,
-            structs::NS_STYLE_CURSOR_NO_DROP => CursorKind::NoDrop,
-            structs::NS_STYLE_CURSOR_NOT_ALLOWED => CursorKind::NotAllowed,
-            structs::NS_STYLE_CURSOR_GRAB => CursorKind::Grab,
-            structs::NS_STYLE_CURSOR_GRABBING => CursorKind::Grabbing,
-            structs::NS_STYLE_CURSOR_E_RESIZE => CursorKind::EResize,
-            structs::NS_STYLE_CURSOR_N_RESIZE => CursorKind::NResize,
-            structs::NS_STYLE_CURSOR_NE_RESIZE => CursorKind::NeResize,
-            structs::NS_STYLE_CURSOR_NW_RESIZE => CursorKind::NwResize,
-            structs::NS_STYLE_CURSOR_S_RESIZE => CursorKind::SResize,
-            structs::NS_STYLE_CURSOR_SE_RESIZE => CursorKind::SeResize,
-            structs::NS_STYLE_CURSOR_SW_RESIZE => CursorKind::SwResize,
-            structs::NS_STYLE_CURSOR_W_RESIZE => CursorKind::WResize,
-            structs::NS_STYLE_CURSOR_EW_RESIZE => CursorKind::EwResize,
-            structs::NS_STYLE_CURSOR_NS_RESIZE => CursorKind::NsResize,
-            structs::NS_STYLE_CURSOR_NESW_RESIZE => CursorKind::NeswResize,
-            structs::NS_STYLE_CURSOR_NWSE_RESIZE => CursorKind::NwseResize,
-            structs::NS_STYLE_CURSOR_COL_RESIZE => CursorKind::ColResize,
-            structs::NS_STYLE_CURSOR_ROW_RESIZE => CursorKind::RowResize,
-            structs::NS_STYLE_CURSOR_ALL_SCROLL => CursorKind::AllScroll,
-            structs::NS_STYLE_CURSOR_ZOOM_IN => CursorKind::ZoomIn,
-            structs::NS_STYLE_CURSOR_ZOOM_OUT => CursorKind::ZoomOut,
-            _ => panic!("Found unexpected value in style struct for cursor property"),
-        };
+
+        let keyword = self.gecko.mCursor;
 
         let images = self.gecko.mCursorImages.iter().map(|gecko_cursor_image| {
             let url = unsafe {
                 let gecko_image_request = gecko_cursor_image.mImage.mRawPtr.as_ref().unwrap();
                 ComputedImageUrl::from_image_request(&gecko_image_request)
             };
 
             let hotspot =
--- a/servo/components/style/values/computed/mod.rs
+++ b/servo/components/style/values/computed/mod.rs
@@ -23,17 +23,16 @@ use crate::rule_cache::RuleCacheConditio
 use crate::Atom;
 #[cfg(feature = "servo")]
 use crate::Prefix;
 use euclid::Size2D;
 use std::cell::RefCell;
 use std::cmp;
 use std::f32;
 use std::fmt::{self, Write};
-use style_traits::cursor::CursorKind;
 use style_traits::{CssWriter, ToCss};
 
 #[cfg(feature = "gecko")]
 pub use self::align::{AlignContent, AlignItems, JustifyContent, JustifyItems, SelfAlignment};
 #[cfg(feature = "gecko")]
 pub use self::align::{AlignSelf, JustifySelf};
 pub use self::angle::Angle;
 pub use self::background::{BackgroundRepeat, BackgroundSize};
@@ -447,17 +446,16 @@ where
 trivial_to_computed_value!(());
 trivial_to_computed_value!(bool);
 trivial_to_computed_value!(f32);
 trivial_to_computed_value!(i32);
 trivial_to_computed_value!(u8);
 trivial_to_computed_value!(u16);
 trivial_to_computed_value!(u32);
 trivial_to_computed_value!(Atom);
-trivial_to_computed_value!(CursorKind);
 #[cfg(feature = "servo")]
 trivial_to_computed_value!(Prefix);
 trivial_to_computed_value!(String);
 trivial_to_computed_value!(Box<str>);
 
 /// A `<number>` value.
 pub type Number = CSSFloat;
 
--- a/servo/components/style/values/computed/ui.rs
+++ b/servo/components/style/values/computed/ui.rs
@@ -5,16 +5,17 @@
 //! Computed values for UI properties
 
 use crate::values::computed::color::Color;
 use crate::values::computed::url::ComputedImageUrl;
 use crate::values::computed::Number;
 use crate::values::generics::ui as generics;
 use crate::values::{Auto, Either};
 
+pub use crate::values::specified::ui::CursorKind;
 pub use crate::values::specified::ui::{MozForceBrokenImageIcon, UserSelect};
 
 /// auto | <color>
 pub type ColorOrAuto = Either<Color, Auto>;
 
 /// A computed value for the `cursor` property.
 pub type Cursor = generics::Cursor<CursorImage>;
 
--- a/servo/components/style/values/generics/ui.rs
+++ b/servo/components/style/values/generics/ui.rs
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 //! Generic values for UI properties.
 
 use std::fmt::{self, Write};
-use style_traits::cursor::CursorKind;
+use values::specified::ui::CursorKind;
 use style_traits::{CssWriter, ToCss};
 
 /// A generic value for the `cursor` property.
 ///
 /// https://drafts.csswg.org/css-ui/#cursor
 #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue)]
 pub struct Cursor<Image> {
     /// The parsed images for the cursor.
--- a/servo/components/style/values/specified/ui.rs
+++ b/servo/components/style/values/specified/ui.rs
@@ -7,17 +7,16 @@
 use crate::parser::{Parse, ParserContext};
 use crate::values::generics::ui as generics;
 use crate::values::specified::color::Color;
 use crate::values::specified::url::SpecifiedImageUrl;
 use crate::values::specified::Number;
 use crate::values::{Auto, Either};
 use cssparser::Parser;
 use std::fmt::{self, Write};
-use style_traits::cursor::CursorKind;
 use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
 
 /// auto | <color>
 pub type ColorOrAuto = Either<Color, Auto>;
 
 /// A specified value for the `cursor` property.
 pub type Cursor = generics::Cursor<CursorImage>;
 
@@ -35,33 +34,21 @@ impl Parse for Cursor {
             match input.try(|input| CursorImage::parse(context, input)) {
                 Ok(image) => images.push(image),
                 Err(_) => break,
             }
             input.expect_comma()?;
         }
         Ok(Self {
             images: images.into_boxed_slice(),
-            keyword: CursorKind::parse(context, input)?,
+            keyword: CursorKind::parse(input)?,
         })
     }
 }
 
-impl Parse for CursorKind {
-    fn parse<'i, 't>(
-        _context: &ParserContext,
-        input: &mut Parser<'i, 't>,
-    ) -> Result<Self, ParseError<'i>> {
-        let location = input.current_source_location();
-        let ident = input.expect_ident()?;
-        CursorKind::from_css_keyword(&ident)
-            .map_err(|_| location.new_custom_error(StyleParseErrorKind::UnspecifiedError))
-    }
-}
-
 impl Parse for CursorImage {
     fn parse<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
         Ok(Self {
             url: SpecifiedImageUrl::parse(context, input)?,
             hotspot: match input.try(|input| Number::parse(context, input)) {
@@ -161,8 +148,68 @@ impl Parse for ScrollbarColor {
 pub enum UserSelect {
     Auto,
     Text,
     #[parse(aliases = "-moz-none")]
     None,
     /// Force selection of all children.
     All,
 }
+
+/// The keywords allowed in the Cursor property.
+///
+/// https://drafts.csswg.org/css-ui-4/#propdef-cursor
+#[allow(missing_docs)]
+#[derive(
+    Clone,
+    Copy,
+    Debug,
+    Eq,
+    MallocSizeOf,
+    Parse,
+    PartialEq,
+    SpecifiedValueInfo,
+    ToComputedValue,
+    ToCss,
+)]
+#[repr(u8)]
+pub enum CursorKind {
+    None,
+    Default,
+    Pointer,
+    ContextMenu,
+    Help,
+    Progress,
+    Wait,
+    Cell,
+    Crosshair,
+    Text,
+    VerticalText,
+    Alias,
+    Copy,
+    Move,
+    NoDrop,
+    NotAllowed,
+    Grab,
+    Grabbing,
+    EResize,
+    NResize,
+    NeResize,
+    NwResize,
+    SResize,
+    SeResize,
+    SwResize,
+    WResize,
+    EwResize,
+    NsResize,
+    NeswResize,
+    NwseResize,
+    ColResize,
+    RowResize,
+    AllScroll,
+    ZoomIn,
+    ZoomOut,
+    Auto,
+    MozGrab,
+    MozGrabbing,
+    MozZoomIn,
+    MozZoomOut,
+}
deleted file mode 100644
--- a/servo/components/style_traits/cursor.rs
+++ /dev/null
@@ -1,118 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-
-//! A list of common mouse cursors per CSS3-UI ยง 8.1.1.
-
-use super::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
-
-macro_rules! define_cursor {
-    (
-        common properties = [
-            $( $c_css: expr => $c_variant: ident = $c_value: expr, )+
-        ]
-        gecko properties = [
-            $( $g_css: expr => $g_variant: ident = $g_value: expr, )+
-        ]
-    ) => {
-        /// <https://drafts.csswg.org/css-ui/#cursor>
-        #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq)]
-        #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
-        #[repr(u8)]
-        #[allow(missing_docs)]
-        pub enum CursorKind {
-            $( $c_variant = $c_value, )+
-            $( #[cfg(feature = "gecko")] $g_variant = $g_value, )+
-        }
-
-        impl CursorKind {
-            /// Given a CSS keyword, get the corresponding cursor enum.
-            pub fn from_css_keyword(keyword: &str) -> Result<Self, ()> {
-                match_ignore_ascii_case! { &keyword,
-                    $( $c_css => Ok(CursorKind::$c_variant), )+
-                    $( #[cfg(feature = "gecko")] $g_css => Ok(CursorKind::$g_variant), )+
-                    _ => Err(())
-                }
-            }
-
-            /// From the C u8 value, get the corresponding Cursor enum.
-            pub fn from_u8(value: u8) -> Result<Self, ()> {
-                match value {
-                    $( $c_value => Ok(CursorKind::$c_variant), )+
-                    $( #[cfg(feature = "gecko")] $g_value => Ok(CursorKind::$g_variant), )+
-                    _ => Err(())
-                }
-            }
-        }
-
-        impl ToCss for CursorKind {
-            fn to_css<W>(&self, dest: &mut CssWriter<W>) -> ::std::fmt::Result where W: ::std::fmt::Write {
-                match *self {
-                    $(CursorKind::$c_variant => {
-                        ::std::fmt::Write::write_str(dest, $c_css)
-                    })+
-                    $(#[cfg(feature = "gecko")] CursorKind::$g_variant => {
-                        ::std::fmt::Write::write_str(dest, $g_css)
-                    })+
-                }
-            }
-        }
-
-        impl SpecifiedValueInfo for CursorKind {
-            fn collect_completion_keywords(f: KeywordsCollectFn) {
-                f(&[
-                    $($c_css,)+
-                    $($g_css,)+
-                ]);
-            }
-        }
-    }
-}
-
-define_cursor! {
-    common properties = [
-        "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,
-        "auto" => Auto = 35,
-    ]
-    // gecko only properties
-    gecko properties = [
-        "-moz-grab" => MozGrab = 36,
-        "-moz-grabbing" => MozGrabbing = 37,
-        "-moz-zoom-in" => MozZoomIn = 38,
-        "-moz-zoom-out" => MozZoomOut = 39,
-    ]
-}
--- a/servo/components/style_traits/lib.rs
+++ b/servo/components/style_traits/lib.rs
@@ -76,17 +76,16 @@ impl PinchZoomFactor {
 pub enum CSSPixel {}
 
 // In summary, the hierarchy of pixel units and the factors to convert from one to the next:
 //
 // DevicePixel
 //   / hidpi_ratio => DeviceIndependentPixel
 //     / desktop_zoom => CSSPixel
 
-pub mod cursor;
 pub mod specified_value_info;
 #[macro_use]
 pub mod values;
 #[macro_use]
 pub mod viewport;
 
 pub use crate::specified_value_info::{CssType, KeywordsCollectFn, SpecifiedValueInfo};
 pub use crate::values::{