Bug 1409113 - Add nsIPresShell::HasHandledUserInput() status to InputContext r=masayuki

MozReview-Commit-ID: 60x35NKEzhA
This commit is contained in:
James Willcox 2017-11-21 16:28:36 -06:00
parent bacda12532
commit e1181af857
2 changed files with 8 additions and 0 deletions

View File

@ -1279,6 +1279,9 @@ IMEStateManager::SetIMEState(const IMEState& aState,
context.mMayBeIMEUnaware = context.mIMEState.IsEditable() &&
sCheckForIMEUnawareWebApps && MayBeIMEUnawareWebApp(aContent);
context.mHasHandledUserInput =
aPresContext && aPresContext->PresShell()->HasHandledUserInput();
context.mInPrivateBrowsing =
aPresContext &&
nsContentUtils::IsInPrivateBrowsing(aPresContext->Document());

View File

@ -325,6 +325,11 @@ struct InputContext final
* compatibility with webapps relying on key listeners. */
bool mMayBeIMEUnaware;
/**
* True if the document has ever received user input
*/
bool mHasHandledUserInput;
/* Whether the owning document of the input element has been loaded
* in private browsing mode. */
bool mInPrivateBrowsing;