Commit 0c86647c authored by oliver@apple.com's avatar oliver@apple.com

<rdar://problem/5522011> The content of the password field of Safari is displayed by reconversion.

Reviewed by Darin.

Some input methods (notably Kotoeri) can incorrectly provide
access to the raw text of a password field.  To work around
this we forcefully override the inputContext whenever a password
field is active.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d9fffcca
2007-11-12 Oliver Hunt <oliver@apple.com>
Reviewed by Darin.
<rdar://problem/5522011> The content of the password field of
Safari is displayed by reconversion.
Some input methods (notably Kotoeri) can incorrectly provide
access to the raw text of a password field. To work around
this we forcefully override the inputContext whenever a password
field is active.
* WebView/WebHTMLView.mm:
(-[WebHTMLView inputContext]):
2007-11-12 John Sullivan <sullivan@apple.com>
Reviewed by Tim Hatcher
......
......@@ -323,6 +323,11 @@ static CachedResourceClient* promisedDataClient()
- (void)_setPrinting:(BOOL)printing minimumPageWidth:(float)minPageWidth maximumPageWidth:(float)maxPageWidth adjustViewSize:(BOOL)adjustViewSize;
@end
@class NSInputContext;
@interface NSResponder (IMSecretsIKnowAbout)
- (NSInputContext *)inputContext;
@end
@interface WebHTMLView (WebNSTextInputSupport) <NSTextInput>
- (void)_updateSelectionForInputManager;
@end
......@@ -5327,6 +5332,18 @@ static BOOL isTextInput(Frame* coreFrame)
return coreFrame && !coreFrame->selectionController()->isNone() && coreFrame->selectionController()->isContentEditable();
}
// Work around for <rdar://problem/5522011>
// Some input methods do not properly behave when TSM is in secure input mode
// which can allow the password to be made visible. We prevent this by overriding
// the active context if a password field is focused.
- (NSInputContext *)inputContext
{
Frame* coreFrame = core([self _frame]);
if (coreFrame && coreFrame->selectionController()->isInPasswordField())
return nil;
return [super inputContext];
}
- (NSAttributedString *)textStorage
{
if (!isTextInput(core([self _frame]))) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment