Unprefix CSS cursor values grab and grabbing
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Apr 2017 18:48:04 +0000 (18:48 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Apr 2017 18:48:04 +0000 (18:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=170543

Reviewed by Jon Lee.

Source/WebCore:

Add support for unprefixed "grab" and "grabbing" values for cursor (retaining
support for the prefixed values) which are now in <https://drafts.csswg.org/css-ui-3/#cursor>

Canonicalize the order of the values based on the order in the spec in the enums
and switch statements.

Tested by fast/css/cursor-parsing.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ECursor):
* css/CSSProperties.json:
* css/CSSValueKeywords.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::selectCursor):
* rendering/style/RenderStyleConstants.h:

Source/WebInspectorUI:

Sort the cursor autosuggestions to match the order in the spec, and add the unprefixed
grab and grabbing values.

* UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

Enhanced the cursor test to check round-tripping of all values.

* fast/css/cursor-parsing-expected.txt:
* fast/css/cursor-parsing.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215146 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/css/cursor-parsing-expected.txt
LayoutTests/fast/css/cursor-parsing.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/page/EventHandler.cpp
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js

index 053b7d0..69659c0 100644 (file)
@@ -1,3 +1,15 @@
+2017-04-08  Simon Fraser  <simon.fraser@apple.com>
+
+        Unprefix CSS cursor values grab and grabbing
+        https://bugs.webkit.org/show_bug.cgi?id=170543
+
+        Reviewed by Jon Lee.
+
+        Enhanced the cursor test to check round-tripping of all values.
+
+        * fast/css/cursor-parsing-expected.txt:
+        * fast/css/cursor-parsing.html:
+
 2017-04-08  Youenn Fablet  <youenn@apple.com>
 
         WebRTC tests gardening
 2017-04-08  Youenn Fablet  <youenn@apple.com>
 
         WebRTC tests gardening
index 431b843..27c1aa4 100644 (file)
@@ -5,10 +5,42 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 Test a bunch of cursor rules which should round-trip exactly.
 PASS roundtripCssRule("cursor: auto;") is "cursor: auto;"
 
 Test a bunch of cursor rules which should round-trip exactly.
 PASS roundtripCssRule("cursor: auto;") is "cursor: auto;"
+PASS roundtripCssRule("cursor: default;") is "cursor: default;"
 PASS roundtripCssRule("cursor: none;") is "cursor: none;"
 PASS roundtripCssRule("cursor: none;") is "cursor: none;"
+PASS roundtripCssRule("cursor: context-menu;") is "cursor: context-menu;"
+PASS roundtripCssRule("cursor: help;") is "cursor: help;"
+PASS roundtripCssRule("cursor: pointer;") is "cursor: pointer;"
+PASS roundtripCssRule("cursor: progress;") is "cursor: progress;"
+PASS roundtripCssRule("cursor: wait;") is "cursor: wait;"
+PASS roundtripCssRule("cursor: cell;") is "cursor: cell;"
+PASS roundtripCssRule("cursor: crosshair;") is "cursor: crosshair;"
+PASS roundtripCssRule("cursor: text;") is "cursor: text;"
+PASS roundtripCssRule("cursor: vertical-text;") is "cursor: vertical-text;"
+PASS roundtripCssRule("cursor: alias;") is "cursor: alias;"
 PASS roundtripCssRule("cursor: copy;") is "cursor: copy;"
 PASS roundtripCssRule("cursor: copy;") is "cursor: copy;"
+PASS roundtripCssRule("cursor: move;") is "cursor: move;"
+PASS roundtripCssRule("cursor: no-drop;") is "cursor: no-drop;"
+PASS roundtripCssRule("cursor: not-allowed;") is "cursor: not-allowed;"
+PASS roundtripCssRule("cursor: grab;") is "cursor: grab;"
+PASS roundtripCssRule("cursor: grabbing;") is "cursor: grabbing;"
+PASS roundtripCssRule("cursor: e-resize;") is "cursor: e-resize;"
+PASS roundtripCssRule("cursor: n-resize;") is "cursor: n-resize;"
+PASS roundtripCssRule("cursor: ne-resize;") is "cursor: ne-resize;"
+PASS roundtripCssRule("cursor: nw-resize;") is "cursor: nw-resize;"
+PASS roundtripCssRule("cursor: s-resize;") is "cursor: s-resize;"
+PASS roundtripCssRule("cursor: se-resize;") is "cursor: se-resize;"
+PASS roundtripCssRule("cursor: sw-resize;") is "cursor: sw-resize;"
+PASS roundtripCssRule("cursor: w-resize;") is "cursor: w-resize;"
+PASS roundtripCssRule("cursor: ew-resize;") is "cursor: ew-resize;"
+PASS roundtripCssRule("cursor: ns-resize;") is "cursor: ns-resize;"
+PASS roundtripCssRule("cursor: nesw-resize;") is "cursor: nesw-resize;"
+PASS roundtripCssRule("cursor: nwse-resize;") is "cursor: nwse-resize;"
+PASS roundtripCssRule("cursor: col-resize;") is "cursor: col-resize;"
+PASS roundtripCssRule("cursor: row-resize;") is "cursor: row-resize;"
+PASS roundtripCssRule("cursor: all-scroll;") is "cursor: all-scroll;"
 PASS roundtripCssRule("cursor: zoom-in;") is "cursor: zoom-in;"
 PASS roundtripCssRule("cursor: zoom-out;") is "cursor: zoom-out;"
 PASS roundtripCssRule("cursor: zoom-in;") is "cursor: zoom-in;"
 PASS roundtripCssRule("cursor: zoom-out;") is "cursor: zoom-out;"
+PASS roundtripCssRule("cursor: -webkit-grab;") is "cursor: -webkit-grab;"
 PASS roundtripCssRule("cursor: -webkit-grabbing;") is "cursor: -webkit-grabbing;"
 PASS roundtripCssRule("cursor: -webkit-zoom-in;") is "cursor: -webkit-zoom-in;"
 PASS roundtripCssRule("cursor: -webkit-zoom-out;") is "cursor: -webkit-zoom-out;"
 PASS roundtripCssRule("cursor: -webkit-grabbing;") is "cursor: -webkit-grabbing;"
 PASS roundtripCssRule("cursor: -webkit-zoom-in;") is "cursor: -webkit-zoom-in;"
 PASS roundtripCssRule("cursor: -webkit-zoom-out;") is "cursor: -webkit-zoom-out;"
index 245eebf..a6d07c9 100644 (file)
@@ -40,14 +40,48 @@ function roundtripCssRule(cssText)
 // to avoid triggering any network activity.
 
 debug('Test a bunch of cursor rules which should round-trip exactly.');
 // to avoid triggering any network activity.
 
 debug('Test a bunch of cursor rules which should round-trip exactly.');
+
 testCursorRule('auto');
 testCursorRule('auto');
+testCursorRule('default');
 testCursorRule('none');
 testCursorRule('none');
+testCursorRule('context-menu');
+testCursorRule('help');
+testCursorRule('pointer');
+testCursorRule('progress');
+testCursorRule('wait');
+testCursorRule('cell');
+testCursorRule('crosshair');
+testCursorRule('text');
+testCursorRule('vertical-text');
+testCursorRule('alias');
 testCursorRule('copy');
 testCursorRule('copy');
+testCursorRule('move');
+testCursorRule('no-drop');
+testCursorRule('not-allowed');
+testCursorRule('grab');
+testCursorRule('grabbing');
+testCursorRule('e-resize');
+testCursorRule('n-resize');
+testCursorRule('ne-resize');
+testCursorRule('nw-resize');
+testCursorRule('s-resize');
+testCursorRule('se-resize');
+testCursorRule('sw-resize');
+testCursorRule('w-resize');
+testCursorRule('ew-resize');
+testCursorRule('ns-resize');
+testCursorRule('nesw-resize');
+testCursorRule('nwse-resize');
+testCursorRule('col-resize');
+testCursorRule('row-resize');
+testCursorRule('all-scroll');
 testCursorRule('zoom-in');
 testCursorRule('zoom-out');
 testCursorRule('zoom-in');
 testCursorRule('zoom-out');
