Index: ChangeLog =================================================================== RCS file: /local/home/cvs/Labyrinth/WebCore/ChangeLog,v retrieving revision 1.1742 diff -u -p -r1.1742 ChangeLog --- ChangeLog 2003/05/27 23:22:42 1.1742 +++ ChangeLog 2003/05/28 23:51:24 @@ -1,3 +1,13 @@ +2003-05-28 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Darin. + + - fixed 3263157 - REGRESSION: tabbing into a secure password field shows contents + + * kwq/KWQTextField.mm: + (-[KWQSecureTextField textDidEndEditing:]): Make sure to restore bullet mode if we + accidentally lose it. + 2003-05-27 Maciej Stachowiak <mjs@apple.com> Rolled in fix from Safari-80~1-branch Index: kwq/KWQTextField.mm =================================================================== RCS file: /local/home/cvs/Labyrinth/WebCore/kwq/KWQTextField.mm,v retrieving revision 1.44 diff -u -p -r1.44 kwq/KWQTextField.mm --- kwq/KWQTextField.mm 2003/05/14 18:13:48 1.44 +++ kwq/KWQTextField.mm 2003/05/28 23:51:25 @@ -612,6 +612,27 @@ [[self delegate] fieldEditorDidMouseDown:event]; } +- (void)textDidEndEditing:(NSNotification *)notification +{ + [super textDidEndEditing:notification]; + + // When tabbing from one secure text field to another, the super + // call above will change the focus, and then turn off bullet mode + // for the secure field, leaving the plain text showing. As a + // workaround for this AppKit bug, we detect this circumstance + // (changing from one secure field to another) and set selectable + // to YES, and then back to whatever it was - this has the side + // effect of turning on bullet mode. + + NSTextView *textObject = [notification object]; + id delegate = [textObject delegate]; + if (delegate != self && [delegate isKindOfClass:[NSSecureTextField class]]) { + BOOL oldSelectable = [textObject isSelectable]; + [textObject setSelectable:YES]; + [textObject setSelectable:oldSelectable]; + } +} + @end @implementation KWQSecureTextFieldCell