2006-11-11 Lars Naesbye Christensen <larsnaesbye@stud.ku.dk>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Nov 2006 15:15:53 +0000 (15:15 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Nov 2006 15:15:53 +0000 (15:15 +0000)
        Tortured by Sam Weinig, Tim H., Maciej, Mitz and Alexey :-)

        [CSS 3] support for vertical-text, cell and context-menu cursors
        http://bugs.webkit.org/show_bug.cgi?id=11494

        * Resources/cellCursor.png: Added.
        * Resources/contextMenuCursor.png: Added.
        * Resources/verticalTextCursor.png: Added.
        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        * css/CSSValueKeywords.in:
        * manual-tests/cursor.html:
        * page/FrameView.cpp:
        (WebCore::selectCursor):
        * platform/Cursor.h:
        * platform/mac/CursorMac.mm:
        (WebCore::verticalTextCursor):
        (WebCore::cellCursor):
        (WebCore::contextMenuCursor):
        * rendering/RenderStyle.h:
        (WebCore::):

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

12 files changed:
WebCore/ChangeLog
WebCore/Resources/cellCursor.png [new file with mode: 0644]
WebCore/Resources/contextMenuCursor.png [new file with mode: 0644]
WebCore/Resources/verticalTextCursor.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/FrameView.cpp
WebCore/platform/Cursor.h
WebCore/platform/mac/CursorMac.mm
WebCore/rendering/RenderStyle.h

index 2af12e5f46c62f07db839db65a35d3a70ceb6101..71228491612dc67a4d014e17041189b40fe1061e 100644 (file)
@@ -1,3 +1,28 @@
+2006-11-11  Lars Naesbye Christensen  <larsnaesbye@stud.ku.dk>
+
+        Tortured by Sam Weinig, Tim H., Maciej, Mitz and Alexey :-)
+
+        [CSS 3] support for vertical-text, cell and context-menu cursors
+        http://bugs.webkit.org/show_bug.cgi?id=11494
+
+        * Resources/cellCursor.png: Added.
+        * Resources/contextMenuCursor.png: Added.
+        * Resources/verticalTextCursor.png: Added.
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * css/CSSValueKeywords.in:
+        * manual-tests/cursor.html:
+        * page/FrameView.cpp:
+        (WebCore::selectCursor):
+        * platform/Cursor.h:
+        * platform/mac/CursorMac.mm:
+        (WebCore::verticalTextCursor):
+        (WebCore::cellCursor):
+        (WebCore::contextMenuCursor):
+        * rendering/RenderStyle.h:
+        (WebCore::):
+
 2006-11-11  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed by aroben and ap, landed by ap.
diff --git a/WebCore/Resources/cellCursor.png b/WebCore/Resources/cellCursor.png
new file mode 100644 (file)
index 0000000..84a8179
Binary files /dev/null and b/WebCore/Resources/cellCursor.png differ
diff --git a/WebCore/Resources/contextMenuCursor.png b/WebCore/Resources/contextMenuCursor.png
new file mode 100644 (file)
index 0000000..945a0f5
Binary files /dev/null and b/WebCore/Resources/contextMenuCursor.png differ
diff --git a/WebCore/Resources/verticalTextCursor.png b/WebCore/Resources/verticalTextCursor.png
new file mode 100644 (file)
index 0000000..0f2877c
Binary files /dev/null and b/WebCore/Resources/verticalTextCursor.png differ
index 4c5ad84092d4d6a766c5cea14baed375a79ab12f..f9a6fc77e23b96e738d833d2b4e38f2620f86894 100644 (file)
                448A29BF0A46D9CB0030759F /* JSHTMLOptionsCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */; };
                448A29C00A46D9CB0030759F /* JSHTMLOptionsCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 448A29BE0A46D9CB0030759F /* JSHTMLOptionsCollection.cpp */; };
                448AD27C0A48137A0023D179 /* JSHTMLOptionsCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 448AD27A0A4813790023D179 /* JSHTMLOptionsCollectionCustom.cpp */; };
+               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 */; };
                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 */; };
                448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLOptionsCollection.h; sourceTree = "<group>"; };
                448A29BE0A46D9CB0030759F /* JSHTMLOptionsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLOptionsCollection.cpp; sourceTree = "<group>"; };
                448AD27A0A4813790023D179 /* JSHTMLOptionsCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLOptionsCollectionCustom.cpp; sourceTree = "<group>"; };
+               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>"; };
                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 = (
+                               46D4F2460AF97E810035385A /* cellCursor.png */,
+                               46D4F2470AF97E810035385A /* contextMenuCursor.png */,
+                               46D4F2480AF97E810035385A /* verticalTextCursor.png */,
                                1C14E76A0AD8C81C00B6158B /* deleteButton.tiff */,
                                1C14E7690AD8C81C00B6158B /* deleteButtonPressed.tiff */,
                                85136C890AED665800F90A3D /* eastResizeCursor.png */,
                                85136CA60AED665900F90A3D /* southWestResizeCursor.png in Resources */,
                                85136CA70AED665900F90A3D /* waitCursor.png in Resources */,
                                85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
