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
This commit is contained in:
Gijs Kruitbosch 2015-11-16 14:03:35 +00:00
Родитель aaf54987f1
Коммит a06294cced
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

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

Просмотреть файл

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