In Radar as 7362913. To reproduce: 1. Launch Safari 2. Paste this into the URL field, and hit enter: data:text/html,%3Cinput%20type=%22password%22%3E 3. Right-click the password field The context menu shows "Import Image" and "Capture Selection from Screen" context menu items, which don't make sense for a password field.
Created attachment 52075 [details] Patch that does returns self for non-string content only if _canEditRichly is true Based on a patch by Peter Ammon in the associated radar.
Comment on attachment 52075 [details] Patch that does returns self for non-string content only if _canEditRichly is true > Index: WebKit/mac/ChangeLog > =================================================================== > --- WebKit/mac/ChangeLog (revision 56805) > +++ WebKit/mac/ChangeLog (working copy) > @@ -1,3 +1,15 @@ > +2010-03-30 John Sullivan <sullivan@apple.com> > + > + Reviewed by NOBODY (OOPS!). > + > + https://bugs.webkit.org/show_bug.cgi?id=36848 > + <rdar://problem/7362913> > + Menu items appropriate only for rich-content editing can appear in plain-text contexts > + > + * WebView/WebHTMLView.mm: > + (-[WebHTMLView validRequestorForSendType:returnType:]): > + Don't return self for non-string content if _canEditRichly is false. > + > 2010-03-29 Alexey Proskuryakov <ap@apple.com> > > Reviewed by Darin Adler. > Index: WebKit/mac/WebView/WebHTMLView.mm > =================================================================== > --- WebKit/mac/WebView/WebHTMLView.mm (revision 56664) > +++ WebKit/mac/WebView/WebHTMLView.mm (working copy) > @@ -2539,7 +2539,13 @@ - (BOOL)readSelectionFromPasteboard:(NSP > - (id)validRequestorForSendType:(NSString *)sendType returnType:(NSString *)returnType > { > BOOL isSendTypeOK = !sendType || ([[self pasteboardTypesForSelection] containsObject:sendType] && [self _hasSelection]); > - BOOL isReturnTypeOK = !returnType || ([[[self class] _insertablePasteboardTypes] containsObject:returnType] && [self _isEditable]); > + BOOL isReturnTypeOK = NO; > + if (!returnType) Weird indentation.
Committed in http://trac.webkit.org/changeset/56806
See also: bug 8714.