Changeset 21728 in webkit
- Timestamp:
- May 24, 2007, 1:57:00 PM (17 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r21710 r21728 1 2007-05-24 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Adam, Darin, and Geoff. 4 5 Fix for <rdar://problem/5000470> REGRESSION: The IM reconvert 6 function returns incorrect symbol due to inconsistent range 7 domains in TSM 8 9 Text Services Management uses ranges provided by the 10 NSTextInput API to index into the string return by 11 -[WebHTMLView string]. As a result some input methods 12 incorrectly get their candidate text from the beginning 13 of the document instead of from the input element. 14 15 TSM prefers to query -textStorage over -string so as a 16 workaround we provide an implementation of -textStorage that 17 returns the content of the current text input. TSM only ever 18 queries the result of textStorage as an NSAttributedString so 19 we do not need to implement a fake NSTextStorage class 20 21 This should not cause harm to anything else as textStorage is 22 actually a method on NSTextView, which we clearly are not. TSM 23 only queries the method because it uses respondsToSelector to 24 control behaviour. 25 26 * WebView/WebHTMLView.mm: 27 (-[WebHTMLView textStorage]): 28 29 1 30 2007-05-24 David Harrison <harrison@apple.com> 2 31 -
trunk/WebKit/WebView/WebHTMLView.mm
r21618 r21728 5893 5893 } 5894 5894 5895 - (NSAttributedString *)textStorage 5896 { 5897 NSAttributedString *result = [self attributedSubstringFromRange:NSMakeRange(0, UINT_MAX)]; 5898 // We have to return an empty string rather than null to prevent TSM from calling -string 5899 return result ? result : [[[NSAttributedString alloc] initWithString:@""] autorelease]; 5900 } 5901 5895 5902 - (NSAttributedString *)_attributeStringFromDOMRange:(DOMRange *)range 5896 5903 {
Note:
See TracChangeset
for help on using the changeset viewer.