summaryrefslogtreecommitdiffstats
path: root/widget/windows/TSFTextStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'widget/windows/TSFTextStore.cpp')
-rw-r--r--widget/windows/TSFTextStore.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/widget/windows/TSFTextStore.cpp b/widget/windows/TSFTextStore.cpp
index c80de831c..12b8cd0c1 100644
--- a/widget/windows/TSFTextStore.cpp
+++ b/widget/windows/TSFTextStore.cpp
@@ -1355,7 +1355,9 @@ TSFTextStore::Init(nsWindowBase* aWidget,
return false;
}
- SetInputScope(aContext.mHTMLInputType, aContext.mHTMLInputInputmode);
+ SetInputScope(aContext.mHTMLInputType,
+ aContext.mHTMLInputInputmode,
+ aContext.mInPrivateBrowsing);
// Create document manager
RefPtr<ITfThreadMgr> threadMgr = sThreadMgr;
@@ -3205,9 +3207,15 @@ TSFTextStore::InsertEmbedded(DWORD dwFlags,
void
TSFTextStore::SetInputScope(const nsString& aHTMLInputType,
- const nsString& aHTMLInputInputMode)
+ const nsString& aHTMLInputInputMode,
+ bool aInPrivateBrowsing)
{
mInputScopes.Clear();
+
+ if (aInPrivateBrowsing) {
+ mInputScopes.AppendElement(IS_PRIVATE);
+ }
+
if (aHTMLInputType.IsEmpty() || aHTMLInputType.EqualsLiteral("text")) {
if (aHTMLInputInputMode.EqualsLiteral("url")) {
mInputScopes.AppendElement(IS_URL);
@@ -5688,7 +5696,8 @@ TSFTextStore::SetInputContext(nsWindowBase* aWidget,
if (sEnabledTextStore) {
RefPtr<TSFTextStore> textStore(sEnabledTextStore);
textStore->SetInputScope(aContext.mHTMLInputType,
- aContext.mHTMLInputInputmode);
+ aContext.mHTMLInputInputmode,
+ aContext.mInPrivateBrowsing);
}
return;
}