Commit 3677cb06 authored by ap's avatar ap

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::):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 05f2a1cb
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.
......@@ -258,6 +258,9 @@
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 */; };
......@@ -3187,6 +3190,9 @@
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>"; };
......@@ -5886,6 +5892,9 @@
089C1665FE841158C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
46F9D5DA0B0D60170028EE36 /* aliasCursor.png */,
46F9D5DB0B0D60170028EE36 /* noDropCursor.png */,
46F9D5DC0B0D60170028EE36 /* progressCursor.png */,
46D4F2460AF97E810035385A /* cellCursor.png */,
46D4F2470AF97E810035385A /* contextMenuCursor.png */,
46D4F2480AF97E810035385A /* verticalTextCursor.png */,
......@@ -10689,6 +10698,9 @@
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;
};
......@@ -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;
......
......@@ -269,6 +269,10 @@ move
vertical-text
cell
context-menu
alias
progress
no-drop
not-allowed
e-resize
ne-resize
nw-resize
......
......@@ -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>
......@@ -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();
}
......
......@@ -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
......
......@@ -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];
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment