From a06294cced922147bfe654cb1bbbf3aa07d17d85 Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Mon, 16 Nov 2015 14:03:35 +0000 Subject: [PATCH] Bug 1221947 - part 3: pass touch information to focus manager in RenderFrameParent, r=kats --HG-- extra : commitid : 47acXgQvIIX extra : rebase_source : 5cd19375c1bd6451e9cf80f6bae8dbf1de2b34be extra : histedit_source : 50e6c9d203bde42a45812d352d60fa45987d8806 --- layout/ipc/RenderFrameParent.cpp | 5 +++-- layout/ipc/RenderFrameParent.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/layout/ipc/RenderFrameParent.cpp b/layout/ipc/RenderFrameParent.cpp index 671e2ad6016d..fbc03ee85cb0 100644 --- a/layout/ipc/RenderFrameParent.cpp +++ b/layout/ipc/RenderFrameParent.cpp @@ -173,7 +173,7 @@ public: return; } if (mRenderFrame) { - mRenderFrame->TakeFocusForClick(); + mRenderFrame->TakeFocusForClickFromTap(); TabParent* browser = TabParent::GetFrom(mRenderFrame->Manager()); browser->HandleSingleTap(aPoint, aModifiers, aGuid); } @@ -609,7 +609,7 @@ RenderFrameParent::GetTextureFactoryIdentifier(TextureFactoryIdentifier* aTextur } void -RenderFrameParent::TakeFocusForClick() +RenderFrameParent::TakeFocusForClickFromTap() { nsIFocusManager* fm = nsFocusManager::GetFocusManager(); if (!fm) { @@ -624,6 +624,7 @@ RenderFrameParent::TakeFocusForClick() return; } fm->SetFocus(element, nsIFocusManager::FLAG_BYMOUSE | + nsIFocusManager::FLAG_BYTOUCH | nsIFocusManager::FLAG_NOSCROLL); } diff --git a/layout/ipc/RenderFrameParent.h b/layout/ipc/RenderFrameParent.h index cefc6422f129..7320e516418e 100644 --- a/layout/ipc/RenderFrameParent.h +++ b/layout/ipc/RenderFrameParent.h @@ -101,7 +101,7 @@ public: inline uint64_t GetLayersId() { return mLayersId; } - void TakeFocusForClick(); + void TakeFocusForClickFromTap(); protected: void ActorDestroy(ActorDestroyReason why) override;