Closed Bug 789703 Opened 12 years ago Closed 12 years ago

[TSF] nsTextStore::InsertTextAtSelect() should allow readonly lock if dwFlags == TF_IAS_QUERYONLY

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod)

Attachments

(1 file)

MSDN document doesn't mention about this issue:
http://msdn.microsoft.com/en-us/library/ms538441%28v=vs.85%29

However, it seems that it doesn't make sense to block the query when readonly lock is granted.

Actually, ATOK 2012 calls this method with readonly lcok.
Attached patch Patch (deleted) — Splinter Review
Attachment #659637 - Flags: review?(jmathies)
Attachment #659637 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/cc43a4e4ee95
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Hi,

-> Comment 1
> Actually, ATOK 2012 calls this method with readonly lcok.

Yes. And this behavior looks valid according to the document of ITfInsertAtSelection::InsertTextAtSelection, which is the counterpart of ITextStoreACP::InsertTextAtSelection and used by TIPs like ATOK.

The document of ITfInsertAtSelection::InsertTextAtSelection says:
> TF_IAS_QUERYONLY: The context is not modified, but ppRange is set as if the insert had
>     occurred. Read-only access is sufficient. If this flag is not set, ec must have
>     read/write access. This flag cannot be combined with the TF_IAS_NOQUERY flag.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms628599.aspx

So I believe the attached patch actually fixed the issue and now your text store conforms to the semantics described in the MSDN document for TIPs.

Cheers,
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: