2006-12-05 Lars Naesbye Christensen <larsnaesbye@stud.ku.dk>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Dec 2006 08:26:38 +0000 (08:26 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Dec 2006 08:26:38 +0000 (08:26 +0000)
        Reviewed and landed by Alexey.

        http://bugs.webkit.org/show_bug.cgi?id=11752
        [CSS 3] missing support for cursor selector 'copy'

        * Resources/copyCursor.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::copyCursor):
        * rendering/RenderStyle.h:
        (WebCore::):

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

WebCore/ChangeLog
WebCore/Resources/copyCursor.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 e17dd6fbbe871c0a6a91f3ae4015aff8efc0725f..f2e6ff8c8ee5a981a696df8dec1e643ab81d02b1 100644 (file)
@@ -1,3 +1,24 @@
+2006-12-05  Lars Naesbye Christensen  <larsnaesbye@stud.ku.dk>
+
+        Reviewed and landed by Alexey.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11752
+        [CSS 3] missing support for cursor selector 'copy'
+
+        * Resources/copyCursor.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::copyCursor):
+        * rendering/RenderStyle.h:
+        (WebCore::):
+
 2006-12-04  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Geoff.
diff --git a/WebCore/Resources/copyCursor.png b/WebCore/Resources/copyCursor.png
new file mode 100644 (file)
index 0000000..33be332
Binary files /dev/null and b/WebCore/Resources/copyCursor.png differ
index f223bc5991ac893fcb56aec156a211caf06b9b8a..a31ea7acbe0842f547ecbcc3a980802838093358 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 */; };
+               4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 4614A1FD0B23A8D600446E1C /* copyCursor.png */; };
                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 */; };
                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>"; };
+               4614A1FD0B23A8D600446E1C /* copyCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copyCursor.png; 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>"; };
                                46F9D5DC0B0D60170028EE36 /* progressCursor.png */,
                                46D4F2460AF97E810035385A /* cellCursor.png */,
                                46D4F2470AF97E810035385A /* contextMenuCursor.png */,
+                               4614A1FD0B23A8D600446E1C /* copyCursor.png */,
                                46D4F2480AF97E810035385A /* verticalTextCursor.png */,
                                1C14E76A0AD8C81C00B6158B /* deleteButton.tiff */,
                                1C14E7690AD8C81C00B6158B /* deleteButtonPressed.tiff */,
                                B2E27C6E0B0F2AE600F17C7B /* WKSpecularLightingFilter.cikernel in Resources */,
                                B2E27C710B0F2AE600F17C7B /* WKSpotLightFilter.cikernel in Resources */,
                                B2E27C740B0F2AE600F17C7B /* WKTableTransferFilter.cikernel in Resources */,
+                               4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index ca478cb19f89aa048c1dc2960b9b289eec749948..9ebd9fb9f18d4b0c03ff71eefcee87224b453c8f 100644 (file)
@@ -642,6 +642,9 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
             case CURSOR_ALIAS:
                 value = new CSSPrimitiveValue(CSS_VAL_ALIAS);
                 break;
+            case CURSOR_COPY:
+                value = new CSSPrimitiveValue(CSS_VAL_COPY);
+                break;
             case CURSOR_PROGRESS:
                 value = new CSSPrimitiveValue(CSS_VAL_PROGRESS);
                 break;
index 9c05219bac6eb0b19006d60d463c143436e97e6c..5f6e5450a8e8ce9c8228de9f4396dd425cf26034 100644 (file)
@@ -170,7 +170,7 @@ no-repeat
 # CSS_PROP__WEBKIT_BACKGROUND_COMPOSITE:
 #
 clear
-copy
+copy
 source-over
 source-in
 source-out
@@ -270,6 +270,7 @@ vertical-text
 cell
 context-menu
 alias
+copy
 progress
 no-drop
 not-allowed
index 9f525ff5c939aad8c29db82b97a4373582b23a67..f0ef2e978ba7ffb9025988783c3ad5fcfc07b149 100644 (file)
@@ -29,3 +29,4 @@
 <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>
+<div style="width: 20px; height: 20px; margin: 10px; background: #ddd; cursor: copy">copy</div>
index c702de46a393084a9616b54b4e8f0482cd2de127..d26c41ac51ab48ea4d04a96f52b1cbf43d6780a4 100644 (file)
@@ -666,6 +666,8 @@ static Cursor selectCursor(const MouseEventWithHitTestResults& event, Frame* fra
             return noDropCursor();
         case CURSOR_ALIAS:
             return aliasCursor();
+        case CURSOR_COPY:
+            return copyCursor();
         case CURSOR_NOT_ALLOWED:
             return noDropCursor();
         case CURSOR_DEFAULT:
index ffe2eb6dca729698d092a9a4ff0b9c5fa5ce1a9f..9c5afe3d472345a024652a0fa691772af4b5a619 100644 (file)
@@ -110,6 +110,7 @@ namespace WebCore {
     const Cursor& noDropCursor();
     const Cursor& progressCursor();
     const Cursor& aliasCursor();
+    const Cursor& copyCursor();
 
 } // namespace WebCore
 
index de736dd1e9f05f10086548cf461ab5ae530c8ec6..d77636ad7c60309221489ba0be6f7187fac515b7 100644 (file)
@@ -151,6 +151,12 @@ const Cursor& aliasCursor()
     return c;
 }
 
+const Cursor& copyCursor()
+{
+    static Cursor c = leakNamedCursor("copyCursor", 1, 1);
+    return c;
+}
+
 const Cursor& progressCursor()
 {
     static Cursor c = leakNamedCursor("progressCursor", 1, 1);
index 8d4d4c8cd5ca0f8fcb83a17eb94419636ee13e90..2731651718de6cc7056617d3504743621c9c0aea 100644 (file)
@@ -876,7 +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_ALIAS, CURSOR_COPY, 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