+testCursorRule('-webkit-grab');
 testCursorRule('-webkit-grabbing');
 testCursorRule('-webkit-zoom-in');
 testCursorRule('-webkit-zoom-out');
 testCursorRule('-webkit-grabbing');
 testCursorRule('-webkit-zoom-in');
 testCursorRule('-webkit-zoom-out');
+
 testCursorRule('url(file:///foo.png), crosshair');
 testCursorRule('url(file:///foo.png), url(file:///foo2.png), pointer');
 testCursorRule('url(file:///foo.png) 12 3, pointer');
 testCursorRule('url(file:///foo.png), crosshair');
 testCursorRule('url(file:///foo.png), url(file:///foo2.png), pointer');
 testCursorRule('url(file:///foo.png) 12 3, pointer');
index 0b9c509..d6256aa 100644 (file)
@@ -1,3 +1,27 @@
+2017-04-08  Simon Fraser  <simon.fraser@apple.com>
+
+        Unprefix CSS cursor values grab and grabbing
+        https://bugs.webkit.org/show_bug.cgi?id=170543
+
+        Reviewed by Jon Lee.
+
+        Add support for unprefixed "grab" and "grabbing" values for cursor (retaining
+        support for the prefixed values) which are now in <https://drafts.csswg.org/css-ui-3/#cursor>
+
+        Canonicalize the order of the values based on the order in the spec in the enums
+        and switch statements.
+
+        Tested by fast/css/cursor-parsing.html
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator ECursor):
+        * css/CSSProperties.json:
+        * css/CSSValueKeywords.in:
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::selectCursor):
+        * rendering/style/RenderStyleConstants.h:
+
 2017-04-08  Youenn Fablet  <youenn@apple.com>
 
         WebRTC tests gardening
 2017-04-08  Youenn Fablet  <youenn@apple.com>
 
         WebRTC tests gardening
index cce8e9b..1e4125a 100644 (file)
@@ -1161,38 +1161,47 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECursor e)
     case CursorAuto:
         m_value.valueID = CSSValueAuto;
         break;
     case CursorAuto:
         m_value.valueID = CSSValueAuto;
         break;
-    case CursorCross:
-        m_value.valueID = CSSValueCrosshair;
-        break;
     case CursorDefault:
         m_value.valueID = CSSValueDefault;
         break;
     case CursorDefault:
         m_value.valueID = CSSValueDefault;
         break;
+    case CursorNone:
+        m_value.valueID = CSSValueNone;
+        break;
+    case CursorContextMenu:
+        m_value.valueID = CSSValueContextMenu;
+        break;
+    case CursorHelp:
+        m_value.valueID = CSSValueHelp;
+        break;
     case CursorPointer:
         m_value.valueID = CSSValuePointer;
         break;
     case CursorPointer:
         m_value.valueID = CSSValuePointer;
         break;
-    case CursorMove:
-        m_value.valueID = CSSValueMove;
+    case CursorProgress:
+        m_value.valueID = CSSValueProgress;
+        break;
+    case CursorWait:
+        m_value.valueID = CSSValueWait;
         break;
     case CursorCell:
         m_value.valueID = CSSValueCell;
         break;
         break;
     case CursorCell:
         m_value.valueID = CSSValueCell;
         break;
+    case CursorCrosshair:
+        m_value.valueID = CSSValueCrosshair;
+        break;
+    case CursorText:
+        m_value.valueID = CSSValueText;
+        break;
     case CursorVerticalText:
         m_value.valueID = CSSValueVerticalText;
         break;
     case CursorVerticalText:
         m_value.valueID = CSSValueVerticalText;
         break;
-    case CursorContextMenu:
-        m_value.valueID = CSSValueContextMenu;
-        break;
     case CursorAlias:
         m_value.valueID = CSSValueAlias;
         break;
     case CursorCopy:
         m_value.valueID = CSSValueCopy;
         break;
     case CursorAlias:
         m_value.valueID = CSSValueAlias;
         break;
     case CursorCopy:
         m_value.valueID = CSSValueCopy;
         break;
-    case CursorNone:
-        m_value.valueID = CSSValueNone;
-        break;
-    case CursorProgress:
-        m_value.valueID = CSSValueProgress;
+    case CursorMove:
+        m_value.valueID = CSSValueMove;
         break;
     case CursorNoDrop:
         m_value.valueID = CSSValueNoDrop;
         break;
     case CursorNoDrop:
         m_value.valueID = CSSValueNoDrop;
@@ -1200,23 +1209,26 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECursor e)
     case CursorNotAllowed:
         m_value.valueID = CSSValueNotAllowed;
         break;
     case CursorNotAllowed:
         m_value.valueID = CSSValueNotAllowed;
         break;
-    case CursorZoomIn:
-        m_value.valueID = CSSValueZoomIn;
+    case CursorGrab:
+        m_value.valueID = CSSValueGrab;
         break;
         break;
-    case CursorZoomOut:
-        m_value.valueID = CSSValueZoomOut;
+    case CursorGrabbing:
+        m_value.valueID = CSSValueGrabbing;
         break;
     case CursorEResize:
         m_value.valueID = CSSValueEResize;
         break;
         break;
     case CursorEResize:
         m_value.valueID = CSSValueEResize;
         break;
+    case CursorNResize:
+        m_value.valueID = CSSValueNResize;
+        break;
     case CursorNeResize:
         m_value.valueID = CSSValueNeResize;
         break;
     case CursorNwResize:
         m_value.valueID = CSSValueNwResize;
         break;
     case CursorNeResize:
         m_value.valueID = CSSValueNeResize;
         break;
     case CursorNwResize:
         m_value.valueID = CSSValueNwResize;
         break;
-    case CursorNResize:
-        m_value.valueID = CSSValueNResize;
+    case CursorSResize:
+        m_value.valueID = CSSValueSResize;
         break;
     case CursorSeResize:
         m_value.valueID = CSSValueSeResize;
         break;
     case CursorSeResize:
         m_value.valueID = CSSValueSeResize;
@@ -1224,9 +1236,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECursor e)
     case CursorSwResize:
         m_value.valueID = CSSValueSwResize;
         break;
     case CursorSwResize:
         m_value.valueID = CSSValueSwResize;
         break;
-    case CursorSResize:
-        m_value.valueID = CSSValueSResize;
-        break;
     case CursorWResize:
         m_value.valueID = CSSValueWResize;
         break;
     case CursorWResize:
         m_value.valueID = CSSValueWResize;
         break;
@@ -1248,23 +1257,14 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECursor e)
     case CursorRowResize:
         m_value.valueID = CSSValueRowResize;
         break;
     case CursorRowResize:
         m_value.valueID = CSSValueRowResize;
         break;
-    case CursorText:
-        m_value.valueID = CSSValueText;
-        break;
-    case CursorWait:
-        m_value.valueID = CSSValueWait;
-        break;
-    case CursorHelp:
-        m_value.valueID = CSSValueHelp;
-        break;
     case CursorAllScroll:
         m_value.valueID = CSSValueAllScroll;
         break;
     case CursorAllScroll:
         m_value.valueID = CSSValueAllScroll;
         break;
-    case CursorWebkitGrab:
-        m_value.valueID = CSSValueWebkitGrab;
+    case CursorZoomIn:
+        m_value.valueID = CSSValueZoomIn;
         break;
         break;
-    case CursorWebkitGrabbing:
-        m_value.valueID = CSSValueWebkitGrabbing;
+    case CursorZoomOut:
+        m_value.valueID = CSSValueZoomOut;
         break;
     }
 }
         break;
     }
 }
@@ -1275,6 +1275,10 @@ template<> inline CSSPrimitiveValue::operator ECursor() const
     switch (m_value.valueID) {
     case CSSValueCopy:
         return CursorCopy;
     switch (m_value.valueID) {
     case CSSValueCopy:
         return CursorCopy;
+    case CSSValueWebkitGrab:
+        return CursorGrab;
+    case CSSValueWebkitGrabbing:
+        return CursorGrabbing;
     case CSSValueWebkitZoomIn:
         return CursorZoomIn;
     case CSSValueWebkitZoomOut:
     case CSSValueWebkitZoomIn:
         return CursorZoomIn;
     case CSSValueWebkitZoomOut:
index 37730b6..f93103f 100644 (file)
                 "move",
                 "no-drop",
                 "not-allowed",
                 "move",
                 "no-drop",
                 "not-allowed",
-                {
-                    "value": "grab",
-                    "status": "unimplemented"
-                },
+                "grab",
                 {
                     "value": "-webkit-grab",
                     "status": "non-standard"
                 },
                 {
                     "value": "-webkit-grab",
                     "status": "non-standard"
                 },
-                {
-                    "value": "grabbing",
-                    "status": "unimplemented"
-                },
+                "grabbing",
                 {
                     "value": "-webkit-grabbing",
                     "status": "non-standard"
                 {
                     "value": "-webkit-grabbing",
                     "status": "non-standard"
                 "col-resize",
                 "row-resize",
                 "all-scroll",
                 "col-resize",
                 "row-resize",
                 "all-scroll",
-                {
-                    "value": "zoom-in",
-                    "status": "unimplemented"
-                },
-                {
-                    "value": "zoom-out",
-                    "status": "unimplemented"
-                },
+                "zoom-in",
+                "zoom-out",
                 {
                     "value": "-webkit-zoom-in",
                     "status": "non-standard"
                 {
                     "value": "-webkit-zoom-in",
                     "status": "non-standard"
index 35183f3..ebc6da2 100644 (file)
@@ -421,27 +421,31 @@ inline-grid
 // The order here must match the order of the ECursor enum in RenderStyleConstants.h.
 //
 auto
 // The order here must match the order of the ECursor enum in RenderStyleConstants.h.
 //
 auto
-crosshair
 default
 default
+// none
+context-menu
+help
 pointer
 pointer
-move
-vertical-text
+progress
+wait
 cell
 cell
-context-menu
+crosshair
+text
+vertical-text
 alias
 // copy
 alias
 // copy
-progress
+move
 no-drop
 not-allowed
 no-drop
 not-allowed
-zoom-in
-zoom-out
+grab
+grabbing
 e-resize
 e-resize
+n-resize
 ne-resize
 nw-resize
 ne-resize
 nw-resize
-n-resize
+s-resize
 se-resize
 sw-resize
 se-resize
 sw-resize
-s-resize
 w-resize
 ew-resize
 ns-resize
 w-resize
 ew-resize
 ns-resize
@@ -449,15 +453,13 @@ nesw-resize
 nwse-resize
 col-resize
 row-resize
 nwse-resize
 col-resize
 row-resize
-text
-wait
-help
 all-scroll
 all-scroll
+zoom-in
+zoom-out
 -webkit-grab
 -webkit-grabbing
 -webkit-zoom-in
 -webkit-zoom-out
 -webkit-grab
 -webkit-grabbing
 -webkit-zoom-in
 -webkit-zoom-out
-// none
 //
 // CSS_PROP_CURSOR_VISIBILITY:
 // auto
 //
 // CSS_PROP_CURSOR_VISIBILITY:
 // auto
index a01f6d3..153b6a5 100644 (file)
@@ -1487,34 +1487,62 @@ std::optional<Cursor> EventHandler::selectCursor(const HitTestResult& result, bo
             return iBeam;
         return pointerCursor();
     }
             return iBeam;
         return pointerCursor();
     }
-    case CursorCross:
-        return crossCursor();
+    case CursorDefault:
+        return pointerCursor();
+    case CursorNone:
+        return noneCursor();
+    case CursorContextMenu:
+        return contextMenuCursor();
+    case CursorHelp:
+        return helpCursor();
     case CursorPointer:
         return handCursor();
     case CursorPointer:
         return handCursor();
+    case CursorProgress:
+        return progressCursor();
+    case CursorWait:
+        return waitCursor();
+    case CursorCell:
+        return cellCursor();
+    case CursorCrosshair:
+        return crossCursor();
+    case CursorText:
+        return iBeamCursor();
+    case CursorVerticalText:
+        return verticalTextCursor();
+    case CursorAlias:
+        return aliasCursor();
+    case CursorCopy:
+        return copyCursor();
     case CursorMove:
         return moveCursor();
     case CursorMove:
         return moveCursor();
-    case CursorAllScroll:
-        return moveCursor();
+    case CursorNoDrop:
+        return noDropCursor();
+    case CursorNotAllowed:
+        return notAllowedCursor();
+    case CursorGrab:
+        return grabCursor();
+    case CursorGrabbing:
+        return grabbingCursor();
     case CursorEResize:
         return eastResizeCursor();
     case CursorEResize:
         return eastResizeCursor();
-    case CursorWResize:
-        return westResizeCursor();
     case CursorNResize:
         return northResizeCursor();
     case CursorNResize:
         return northResizeCursor();
-    case CursorSResize:
-        return southResizeCursor();
     case CursorNeResize:
         return northEastResizeCursor();
     case CursorNeResize:
         return northEastResizeCursor();
-    case CursorSwResize:
-        return southWestResizeCursor();
     case CursorNwResize:
         return northWestResizeCursor();
     case CursorNwResize:
         return northWestResizeCursor();
+    case CursorSResize:
+        return southResizeCursor();
     case CursorSeResize:
         return southEastResizeCursor();
     case CursorSeResize:
         return southEastResizeCursor();
-    case CursorNsResize:
-        return northSouthResizeCursor();
+    case CursorSwResize:
+        return southWestResizeCursor();
+    case CursorWResize:
+        return westResizeCursor();
     case CursorEwResize:
         return eastWestResizeCursor();
     case CursorEwResize:
         return eastWestResizeCursor();
+    case CursorNsResize:
+        return northSouthResizeCursor();
     case CursorNeswResize:
         return northEastSouthWestResizeCursor();
     case CursorNwseResize:
     case CursorNeswResize:
         return northEastSouthWestResizeCursor();
     case CursorNwseResize:
@@ -1523,40 +1551,12 @@ std::optional<Cursor> EventHandler::selectCursor(const HitTestResult& result, bo
         return columnResizeCursor();
     case CursorRowResize:
         return rowResizeCursor();
         return columnResizeCursor();
     case CursorRowResize:
         return rowResizeCursor();
-    case CursorText:
-        return iBeamCursor();
-    case CursorWait:
-        return waitCursor();
-    case CursorHelp:
-        return helpCursor();
-    case CursorVerticalText:
-        return verticalTextCursor();
-    case CursorCell:
-        return cellCursor();
-    case CursorContextMenu:
-        return contextMenuCursor();
-    case CursorProgress:
-        return progressCursor();
-    case CursorNoDrop:
-        return noDropCursor();
-    case CursorAlias:
-        return aliasCursor();
-    case CursorCopy:
-        return copyCursor();
-    case CursorNone:
-        return noneCursor();
-    case CursorNotAllowed:
-        return notAllowedCursor();
-    case CursorDefault:
-        return pointerCursor();
+    case CursorAllScroll:
+        return moveCursor();
     case CursorZoomIn:
         return zoomInCursor();
     case CursorZoomOut:
         return zoomOutCursor();
     case CursorZoomIn:
         return zoomInCursor();
     case CursorZoomOut:
         return zoomOutCursor();
-    case CursorWebkitGrab:
-        return grabCursor();
-    case CursorWebkitGrabbing:
-        return grabbingCursor();
     }
     return pointerCursor();
 }
     }
     return pointerCursor();
 }
index 881699e..e9df190 100644 (file)
@@ -508,26 +508,31 @@ enum EVisibility { VISIBLE, HIDDEN, COLLAPSE };
 enum ECursor {
     // The following must match the order in CSSValueKeywords.in.
     CursorAuto,
 enum ECursor {
     // The following must match the order in CSSValueKeywords.in.
     CursorAuto,
-    CursorCross,
     CursorDefault,
     CursorDefault,
+    // CursorNone
+    CursorContextMenu,
+    CursorHelp,
     CursorPointer,
     CursorPointer,
-    CursorMove,
-    CursorVerticalText,
+    CursorProgress,
+    CursorWait,
     CursorCell,
     CursorCell,
-    CursorContextMenu,
+    CursorCrosshair,
+    CursorText,
+    CursorVerticalText,
     CursorAlias,
     CursorAlias,
-    CursorProgress,
+    // CursorCopy
+    CursorMove,
     CursorNoDrop,
     CursorNotAllowed,
     CursorNoDrop,
     CursorNotAllowed,
-    CursorZoomIn,
-    CursorZoomOut,
+    CursorGrab,
+    CursorGrabbing,
     CursorEResize,
     CursorEResize,
+    CursorNResize,
     CursorNeResize,
     CursorNwResize,
     CursorNeResize,
     CursorNwResize,
-    CursorNResize,
+    CursorSResize,
     CursorSeResize,
     CursorSwResize,
     CursorSeResize,
     CursorSwResize,
-    CursorSResize,
     CursorWResize,
     CursorEwResize,
     CursorNsResize,
     CursorWResize,
     CursorEwResize,
     CursorNsResize,
@@ -535,12 +540,9 @@ enum ECursor {
     CursorNwseResize,
     CursorColResize,
     CursorRowResize,
     CursorNwseResize,
     CursorColResize,
     CursorRowResize,
-    CursorText,
-    CursorWait,
-    CursorHelp,
     CursorAllScroll,
     CursorAllScroll,
-    CursorWebkitGrab,
-    CursorWebkitGrabbing,
+    CursorZoomIn,
+    CursorZoomOut,
 
     // The following are handled as exceptions so don't need to match.
     CursorCopy,
 
     // The following are handled as exceptions so don't need to match.
     CursorCopy,
index a3fde91..11fb414 100644 (file)
@@ -1,3 +1,15 @@
+2017-04-08  Simon Fraser  <simon.fraser@apple.com>
+
+        Unprefix CSS cursor values grab and grabbing
+        https://bugs.webkit.org/show_bug.cgi?id=170543
+
+        Reviewed by Jon Lee.
+
+        Sort the cursor autosuggestions to match the order in the spec, and add the unprefixed
+        grab and grabbing values.
+
+        * UserInterface/Models/CSSKeywordCompletions.js:
+
 2017-04-07  Matt Baker  <mattbaker@apple.com>
 
         Web Inspector: DOM/XHR breakpoint tree elements shouldn't persist their represented objects
 2017-04-07  Matt Baker  <mattbaker@apple.com>
 
         Web Inspector: DOM/XHR breakpoint tree elements shouldn't persist their represented objects
index 885f2df..a0c683e 100644 (file)
@@ -238,12 +238,12 @@ WebInspector.CSSKeywordCompletions._propertyKeywordMap = {
         "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double", "auto"
     ],
     "cursor": [
         "none", "hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double", "auto"
     ],
     "cursor": [
-        "none", "copy", "auto", "crosshair", "default", "pointer", "move", "vertical-text", "cell", "context-menu",
-        "alias", "progress", "no-drop", "not-allowed", "zoom-in", "zoom-out", "e-resize", "ne-resize",
-        "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "ew-resize", "ns-resize",
-        "nesw-resize", "nwse-resize", "col-resize", "row-resize", "text", "wait", "help", "all-scroll", "-webkit-grab",
-        "-webkit-zoom-in", "-webkit-zoom-out",
-        "-webkit-grabbing", "url()", "image-set()"
+        "auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text",
+        "alias", "copy", "move", "no-drop", "not-allowed", "grab", "grabbing",
+        "e-resize", "n-resize", "ne-resize", "nw-resize", "s-resize", "se-resize", "sw-resize", "w-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize",
+        "col-resize", "row-resize", "all-scroll", "zoom-in", "zoom-out",
+        "-webkit-grab", "-webkit-grabbing", "-webkit-zoom-in", "-webkit-zoom-out",
+        "url()", "image-set()"
     ],
     "border-width": [
         "medium", "thick", "thin", "calc()"
     ],
     "border-width": [
         "medium", "thick", "thin", "calc()"