+                               46D4F2490AF97E810035385A /* cellCursor.png in Resources */,
+                               46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */,
+                               46D4F24B0AF97E810035385A /* verticalTextCursor.png in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index cc7cbddfdf6a4be755cf8ad8b9908928ea4b7229..2101106f05644b14ab1571950f3c9ee5895df85f 100644 (file)
@@ -630,6 +630,15 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
             case CURSOR_MOVE:
                 value = new CSSPrimitiveValue(CSS_VAL_MOVE);
                 break;
+            case CURSOR_CELL:
+                value = new CSSPrimitiveValue(CSS_VAL_CELL);
+                break;
+            case CURSOR_VERTICAL_TEXT:
+                value = new CSSPrimitiveValue(CSS_VAL_VERTICAL_TEXT);
+                break;
+            case CURSOR_CONTEXT_MENU:
+                value = new CSSPrimitiveValue(CSS_VAL_CONTEXT_MENU);
+                break;
             case CURSOR_E_RESIZE:
                 value = new CSSPrimitiveValue(CSS_VAL_E_RESIZE);
                 break;
index b1125ed383829106dff38e66d077c85f97f16358..8aa59423b26345d60d27619386b1eafb98f59dd4 100644 (file)
@@ -266,6 +266,9 @@ crosshair
 default
 pointer
 move
+vertical-text
+cell
+context-menu
 e-resize
 ne-resize
 nw-resize
index 9dca15ffe863413e6c8d37def33239737505f59e..9c6f7c39a103861af3de91d4eba79ce5257c6a26 100644 (file)
@@ -21,3 +21,7 @@
 <div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: nesw-resize">nesw</div>
 <div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: col-resize">col</div>
 <div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: row-resize">row</div>
+<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: cell">cell</div>
index 4a5ba2bb5162e8e351190e92660a6b0ccc84e04f..cfd25dc2a36256ea66d90b06b355ef4408453d3a 100644 (file)
@@ -797,6 +797,12 @@ static Cursor selectCursor(const MouseEventWithHitTestResults& event, Frame* fra
             return waitCursor();
         case CURSOR_HELP:
             return helpCursor();
+        case CURSOR_VERTICAL_TEXT:
+            return verticalTextCursor();
+        case CURSOR_CELL:
+            return cellCursor();
+        case CURSOR_CONTEXT_MENU:
+            return contextMenuCursor();
         case CURSOR_DEFAULT:
             return pointerCursor();
     }
index 0ee040d6577f1859f728f6a6fccc64165039c669..64c0d82bd086013fc80f0eda26f10c6df445a337 100644 (file)
@@ -105,6 +105,10 @@ namespace WebCore {
     const Cursor& columnResizeCursor();
     const Cursor& rowResizeCursor();
 
+    const Cursor& verticalTextCursor();
+    const Cursor& cellCursor();
+    const Cursor& contextMenuCursor();
+
 } // namespace WebCore
 
 #endif // CURSOR_H
index e02f8b3460010304817cfed6d8d8d345f077119b..6b1ca97bc1abbec24237649feba73687c2c7bc6b 100644 (file)
@@ -128,6 +128,24 @@ const Cursor& moveCursor()
     return c;
 }
 
+const Cursor& verticalTextCursor()
+{
+    static Cursor c = leakNamedCursor("verticalTextCursor", 7, 7);
+    return c;
+}
+
+const Cursor& cellCursor()
+{
+    static Cursor c = leakNamedCursor("cellCursor", 7, 7);
+    return c;
+}
+
+const Cursor& contextMenuCursor()
+{
+    static Cursor c = leakNamedCursor("contextMenuCursor", 1, 1);
+    return c;
+}
+
 const Cursor& iBeamCursor()
 {
     static Cursor c = [NSCursor IBeamCursor];
index 110bf52354f500121431418e513027cd0b1a90cc..e9a41df7c1fdfcfce5da871f34ec97249f23a778 100644 (file)
@@ -875,7 +875,7 @@ enum EListStylePosition { OUTSIDE, INSIDE };
 enum EVisibility { VISIBLE, HIDDEN, COLLAPSE };
 
 enum ECursor {
-    CURSOR_AUTO, CURSOR_CROSS, CURSOR_DEFAULT, CURSOR_POINTER, CURSOR_MOVE,
+    CURSOR_AUTO, CURSOR_CROSS, CURSOR_DEFAULT, CURSOR_POINTER, CURSOR_MOVE, CURSOR_VERTICAL_TEXT, CURSOR_CELL, CURSOR_CONTEXT_MENU,
     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