-
adele authored
Reviewed by Darin. - WebCore part of fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=10576 Disallow copy from new password fields * page/Frame.cpp: (WebCore::Frame::mayCopy): Added. Checks to see if the selection is within a password field. * page/Frame.h: Added mayCopy. * bridge/mac/FrameMac.h: * bridge/mac/FrameMac.mm: (WebCore::FrameMac::handleMouseMoveEvent): Checks mayCopy before starting a drag. (WebCore::FrameMac::mayDHTMLCut): Renamed to match the bridge method. This also checks mayCopy now. (WebCore::FrameMac::mayDHTMLCopy): ditto. (WebCore::FrameMac::tryDHTMLCut): ditto. (WebCore::FrameMac::tryDHTMLCopy): ditto. (WebCore::FrameMac::mayDHTMLPaste): Renamed to match the bridge function. (WebCore::FrameMac::tryDHTMLPaste): ditto. * bridge/mac/WebCoreFrameBridge.h: * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge mayCopy]): Calls the renamed method on frame. (-[WebCoreFrameBridge mayDHTMLCut]): ditto. (-[WebCoreFrameBridge mayDHTMLCopy]): ditto. (-[WebCoreFrameBridge mayDHTMLPaste]): ditto. (-[WebCoreFrameBridge tryDHTMLCut]): ditto. (-[WebCoreFrameBridge tryDHTMLCopy]): ditto. (-[WebCoreFrameBridge tryDHTMLPaste]): ditto. * css/html4.css: Added !important to the -webkit-text-security property for password fields. WebKit: Reviewed by Darin. WebKit part of fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=10576 Disallow copy from new password fields * WebView/WebHTMLView.m: (-[WebHTMLView _canCopy]): Now also calls across the bridge to ask if it mayCopy. (-[WebHTMLView _canCut]): Calls _canCopy now. (-[NSArray validateUserInterfaceItem:]): Calls _canCut when validating the "Cut" menu item. This used to call _canDelete (which used to be the same as _canCut), but now _canCut also checks _canCopy. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e641062a