Changeset 18975 in webkit
- Timestamp:
- Jan 18, 2007 10:49:12 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r18974 r18975 1 2007-01-18 Adam Roben <aroben@apple.com> 2 3 Reviewed by Beth. 4 5 Fix: <rdar://problem/4939672> REGRESSION: With text selected that is 6 not a link, the "Remove Link" contextual menu item remains active 7 8 * platform/ContextMenuItem.h: Added enabled method. 9 * platform/qt/ContextMenuItemQt.cpp: 10 (WebCore::ContextMenuItem::enabled): Implemented. 11 * platform/mac/ContextMenuItemMac.mm: 12 (WebCore::ContextMenuItem::enabled): Ditto. 13 * platform/mac/ContextMenuMac.mm: 14 (-[WebCoreMenuTarget validateMenuItem:]): Implemented to fulfill the 15 NSMenuValidation protocol. 16 1 17 2007-01-18 Beth Dakin <bdakin@apple.com> 2 18 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r18966 r18975 10990 10990 isa = PBXProject; 10991 10991 buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */; 10992 compatibilityVersion = "Xcode 2.4"; 10992 10993 hasScannedForEncodings = 1; 10993 10994 knownRegions = ( … … 11004 11005 projectDirPath = ""; 11005 11006 projectRoot = ""; 11007 shouldCheckCompatibility = 1; 11006 11008 targets = ( 11007 11009 93F198A508245E59001E9ABC /* WebCore */, -
trunk/WebCore/platform/ContextMenuItem.h
r18262 r18975 145 145 146 146 void setChecked(bool = true); 147 147 148 void setEnabled(bool = true); 149 bool enabled() const; 148 150 149 151 // FIXME: Do we need a keyboard accelerator here? -
trunk/WebCore/platform/mac/ContextMenuItemMac.mm
r18262 r18975 146 146 } 147 147 148 bool ContextMenuItem::enabled() const 149 { 150 return [m_platformDescription.get() isEnabled]; 148 151 } 152 153 } -
trunk/WebCore/platform/mac/ContextMenuMac.mm
r18889 r18975 36 36 - (void)setMenuController:(WebCore::ContextMenuController*)menuController; 37 37 - (void)forwardContextMenuAction:(id)sender; 38 - (BOOL)validateMenuItem:(NSMenuItem *)item; 38 39 @end 39 40 … … 63 64 WebCore::ContextMenuItem item(WebCore::ActionType, static_cast<WebCore::ContextMenuAction>([sender tag]), [sender title]); 64 65 _menuController->contextMenuItemSelected(&item); 66 } 67 68 - (BOOL)validateMenuItem:(NSMenuItem *)item 69 { 70 WebCore::ContextMenuItem coreItem(item); 71 ASSERT(_menuController->contextMenu()); 72 _menuController->contextMenu()->checkOrEnableIfNeeded(coreItem); 73 return coreItem.enabled(); 65 74 } 66 75 -
trunk/WebCore/platform/qt/ContextMenuItemQt.cpp
r18273 r18975 94 94 } 95 95 96 bool ContextMenuItem::enabled() const 97 { 98 return true; 96 99 } 100 101 } -
trunk/WebKit/ChangeLog
r18967 r18975 1 2007-01-18 Adam Roben <aroben@apple.com> 2 3 Reviewed by Beth. 4 5 Fix <rdar://problem/4939672> REGRESSION: With text selected that is 6 not a link, the "Remove Link" contextual menu item remains active 7 8 * WebView/WebHTMLView.mm: 9 (-[WebHTMLView menuForEvent:]): Leave autoenabling of menu items on so 10 that clients can implement validateMenuItem:. 11 1 12 2007-01-18 Brady Eidson <beidson@apple.com> 2 13 -
trunk/WebKit/WebKit.xcodeproj/project.pbxproj
r18764 r18975 1267 1267 isa = PBXProject; 1268 1268 buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */; 1269 compatibilityVersion = "Xcode 2.4"; 1269 1270 hasScannedForEncodings = 1; 1270 1271 knownRegions = ( … … 1281 1282 projectDirPath = ""; 1282 1283 projectRoot = ""; 1284 shouldCheckCompatibility = 1; 1283 1285 targets = ( 1284 1286 9398100A0824BF01008DF038 /* WebKit */, -
trunk/WebKit/WebView/WebHTMLView.mm
r18928 r18975 2569 2569 if (menuItems && [menuItems count] > 0) { 2570 2570 menu = [[[NSMenu alloc] init] autorelease]; 2571 [menu setAutoenablesItems:NO];2572 2571 for (unsigned i = 0; i < [menuItems count]; i++) 2573 2572 [menu addItem:[menuItems objectAtIndex:i]];
Note: See TracChangeset
for help on using the changeset viewer.