Reviewed by John.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2006 19:01:29 +0000 (19:01 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2006 19:01:29 +0000 (19:01 +0000)
        - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10580
          Password: New secure text field allows non-Roman text entry

        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::setSecureKeyboardEntry): Enable and disable Roman keyboards when switching in and out of this mode.
        (WebCore::FrameMac::isSecureKeyboardEntry): Changed secureKeyboardEntry to isSecureKeyboardEntry.
        * bridge/mac/FrameMac.h: ditto.
        * page/Frame.cpp: (WebCore::Frame::setIsActive): ditto.
        * page/Frame.h: (WebCore::Frame::isSecureKeyboardEntry): ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16174 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/bridge/mac/FrameMac.h
WebCore/bridge/mac/FrameMac.mm
WebCore/page/Frame.cpp
WebCore/page/Frame.h

index e30bb6379dac418e078f8a36b04436b9468415b0..9a2a4d9624fbc4cc8633cd277a4a16d694c02b02 100644 (file)
@@ -1,3 +1,17 @@
+2006-09-01  Adele Peterson  <adele@apple.com>
+
+        Reviewed by John.
+
+        - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10580
+          Password: New secure text field allows non-Roman text entry
+
+        * bridge/mac/FrameMac.mm:
+        (WebCore::FrameMac::setSecureKeyboardEntry): Enable and disable Roman keyboards when switching in and out of this mode.
+        (WebCore::FrameMac::isSecureKeyboardEntry): Changed secureKeyboardEntry to isSecureKeyboardEntry.
+        * bridge/mac/FrameMac.h: ditto.
+        * page/Frame.cpp: (WebCore::Frame::setIsActive): ditto.
+        * page/Frame.h: (WebCore::Frame::isSecureKeyboardEntry): ditto.
+
 2006-09-01  Adele Peterson  <adele@apple.com>
 
         Reviewed by John.
@@ -6,7 +20,7 @@
           Password: Disable smartReplace for new password fields
 
         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply):
-          Don't smart replace when the selection being replaces is in a password field.
+          Don't smart replace when the selection being replaced is in a password field.
 
 2006-08-31  Sam Weinig  <sam.weinig@gmail.com>
 
index ec0003be16b913e253d84004648d75b1c07fff21..4073f7f7fa4fc28a50a0da1474f6b94210988731 100644 (file)
@@ -281,7 +281,7 @@ public:
     virtual bool inputManagerHasMarkedText() const;
     
     virtual void setSecureKeyboardEntry(bool);
-    virtual bool secureKeyboardEntry();
+    virtual bool isSecureKeyboardEntry();
 
     KJS::Bindings::RootObject* executionContextForDOM();
     KJS::Bindings::RootObject* bindingRootObject();
index 55ee9e0af5cb780a4286aa98c91a940af695eca3..24d08eed6a430065192741c232e74f810a202530 100644 (file)
@@ -3343,15 +3343,19 @@ bool FrameMac::inputManagerHasMarkedText() const
     return false;
 }
 
+const short enableRomanKeyboardsOnly = -23;
 void FrameMac::setSecureKeyboardEntry(bool enable)
 {
-    if (enable)
+    if (enable) {
         EnableSecureEventInput();
-    else
+        KeyScript(enableRomanKeyboardsOnly);
+    } else {
         DisableSecureEventInput();
+        KeyScript(smKeyEnableKybds);
+    }
 }
 
-bool FrameMac::secureKeyboardEntry()
+bool FrameMac::isSecureKeyboardEntry()
 {
     return IsSecureEventInputEnabled();
 }
index fefc1f0ca6fb3734f1fe31688ee46555764bfad6..89a8c4de965f0c431af11b4ddd66421ed6a4a005 100644 (file)
@@ -3367,9 +3367,9 @@ void Frame::setIsActive(bool flag)
     }
    
     // 5. Enable or disable secure keyboard entry
-    if ((flag && !secureKeyboardEntry() && doc && doc->focusNode() && doc->focusNode()->hasTagName(inputTag) && 
+    if ((flag && !isSecureKeyboardEntry() && doc && doc->focusNode() && doc->focusNode()->hasTagName(inputTag) && 
             static_cast<HTMLInputElement*>(doc->focusNode())->inputType() == HTMLInputElement::PASSWORD) ||
-        (!flag && secureKeyboardEntry()))
+        (!flag && isSecureKeyboardEntry()))
             setSecureKeyboardEntry(flag);
 }
 
index dda3d46f99dd0fa950cbb970ae55b22187a88859..f5338604d191e65db1e092b222e5a841ee1e8155 100644 (file)
@@ -418,7 +418,7 @@ public:
   virtual bool inputManagerHasMarkedText() const { return false; }
   
   virtual void setSecureKeyboardEntry(bool) {};
-  virtual bool secureKeyboardEntry() { return false; }
+  virtual bool isSecureKeyboardEntry() { return false; }
   
   bool isSelectionInPasswordField();