[Webkit-unassigned] [Bug 16046] New: WebHTML returns noErr for kTSMDocumentSupportDocumentAccessPropertyTag in non-editable areas

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 18 23:37:21 PST 2007


           Summary: WebHTML returns noErr for
                    kTSMDocumentSupportDocumentAccessPropertyTag in non-
                    editable areas
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: evan at rainmakerinc.com

When an input method tries to determine whether a TSMDocumentID supports TSM's
DocumentAccess event suite, it calls TSMGetDocumentProperty with the
kTSMDocumentSupportDocumentAccessPropertyTag. The result from WebHTMLView
indicates docaccess support even if its non-editable!

This gets input methods very confused, especially given that no error is
returned from SendTextInputEvent for kEventClassTSMDocumentAccess events
kEventTSMDocumentAccessGetLength and kEventTSMDocumentAccessGetSelectedRange.

To make matters even worse, the event parameters contain "interesting" values.
For kEventTSMDocumentAccessGetLength, on 10.4.11 it appears that an actual
length is returned. On 10.5.1, zero is returned. For
kEventParamTSMDocAccessReplyCharacterRange contains NSMakeRange(NSNotFound, 0).
This is especially bad, since that parameter is supposed to be of type
typeCFRange. But NSNotFound has no special meaning here as CFRange's location
is a signed type, and NSNotFound != kCFNotFound. Without special consideration,
this would be interpreted by the input method as an insertion point at offset
2147483648. Not a good thing. My input method doesn't crash because of this,
but I can image that it could lead to one.

I don't have a machine with a system older than 10.4.11 installed on it, but I
am quite certain this is a  regression.

I'm not sure how the kTSMDocumentSupportDocumentAccessPropertyTag is actually
derived by TSM, if it's done via validAttributesForMarkedText should it
actually return an empty array or nil.

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list