WebCore:
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2006 18:32:40 +0000 (18:32 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2006 18:32:40 +0000 (18:32 +0000)
commitaf65c827b57dc2f93a0b2fb054acccaf0fb42a09
treed1fb3c2da5b09ba45fa511d832d8bce261627e74
parent43c2650f8d42bdb071b355aa2470f514287b1b89
WebCore:

        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: https://svn.webkit.org/repository/webkit/trunk@16116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/bridge/mac/FrameMac.h
WebCore/bridge/mac/FrameMac.mm
WebCore/bridge/mac/WebCoreFrameBridge.h
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/css/html4.css
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebKit/ChangeLog
WebKit/WebView/WebHTMLView.m