зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1059165
- Part 1 - Always sync visibility for touch caret. r=ehsan
We should sync touch caret's visibility with caret every time since touch caret might be hidden due to timeout while caret is enabled. Also remove dead code.
This commit is contained in:
Родитель
5e93e0f48a
Коммит
785ffc0d50
|
@ -2224,20 +2224,17 @@ NS_IMETHODIMP PresShell::SetCaretEnabled(bool aInEnable)
|
|||
|
||||
if (mCaretEnabled != oldEnabled)
|
||||
{
|
||||
/* Don't change the caret's selection here! This was an evil side-effect of SetCaretEnabled()
|
||||
nsCOMPtr<nsIDOMSelection> domSel;
|
||||
if (NS_SUCCEEDED(GetSelection(nsISelectionController::SELECTION_NORMAL, getter_AddRefs(domSel))) && domSel)
|
||||
mCaret->SetCaretDOMSelection(domSel);
|
||||
*/
|
||||
|
||||
MOZ_ASSERT(mCaret || mTouchCaret);
|
||||
MOZ_ASSERT(mCaret);
|
||||
if (mCaret) {
|
||||
mCaret->SetVisible(mCaretEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
// We should sync touch caret's visibility with caret every time since touch
|
||||
// caret might be hidden due to timeout while caret is enabled.
|
||||
if (mTouchCaret) {
|
||||
mTouchCaret->SyncVisibilityWithCaret();
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче