Changeset 19494 in webkit
- Timestamp:
- Feb 7, 2007 9:41:39 PM (17 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r19487 r19494 1 2007-02-07 Charles Ying <charles_ying@yahoo.com> 2 3 Reviewed by Adam. 4 5 Code suggestion by aroben 6 7 Fix http://bugs.webkit.org/show_bug.cgi?id=12688 8 9 REGRESSION (r19469): ASSERT when right clicking on hyperlinks! in TOT webkit 10 11 * WebCoreSupport/WebContextMenuClient.mm: 12 (fixMenusReceivedFromOldClients): 13 14 - fixMenusReceivedFromOldClients was hitting an ASSERT incorrectly 15 because it could not match [item title] to any of the contentMenuItemTags 16 using pointer comparison ==. Instead, it needs to do a string comparison 17 between [item title] and the various contentMenuItemTags using 18 isEqualToString instead of ==. You would encounter this whenever the 19 context menu was activated, e.g., from a hyperlink right click (or 20 control click). 21 22 1 23 2007-02-07 Anders Carlsson <acarlsson@apple.com> 2 24 -
trunk/WebKit/WebCoreSupport/WebContextMenuClient.mm
r19469 r19494 133 133 134 134 NSString *title = [item title]; 135 if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagOpenLink])135 if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagOpenLink]]) 136 136 [item setTag:WebMenuItemTagOpenLink]; 137 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagIgnoreGrammar])137 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagIgnoreGrammar]]) 138 138 [item setTag:WebMenuItemTagIgnoreGrammar]; 139 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagSpellingMenu])139 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSpellingMenu]]) 140 140 [item setTag:WebMenuItemTagSpellingMenu]; 141 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagShowSpellingPanel:true]142 || title == [[WebViewFactory sharedFactory] contextMenuItemTagShowSpellingPanel:false])141 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowSpellingPanel:true]] 142 || [title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowSpellingPanel:false]]) 143 143 [item setTag:WebMenuItemTagShowSpellingPanel]; 144 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagCheckSpelling])144 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCheckSpelling]]) 145 145 [item setTag:WebMenuItemTagCheckSpelling]; 146 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagCheckSpellingWhileTyping])146 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCheckSpellingWhileTyping]]) 147 147 [item setTag:WebMenuItemTagCheckSpellingWhileTyping]; 148 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagCheckGrammarWithSpelling])148 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagCheckGrammarWithSpelling]]) 149 149 [item setTag:WebMenuItemTagCheckGrammarWithSpelling]; 150 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagFontMenu])150 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagFontMenu]]) 151 151 [item setTag:WebMenuItemTagFontMenu]; 152 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagShowFonts])152 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowFonts]]) 153 153 [item setTag:WebMenuItemTagShowFonts]; 154 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagBold])154 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagBold]]) 155 155 [item setTag:WebMenuItemTagBold]; 156 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagItalic])156 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagItalic]]) 157 157 [item setTag:WebMenuItemTagItalic]; 158 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagUnderline])158 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagUnderline]]) 159 159 [item setTag:WebMenuItemTagUnderline]; 160 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagOutline])160 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagOutline]]) 161 161 [item setTag:WebMenuItemTagOutline]; 162 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagStyles])162 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagStyles]]) 163 163 [item setTag:WebMenuItemTagStyles]; 164 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagShowColors])164 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagShowColors]]) 165 165 [item setTag:WebMenuItemTagShowColors]; 166 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagSpeechMenu])166 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagSpeechMenu]]) 167 167 [item setTag:WebMenuItemTagSpeechMenu]; 168 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagStartSpeaking])168 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagStartSpeaking]]) 169 169 [item setTag:WebMenuItemTagStartSpeaking]; 170 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagStopSpeaking])170 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagStopSpeaking]]) 171 171 [item setTag:WebMenuItemTagStopSpeaking]; 172 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagWritingDirectionMenu])172 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagWritingDirectionMenu]]) 173 173 [item setTag:WebMenuItemTagWritingDirectionMenu]; 174 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagDefaultDirection])174 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagDefaultDirection]]) 175 175 [item setTag:WebMenuItemTagDefaultDirection]; 176 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagLeftToRight])176 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagLeftToRight]]) 177 177 [item setTag:WebMenuItemTagLeftToRight]; 178 else if ( title == [[WebViewFactory sharedFactory] contextMenuItemTagRightToLeft])178 else if ([title isEqualToString:[[WebViewFactory sharedFactory] contextMenuItemTagRightToLeft]]) 179 179 [item setTag:WebMenuItemTagRightToLeft]; 180 180 else {
Note: See TracChangeset
for help on using the changeset viewer.