Closed Bug 964623 Opened 12 years ago Closed 12 years ago

[TSF] nsTextStore::FlushPendingActions() shouldn't call OnLayouChange() and OnSelectionChange()

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: inputmethod)

Attachments

(1 file, 1 obsolete file)

Currently, nsTextStore::FlushPendingActions() calls ITextStoreACPSink::OnLayoutChange(), ITextStoreACPSink::OnSelectionChange() and ITfContextOwnerServices::OnLayoutChange(). However, they shouldn't be called during document locked since the method cannot lock our document with nsTextStore::RequestLock().
Attached patch Patch (obsolete) — Splinter Review
Attached patch PatchSplinter Review
I don't find any difference of behavior of Japanese TIPs. But I believe that this is right fix. (RequestLock() is always refused on current build if TIP tries to do something at calling OnLayouChange())
Attachment #8368444 - Attachment is obsolete: true
Attachment #8369865 - Flags: review?(VYV03354)
Is the document lock always held whenever nsTextStore::OnStartComposition, nsTextStore::OnUpdateComposition and nsTextStore::OnEndComposition are called?
(In reply to Masatoshi Kimura [:emk] from comment #3) > Is the document lock always held whenever nsTextStore::OnStartComposition, > nsTextStore::OnUpdateComposition and nsTextStore::OnEndComposition are > called? I'm not sure since MSDN doesn't document it clearly. However, looks like that its counter part (TIP side) documents that it may return TS_E_NOLOCK. http://msdn.microsoft.com/en-us/library/windows/desktop/ms538713%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms538684%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms538675%28v=vs.85%29.aspx I created AutoPendingActionAndContentFlusher for safer handling, though.
Comment on attachment 8369865 [details] [diff] [review] Patch Looks good to me. At least this patch will fix the violation of ITextStoreACPSink::OnSelectionChange() document. http://msdn.microsoft.com/en-us/library/windows/desktop/ms538405%28v=vs.85%29.aspx > When calling this method, the application must be able to grant a document lock.
Attachment #8369865 - Flags: review?(VYV03354) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: