Closed
Bug 1055342
Opened 9 years ago
Closed 9 years ago
[TSF] Rename CurrentContent of nsTextStore to LockedContent
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Keywords: inputmethod)
Attachments
(2 files)
17.68 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
3.16 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
Currently, while the document is locked, nsTextStore caches the content and selection to CurrentContent and CurrentSelection. But these information are available only while the document is locked. However, for implement ITfMouseTrackerACP, nsTextStore needs to retrieve content information at installing ITfMouseSink (i.e., when ITfMouseTrackerACP::AdviseSink() is called). I think that CurrentContent and CurrentSelection should be renamed to Locked*. And we need to make create GetCurrentContent() and GetCurrentSelection() for retrieving them anytime.
Assignee | ||
Comment 1•9 years ago
|
||
Er, sorry. CurrentSelection() is also available without the document lock. So, we can keep its name.
Summary: [TSF] Rename CurrentContent and CurrentSelection of nsTextStore to LockedContent and LockedSelection → [TSF] Rename CurrentContent of nsTextStore to LockedContent
Assignee | ||
Comment 2•9 years ago
|
||
Storing all text of focused editor may be bad for footprint. Therefore, we still need to release it at unlocking the document because TIP accesses only during document lock. So, "locked content" is better name than "(current) content". This will help when we need to access "current" content without document lock. E.g., at installing a sink.
Attachment #8477320 -
Flags: review?(VYV03354)
Assignee | ||
Comment 3•9 years ago
|
||
This creates a helper method for getting current content.
Attachment #8477322 -
Flags: review?(VYV03354)
Comment 4•9 years ago
|
||
Comment on attachment 8477320 [details] [diff] [review] part.1 Rename nsTextStore::mContent and nsTextStore::CurrentContent() to mLockedContent and LockedContent() >--- a/widget/windows/nsTextStore.h >+++ b/widget/windows/nsTextStore.h >@@ -245,18 +245,23 @@ protected: > bool IsReadLock(DWORD aLock) const > { > return (TS_LF_READ == (aLock & TS_LF_READ)); > } > bool IsReadWriteLock(DWORD aLock) const > { > return (TS_LF_READWRITE == (aLock & TS_LF_READWRITE)); > } >+ bool IsReadOrWriteLock(DWORD aLock) const >+ { >+ return !!(aLock & TS_LF_READ); >+ } What's the difference between IsReadLock and IsReadOrWriteLock?
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #4) > Comment on attachment 8477320 [details] [diff] [review] > part.1 Rename nsTextStore::mContent and nsTextStore::CurrentContent() to > mLockedContent and LockedContent() > > >--- a/widget/windows/nsTextStore.h > >+++ b/widget/windows/nsTextStore.h > >@@ -245,18 +245,23 @@ protected: > > bool IsReadLock(DWORD aLock) const > > { > > return (TS_LF_READ == (aLock & TS_LF_READ)); > > } > > bool IsReadWriteLock(DWORD aLock) const > > { > > return (TS_LF_READWRITE == (aLock & TS_LF_READWRITE)); > > } > >+ bool IsReadOrWriteLock(DWORD aLock) const > >+ { > >+ return !!(aLock & TS_LF_READ); > >+ } > > What's the difference between IsReadLock and IsReadOrWriteLock? Oops, I misunderstood IsReadLock() as IsReadOnlyLock(). I'll remove IsReadOrWriteLock() and use IsReadLock().
Comment 6•9 years ago
|
||
Comment on attachment 8477320 [details] [diff] [review] part.1 Rename nsTextStore::mContent and nsTextStore::CurrentContent() to mLockedContent and LockedContent() (In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #5) > Oops, I misunderstood IsReadLock() as IsReadOnlyLock(). I'll remove > IsReadOrWriteLock() and use IsReadLock(). OK, r=me with the extra method removed.
Attachment #8477320 -
Flags: review?(VYV03354) → review+
Updated•9 years ago
|
Attachment #8477322 -
Flags: review?(VYV03354) → review+
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a180dbeebe4f https://hg.mozilla.org/integration/mozilla-inbound/rev/8a7771c44e38 Thank you very much, Kimura-san!
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a180dbeebe4f https://hg.mozilla.org/mozilla-central/rev/8a7771c44e38
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•