+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
- (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
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]))) {