From 53ee0deaab6cba87de564a1e91c78e0d905d46af 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 --- 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 671e2ad6016..fbc03ee85cb 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 cefc6422f12..7320e516418 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;