Bug 1221947 - part 3: pass touch information to focus manager in RenderFrameParent, r=kats

This commit is contained in:
Gijs Kruitbosch 2015-11-16 14:03:35 +00:00
parent eb67dde6dd
commit 53ee0deaab
2 changed files with 4 additions and 3 deletions

View File

@ -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);
}

View File

@ -101,7 +101,7 @@ public:
inline uint64_t GetLayersId() { return mLayersId; }
void TakeFocusForClick();
void TakeFocusForClickFromTap();
protected:
void ActorDestroy(ActorDestroyReason why) override;