Changeset 90087 in webkit
- Timestamp:
- Jun 29, 2011 10:12:28 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r90082 r90087 1 2011-06-29 Darin Adler <darin@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 [Mac] Use system cursors instead of custom bitmaps where possible 6 https://bugs.webkit.org/show_bug.cgi?id=63679 7 8 * Resources/crossHairCursor.png: Removed. 9 * Resources/notAllowedCursor.png: Removed. 10 * WebCore.exp.in: Added wkCursor. 11 * WebCore/WebCore.gyp/WebCore.gyp: Removed the two now-unused PNG files. 12 * WebCore.xcodeproj/project.pbxproj: Ditto. 13 14 * platform/mac/CursorMac.mm: 15 (WebCore::Cursor::ensurePlatformCursor): Use NSCursor API for Cross, Hand, 16 VerticalText, ContextMenu, Copy, and NotAllowed. Use wkCursor for Move, 17 Alias, Progress, and the resize and panning cursors. 18 19 * platform/mac/WebCoreSystemInterface.h: Added wkCursor. 20 * platform/mac/WebCoreSystemInterface.mm: Ditto. 21 1 22 2011-06-29 Keishi Hattori <keishi@webkit.org> 2 23 -
trunk/Source/WebCore/WebCore.exp.in
r89991 r90087 1485 1485 _wkWillStartLiveResize 1486 1486 _wkAVAssetResolvedURL 1487 _wkCursor 1487 1488 #else 1488 1489 _wkGetNSEventMomentumPhase -
trunk/Source/WebCore/WebCore.gyp/WebCore.gyp
r89975 r90087 1636 1636 '../Resources/contextMenuCursor.png', 1637 1637 '../Resources/copyCursor.png', 1638 '../Resources/crossHairCursor.png',1639 1638 '../Resources/eastResizeCursor.png', 1640 1639 '../Resources/eastWestResizeCursor.png', … … 1651 1650 '../Resources/northWestResizeCursor.png', 1652 1651 '../Resources/northWestSouthEastResizeCursor.png', 1653 '../Resources/notAllowedCursor.png',1654 1652 '../Resources/progressCursor.png', 1655 1653 '../Resources/southEastResizeCursor.png', -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r90071 r90087 1036 1036 45BAC2B01360BBAB005DA258 /* IconURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 45BAC2AF1360BBAB005DA258 /* IconURL.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1037 1037 4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 4614A1FD0B23A8D600446E1C /* copyCursor.png */; }; 1038 464EA2730B8A350B00A8E6E3 /* crossHairCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */; };1039 464EA2740B8A350B00A8E6E3 /* notAllowedCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */; };1040 1038 46700ED0127B96CB00F5D5D6 /* FileWriterSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46700ECE127B96CB00F5D5D6 /* FileWriterSync.cpp */; }; 1041 1039 46700ED1127B96CB00F5D5D6 /* FileWriterSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 46700ECF127B96CB00F5D5D6 /* FileWriterSync.h */; }; … … 7532 7530 45BAC2AF1360BBAB005DA258 /* IconURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IconURL.h; sourceTree = "<group>"; }; 7533 7531 4614A1FD0B23A8D600446E1C /* copyCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copyCursor.png; sourceTree = "<group>"; }; 7534 464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = crossHairCursor.png; sourceTree = "<group>"; };7535 464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = notAllowedCursor.png; sourceTree = "<group>"; };7536 7532 46700ECE127B96CB00F5D5D6 /* FileWriterSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileWriterSync.cpp; path = fileapi/FileWriterSync.cpp; sourceTree = "<group>"; }; 7537 7533 46700ECF127B96CB00F5D5D6 /* FileWriterSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileWriterSync.h; path = fileapi/FileWriterSync.h; sourceTree = "<group>"; }; … … 12933 12929 46D4F2470AF97E810035385A /* contextMenuCursor.png */, 12934 12930 4614A1FD0B23A8D600446E1C /* copyCursor.png */, 12935 464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */,12936 12931 1C14E76A0AD8C81C00B6158B /* deleteButton.tiff */, 12937 12932 1C14E7690AD8C81C00B6158B /* deleteButtonPressed.tiff */, … … 12952 12947 85136C920AED665900F90A3D /* northWestResizeCursor.png */, 12953 12948 85136C930AED665900F90A3D /* northWestSouthEastResizeCursor.png */, 12954 464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */,12955 12949 46F9D5DC0B0D60170028EE36 /* progressCursor.png */, 12956 12950 85136C940AED665900F90A3D /* southEastResizeCursor.png */, … … 23196 23190 46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */, 23197 23191 4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */, 23198 464EA2730B8A350B00A8E6E3 /* crossHairCursor.png in Resources */,23199 23192 1C14E76C0AD8C81C00B6158B /* deleteButton.tiff in Resources */, 23200 23193 1C14E76B0AD8C81C00B6158B /* deleteButtonPressed.tiff in Resources */, … … 23216 23209 85136CA20AED665900F90A3D /* northWestResizeCursor.png in Resources */, 23217 23210 85136CA30AED665900F90A3D /* northWestSouthEastResizeCursor.png in Resources */, 23218 464EA2740B8A350B00A8E6E3 /* notAllowedCursor.png in Resources */,23219 23211 46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */, 23220 23212 85136CA40AED665900F90A3D /* southEastResizeCursor.png in Resources */, -
trunk/Source/WebCore/platform/mac/CursorMac.mm
r68054 r90087 28 28 29 29 #import "BlockExceptions.h" 30 #import "WebCoreSystemInterface.h" 30 31 #import <wtf/StdLibExtras.h> 31 32 … … 84 85 break; 85 86 case Cursor::Cross: 86 m_platformCursor = leakNamedCursor("crossHairCursor", 11, 11);87 m_platformCursor = [NSCursor crosshairCursor]; 87 88 break; 88 89 case Cursor::Hand: 90 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 91 m_platformCursor = [NSCursor pointingHandCursor]; 92 #else 93 // The pointingHandCursor from NSCursor does not have a shadow on 94 // older versions of Mac OS X, so use our own custom cursor. 89 95 m_platformCursor = leakNamedCursor("linkCursor", 6, 1); 96 #endif 90 97 break; 91 98 case Cursor::IBeam: … … 100 107 case Cursor::Move: 101 108 case Cursor::MiddlePanning: 109 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 110 m_platformCursor = wkCursor("Move"); 111 #else 102 112 m_platformCursor = leakNamedCursor("moveCursor", 7, 7); 113 #endif 103 114 break; 104 115 case Cursor::EastResize: 105 116 case Cursor::EastPanning: 117 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 118 m_platformCursor = wkCursor("ResizeEast"); 119 #else 106 120 m_platformCursor = leakNamedCursor("eastResizeCursor", 14, 7); 121 #endif 107 122 break; 108 123 case Cursor::NorthResize: 109 124 case Cursor::NorthPanning: 125 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 126 m_platformCursor = wkCursor("ResizeNorth"); 127 #else 110 128 m_platformCursor = leakNamedCursor("northResizeCursor", 7, 1); 129 #endif 111 130 break; 112 131 case Cursor::NorthEastResize: 113 132 case Cursor::NorthEastPanning: 133 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 134 m_platformCursor = wkCursor("ResizeNortheast"); 135 #else 114 136 m_platformCursor = leakNamedCursor("northEastResizeCursor", 14, 1); 137 #endif 115 138 break; 116 139 case Cursor::NorthWestResize: 117 140 case Cursor::NorthWestPanning: 141 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 142 m_platformCursor = wkCursor("ResizeNorthwest"); 143 #else 118 144 m_platformCursor = leakNamedCursor("northWestResizeCursor", 0, 0); 145 #endif 119 146 break; 120 147 case Cursor::SouthResize: 121 148 case Cursor::SouthPanning: 149 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 150 m_platformCursor = wkCursor("ResizeSouth"); 151 #else 122 152 m_platformCursor = leakNamedCursor("southResizeCursor", 7, 14); 153 #endif 123 154 break; 124 155 case Cursor::SouthEastResize: 125 156 case Cursor::SouthEastPanning: 157 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 158 m_platformCursor = wkCursor("ResizeSoutheast"); 159 #else 126 160 m_platformCursor = leakNamedCursor("southEastResizeCursor", 14, 14); 161 #endif 127 162 break; 128 163 case Cursor::SouthWestResize: 129 164 case Cursor::SouthWestPanning: 165 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 166 m_platformCursor = wkCursor("ResizeSouthwest"); 167 #else 130 168 m_platformCursor = leakNamedCursor("southWestResizeCursor", 1, 14); 169 #endif 131 170 break; 132 171 case Cursor::WestResize: 172 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 173 m_platformCursor = wkCursor("ResizeWest"); 174 #else 133 175 m_platformCursor = leakNamedCursor("westResizeCursor", 1, 7); 176 #endif 134 177 break; 135 178 case Cursor::NorthSouthResize: 179 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 180 m_platformCursor = wkCursor("ResizeNorthSouth"); 181 #else 136 182 m_platformCursor = leakNamedCursor("northSouthResizeCursor", 7, 7); 183 #endif 137 184 break; 138 185 case Cursor::EastWestResize: 139 186 case Cursor::WestPanning: 187 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 188 m_platformCursor = wkCursor("ResizeEastWest"); 189 #else 140 190 m_platformCursor = leakNamedCursor("eastWestResizeCursor", 7, 7); 191 #endif 141 192 break; 142 193 case Cursor::NorthEastSouthWestResize: 194 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 195 m_platformCursor = wkCursor("ResizeNortheastSouthwest"); 196 #else 143 197 m_platformCursor = leakNamedCursor("northEastSouthWestResizeCursor", 7, 7); 198 #endif 144 199 break; 145 200 case Cursor::NorthWestSouthEastResize: 201 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 202 m_platformCursor = wkCursor("ResizeNorthwestSoutheast"); 203 #else 146 204 m_platformCursor = leakNamedCursor("northWestSouthEastResizeCursor", 7, 7); 205 #endif 147 206 break; 148 207 case Cursor::ColumnResize: … … 153 212 break; 154 213 case Cursor::VerticalText: 214 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 215 m_platformCursor = [NSCursor IBeamCursorForVerticalLayout]; 216 #else 155 217 m_platformCursor = leakNamedCursor("verticalTextCursor", 7, 7); 218 #endif 156 219 break; 157 220 case Cursor::Cell: … … 159 222 break; 160 223 case Cursor::ContextMenu: 224 #if !defined(BUILDING_ON_LEOPARD) 225 m_platformCursor = [NSCursor contextualMenuCursor]; 226 #else 161 227 m_platformCursor = leakNamedCursor("contextMenuCursor", 3, 2); 228 #endif 162 229 break; 163 230 case Cursor::Alias: 231 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 232 m_platformCursor = wkCursor("MakeAlias"); 233 #else 164 234 m_platformCursor = leakNamedCursor("aliasCursor", 11, 3); 235 #endif 165 236 break; 166 237 case Cursor::Progress: 238 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 239 m_platformCursor = wkCursor("BusyButClickable"); 240 #else 167 241 m_platformCursor = leakNamedCursor("progressCursor", 3, 2); 242 #endif 168 243 break; 169 244 case Cursor::NoDrop: … … 171 246 break; 172 247 case Cursor::Copy: 248 #if !defined(BUILDING_ON_LEOPARD) 249 m_platformCursor = [NSCursor dragCopyCursor]; 250 #else 173 251 m_platformCursor = leakNamedCursor("copyCursor", 3, 2); 252 #endif 174 253 break; 175 254 case Cursor::None: … … 177 256 break; 178 257 case Cursor::NotAllowed: 179 m_platformCursor = leakNamedCursor("notAllowedCursor", 11, 11);258 m_platformCursor = [NSCursor operationNotAllowedCursor]; 180 259 break; 181 260 case Cursor::ZoomIn: -
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h
r89388 r90087 73 73 @class NSButtonCell; 74 74 @class NSControl; 75 @class NSCursor; 75 76 @class NSData; 76 77 @class NSDate; … … 96 97 class NSButtonCell; 97 98 class NSControl; 99 class NSCursor; 98 100 class NSData; 99 101 class NSDate; … … 231 233 232 234 extern CTLineRef (*wkCreateCTLineWithUniCharProvider)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*); 235 233 236 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 237 234 238 extern CTTypesetterRef (*wkCreateCTTypesetterWithUniCharProviderAndOptions)(const UniChar* (*provide)(CFIndex stringIndex, CFIndex* charCount, CFDictionaryRef* attributes, void*), void (*dispose)(const UniChar* chars, void*), void*, CFDictionaryRef options); 235 239 … … 290 294 291 295 extern NSURL *(*wkAVAssetResolvedURL)(AVAsset*); 296 297 extern NSCursor *(*wkCursor)(const char*); 298 292 299 #endif 293 300 -
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm
r89300 r90087 167 167 168 168 NSURL *(*wkAVAssetResolvedURL)(AVAsset*); 169 170 NSCursor *(*wkCursor)(const char*); 171 169 172 #endif 170 173 -
trunk/Source/WebKit/mac/ChangeLog
r89991 r90087 1 2011-06-29 Darin Adler <darin@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 [Mac] Use system cursors instead of custom bitmaps where possible 6 https://bugs.webkit.org/show_bug.cgi?id=63679 7 8 * WebCoreSupport/WebSystemInterface.mm: 9 (InitWebCoreSystemInterface): Added WKCursor. 10 1 11 2011-06-28 Ilya Sherman <isherman@chromium.org> 2 12 -
trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
r89271 r90087 1 1 /* 2 * Copyright 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.2 * Copyright 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 160 160 INIT(CopyDefaultSearchProviderDisplayName); 161 161 INIT(AVAssetResolvedURL); 162 INIT(Cursor); 162 163 #endif 163 164 -
trunk/Source/WebKit2/ChangeLog
r90038 r90087 1 2011-06-29 Darin Adler <darin@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 [Mac] Use system cursors instead of custom bitmaps where possible 6 https://bugs.webkit.org/show_bug.cgi?id=63679 7 8 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: 9 (InitWebCoreSystemInterface): Added WKCursor. 10 1 11 2011-06-29 Darin Adler <darin@apple.com> 2 12 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
r87328 r90087 1 1 /* 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 150 150 INIT(CopyDefaultSearchProviderDisplayName); 151 151 INIT(AVAssetResolvedURL); 152 INIT(Cursor); 152 153 #else 153 154 INIT(GetHyphenationLocationBeforeIndex);
Note: See TracChangeset
for help on using the changeset viewer.