Closed
Bug 819404
Opened 12 years ago
Closed 12 years ago
[TSF] Some methods of nsTextStore checks read lock, however, MSDN documents they don't allow to work without read-ONLY lock
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: inputmethod)
I realized that our nsTextStore methods check read lock flag with nsTextStore::IsReadLocked(). This means that nsTextStore allows them to work with read-write lock. However, MSDN documents said they should work with read-ONLY lock. This means that our code could become simpler than current one.
IsReadLocked() is checked by:
* nsTextStore::GetSelection()
> http://msdn.microsoft.com/en-us/library/ms538429%28v=vs.85%29.aspx
* nsTextStore::GetText()
> http://msdn.microsoft.com/en-us/library/ms538433%28v=vs.85%29.aspx (see the return value's document)
* nsTextStore::GetEndACP(LONG *pacp)
> http://msdn.microsoft.com/en-us/library/ms538424%28v=vs.85%29.aspx (see the return value's document)
* nsTextStore::GetACPFromPoint(TsViewCookie vcView,
const POINT *pt,
DWORD dwFlags,
LONG *pacp)
> http://msdn.microsoft.com/en-us/library/ms538418%28v=vs.85%29.aspx (not documented, but http://msdn.microsoft.com/en-us/library/windows/desktop/ms538780%28v=vs.85%29.aspx documents the specifying cookie must be read-only locked)
* nsTextStore::GetTextExt(TsViewCookie vcView,
LONG acpStart,
LONG acpEnd,
RECT *prc,
BOOL *pfClipped)
> http://msdn.microsoft.com/en-us/library/ms538435%28v=vs.85%29.aspx
* nsTextStore::InsertTextAtSelection(DWORD dwFlags,
const WCHAR *pchText,
ULONG cch,
LONG *pacpStart,
LONG *pacpEnd,
TS_TEXTCHANGE *pChange)
> http://msdn.microsoft.com/en-us/library/ms538441%28v=vs.85%29.aspx (not documented, but http://msdn.microsoft.com/en-us/library/windows/desktop/ms628599.aspx documents it should request read-only lock before calling this with TF_IAS_QUERYONLY)
So, I think that these methods should check whether (TS_LF_READ == (aLock & TS_LF_READWRITE)) or not.
Assignee | ||
Comment 1•12 years ago
|
||
InsertTextAtSelection() is not true. I misunderstand the document. The document says "read-only lock is sufficient". So, it should allow read-write lock too.
However, both MS-IME and ATOK access other methods with read-write lock. If we return TS_E_NOLOCK error at that time, they won't work :-(
So, I'm marking this as WONTFIX.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•