2006-11-17 Lars Naesbye Christensen <larsnaesbye@stud.ku.dk>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Nov 2006 10:00:31 +0000 (10:00 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 18 Nov 2006 10:00:31 +0000 (10:00 +0000)
        Reviewed by Tim H.

        http://bugs.webkit.org/show_bug.cgi?id=11638
        [CSS 2.1+3] add support for alias, progress, no-drop and not-allowed cursor styles

        * Resources/aliasCursor.png: Added.
        * Resources/noDropCursor.png: Added.
        * Resources/progressCursor.png: Added.
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        * css/CSSValueKeywords.in:
        * manual-tests/cursor.html:
        * page/EventHandler.cpp:
        (WebCore::selectCursor):
        * platform/Cursor.h:
        * platform/mac/CursorMac.mm:
        (WebCore::handCursor):
        (WebCore::aliasCursor):
        (WebCore::progressCursor):
        (WebCore::noDropCursor):
        * rendering/RenderStyle.h:
        (WebCore::):

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

12 files changed:
WebCore/ChangeLog
WebCore/Resources/aliasCursor.png [new file with mode: 0644]
WebCore/Resources/noDropCursor.png [new file with mode: 0644]
WebCore/Resources/progressCursor.png [new file with mode: 0644]
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSValueKeywords.in
WebCore/manual-tests/cursor.html
WebCore/page/EventHandler.cpp
WebCore/platform/Cursor.h
WebCore/platform/mac/CursorMac.mm
WebCore/rendering/RenderStyle.h

index bf8ec657001ecb888f918114e14b464e8c07e004..d0156064d926ac81c6b2ce1b38925ccbbd328415 100644 (file)
@@ -1,3 +1,29 @@
+2006-11-17  Lars Naesbye Christensen  <larsnaesbye@stud.ku.dk>
+
+        Reviewed by Tim H.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11638
+        [CSS 2.1+3] add support for alias, progress, no-drop and not-allowed cursor styles
+
+        * Resources/aliasCursor.png: Added.
+        * Resources/noDropCursor.png: Added.
+        * Resources/progressCursor.png: Added.
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * css/CSSValueKeywords.in:
+        * manual-tests/cursor.html:
+        * page/EventHandler.cpp:
+        (WebCore::selectCursor):
+        * platform/Cursor.h:
+        * platform/mac/CursorMac.mm:
+        (WebCore::handCursor):
+        (WebCore::aliasCursor):
+        (WebCore::progressCursor):
+        (WebCore::noDropCursor):
+        * rendering/RenderStyle.h:
+        (WebCore::):
+
 2006-11-18  Steve Falkenburg  <sfalken@apple.com>
 
         Reviewed by Adam.
diff --git a/WebCore/Resources/aliasCursor.png b/WebCore/Resources/aliasCursor.png
new file mode 100644 (file)
index 0000000..d33d7e9
Binary files /dev/null and b/WebCore/Resources/aliasCursor.png differ
diff --git a/WebCore/Resources/noDropCursor.png b/WebCore/Resources/noDropCursor.png
new file mode 100644 (file)
index 0000000..54463fc
Binary files /dev/null and b/WebCore/Resources/noDropCursor.png differ
diff --git a/WebCore/Resources/progressCursor.png b/WebCore/Resources/progressCursor.png
new file mode 100644 (file)
index 0000000..25d7021
Binary files /dev/null and b/WebCore/Resources/progressCursor.png differ
index 261fb5a4520368362aa0f5594beca2b7d3de4de4..d1108840a113f2d0809df7ff575f1cda0d84eb16 100644 (file)
                46D4F2490AF97E810035385A /* cellCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2460AF97E810035385A /* cellCursor.png */; };
                46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2470AF97E810035385A /* contextMenuCursor.png */; };
                46D4F24B0AF97E810035385A /* verticalTextCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2480AF97E810035385A /* verticalTextCursor.png */; };
+               46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DA0B0D60170028EE36 /* aliasCursor.png */; };
+               46F9D5DE0B0D60170028EE36 /* noDropCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DB0B0D60170028EE36 /* noDropCursor.png */; };
+               46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DC0B0D60170028EE36 /* progressCursor.png */; };
                4B3043B60AE0363200A82647 /* EditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3043B50AE0363200A82647 /* EditorClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4B3043C70AE0370300A82647 /* Sound.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3043C60AE0370300A82647 /* Sound.h */; };
                4B3043C90AE0371D00A82647 /* SoundMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B3043C80AE0371D00A82647 /* SoundMac.mm */; };
                46D4F2460AF97E810035385A /* cellCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cellCursor.png; sourceTree = "<group>"; };
                46D4F2470AF97E810035385A /* contextMenuCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = contextMenuCursor.png; sourceTree = "<group>"; };
                46D4F2480AF97E810035385A /* verticalTextCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = verticalTextCursor.png; sourceTree = "<group>"; };
+               46F9D5DA0B0D60170028EE36 /* aliasCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = aliasCursor.png; sourceTree = "<group>"; };
+               46F9D5DB0B0D60170028EE36 /* noDropCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noDropCursor.png; sourceTree = "<group>"; };
+               46F9D5DC0B0D60170028EE36 /* progressCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progressCursor.png; sourceTree = "<group>"; };
                4B3043B50AE0363200A82647 /* EditorClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EditorClient.h; sourceTree = "<group>"; };
                4B3043C60AE0370300A82647 /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Sound.h; sourceTree = "<group>"; };
                4B3043C80AE0371D00A82647 /* SoundMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SoundMac.mm; sourceTree = "<group>"; };
                089C1665FE841158C02AAC07 /* Resources */ = {
                        isa = PBXGroup;
                        children = (
+                               46F9D5DA0B0D60170028EE36 /* aliasCursor.png */,
+                               46F9D5DB0B0D60170028EE36 /* noDropCursor.png */,
+                               46F9D5DC0B0D60170028EE36 /* progressCursor.png */,
                                46D4F2460AF97E810035385A /* cellCursor.png */,
                                46D4F2470AF97E810035385A /* contextMenuCursor.png */,
                                46D4F2480AF97E810035385A /* verticalTextCursor.png */,
                                46D4F2490AF97E810035385A /* cellCursor.png in Resources */,
                                46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */,
                                46D4F24B0AF97E810035385A /* verticalTextCursor.png in Resources */,
+                               46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */,
+                               46F9D5DE0B0D60170028EE36 /* noDropCursor.png in Resources */,
+                               46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 2101106f05644b14ab1571950f3c9ee5895df85f..ca478cb19f89aa048c1dc2960b9b289eec749948 100644 (file)
@@ -639,6 +639,18 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
             case CURSOR_CONTEXT_MENU:
                 value = new CSSPrimitiveValue(CSS_VAL_CONTEXT_MENU);
                 break;
+            case CURSOR_ALIAS:
+                value = new CSSPrimitiveValue(CSS_VAL_ALIAS);
+                break;
+            case CURSOR_PROGRESS:
+                value = new CSSPrimitiveValue(CSS_VAL_PROGRESS);
+                break;
+            case CURSOR_NO_DROP:
+                value = new CSSPrimitiveValue(CSS_VAL_NO_DROP);
+                break;
+            case CURSOR_NOT_ALLOWED:
+                value = new CSSPrimitiveValue(CSS_VAL_NOT_ALLOWED);
+                break;
             case CURSOR_E_RESIZE:
                 value = new CSSPrimitiveValue(CSS_VAL_E_RESIZE);
                 break;
index 8aa59423b26345d60d27619386b1eafb98f59dd4..9c05219bac6eb0b19006d60d463c143436e97e6c 100644 (file)
@@ -269,6 +269,10 @@ move
 vertical-text
 cell
 context-menu
+alias
+progress
+no-drop
+not-allowed
 e-resize
 ne-resize
 nw-resize
index 9c6f7c39a103861af3de91d4eba79ce5257c6a26..9f525ff5c939aad8c29db82b97a4373582b23a67 100644 (file)
@@ -24,4 +24,8 @@
 <div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: all-scroll">allscroll</div>
 <div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: vertical-text">verticaltext</div>
 <div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: context-menu">contextmenu</div>
+<div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: no-drop">nodrop</div>
+<div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: not-allowed">notallowed</div>
+<div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: progress">progress</div>
+<div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: alias">alias</div>
 <div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: cell">cell</div>
index 47bcab16b383ecf8c752c17f399e729831991b5b..f7954d2eec64d31ca7a83b3c9339dd5df3a7d3a5 100644 (file)
@@ -633,6 +633,14 @@ static Cursor selectCursor(const MouseEventWithHitTestResults& event, Frame* fra
             return cellCursor();
         case CURSOR_CONTEXT_MENU:
             return contextMenuCursor();
+        case CURSOR_PROGRESS:
+            return progressCursor();
+        case CURSOR_NO_DROP:
+            return noDropCursor();
+        case CURSOR_ALIAS:
+            return aliasCursor();
+        case CURSOR_NOT_ALLOWED:
+            return noDropCursor();
         case CURSOR_DEFAULT:
             return pointerCursor();
     }
index 64c0d82bd086013fc80f0eda26f10c6df445a337..ffe2eb6dca729698d092a9a4ff0b9c5fa5ce1a9f 100644 (file)
@@ -104,10 +104,12 @@ namespace WebCore {
     const Cursor& northWestSouthEastResizeCursor();
     const Cursor& columnResizeCursor();
     const Cursor& rowResizeCursor();
-
     const Cursor& verticalTextCursor();
     const Cursor& cellCursor();
     const Cursor& contextMenuCursor();
+    const Cursor& noDropCursor();
+    const Cursor& progressCursor();
+    const Cursor& aliasCursor();
 
 } // namespace WebCore
 
index 6b1ca97bc1abbec24237649feba73687c2c7bc6b..de736dd1e9f05f10086548cf461ab5ae530c8ec6 100644 (file)
@@ -117,7 +117,6 @@ const Cursor& crossCursor()
 
 const Cursor& handCursor()
 {
-    // FIXME: Use [NSCursor pointingHandCursor]?
     static Cursor c = leakNamedCursor("linkCursor", 6, 1);
     return c;
 }
@@ -146,6 +145,24 @@ const Cursor& contextMenuCursor()
     return c;
 }
 
+const Cursor& aliasCursor()
+{
+    static Cursor c = leakNamedCursor("aliasCursor", 11, 3);
+    return c;
+}
+
+const Cursor& progressCursor()
+{
+    static Cursor c = leakNamedCursor("progressCursor", 1, 1);
+    return c;
+}
+
+const Cursor& noDropCursor()
+{
+    static Cursor c = leakNamedCursor("noDropCursor", 1, 1);
+    return c;
+}
+
 const Cursor& iBeamCursor()
 {
     static Cursor c = [NSCursor IBeamCursor];
index 88b71a3679439808e4dd4e74c217d725b375dc02..8d4d4c8cd5ca0f8fcb83a17eb94419636ee13e90 100644 (file)
@@ -876,6 +876,7 @@ enum EVisibility { VISIBLE, HIDDEN, COLLAPSE };
 
 enum ECursor {
     CURSOR_AUTO, CURSOR_CROSS, CURSOR_DEFAULT, CURSOR_POINTER, CURSOR_MOVE, CURSOR_VERTICAL_TEXT, CURSOR_CELL, CURSOR_CONTEXT_MENU,
+    CURSOR_ALIAS, CURSOR_PROGRESS, CURSOR_NO_DROP, CURSOR_NOT_ALLOWED,
     CURSOR_E_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_N_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE,
     CURSOR_S_RESIZE, CURSOR_W_RESIZE, CURSOR_EW_RESIZE, CURSOR_NS_RESIZE, CURSOR_NESW_RESIZE, CURSOR_NWSE_RESIZE,
     CURSOR_COL_RESIZE, CURSOR_ROW_RESIZE, CURSOR_TEXT, CURSOR_WAIT, CURSOR_HELP, CURSOR_ALL_SCROLL