Bug 1187351 TSFTextStore should forget modified range at notifying TSF of layout change since GetTextExt() shouldn't return TS_E_NOLAYOUT after that r=emk

This commit is contained in:
Masayuki Nakano 2015-07-26 12:29:47 +09:00
parent 724ce38341
commit 18e5546661
2 changed files with 11 additions and 0 deletions

View File

@ -4555,6 +4555,12 @@ TSFTextStore::NotifyTSFOfLayoutChange(bool aFlush)
{
mPendingOnLayoutChange = false;
// Now, layout has been computed. We should notify mLockedContent for
// making GetTextExt() and GetACPFromPoint() not return TS_E_NOLAYOUT.
if (mLockedContent.IsInitialized()) {
mLockedContent.OnLayoutChanged();
}
// This method should return true if either way succeeds.
bool ret = false;

View File

@ -624,6 +624,11 @@ protected:
mInitialized = true;
}
void OnLayoutChanged()
{
mMinTextModifiedOffset = NOT_MODIFIED;
}
const nsDependentSubstring GetSelectedText() const;
const nsDependentSubstring GetSubstring(uint32_t aStart,
uint32_t aLength) const;