зеркало из https://github.com/mozilla/gecko-dev.git
Bug 976605 - Hook up TabChild to the ActiveElementManager. r=kats
--HG-- extra : source : 3589bda462816f0d40a7e77bc9060a9d3124d3bb
This commit is contained in:
Родитель
0076d9c10f
Коммит
a4fbe2f20e
|
@ -74,6 +74,7 @@
|
|||
#include "mozilla/gfx/Matrix.h"
|
||||
#include "UnitTransforms.h"
|
||||
#include "ClientLayerManager.h"
|
||||
#include "ActiveElementManager.h"
|
||||
|
||||
#include "nsColorPickerProxy.h"
|
||||
|
||||
|
@ -687,6 +688,7 @@ TabChild::TabChild(ContentChild* aManager, const TabContext& aContext, uint32_t
|
|||
, mContextMenuHandled(false)
|
||||
, mWaitingTouchListeners(false)
|
||||
, mIgnoreKeyPressEvent(false)
|
||||
, mActiveElementManager(new ActiveElementManager())
|
||||
{
|
||||
if (!sActiveDurationMsSet) {
|
||||
Preferences::AddIntVarCache(&sActiveDurationMs,
|
||||
|
@ -1754,6 +1756,21 @@ TabChild::RecvNotifyAPZStateChange(const ViewID& aViewId,
|
|||
}
|
||||
break;
|
||||
}
|
||||
case APZStateChange::StartTouch:
|
||||
{
|
||||
mActiveElementManager->HandleTouchStart(aArg);
|
||||
break;
|
||||
}
|
||||
case APZStateChange::StartPanning:
|
||||
{
|
||||
mActiveElementManager->HandlePanStart();
|
||||
break;
|
||||
}
|
||||
case APZStateChange::EndTouch:
|
||||
{
|
||||
mActiveElementManager->HandleTouchEnd(aArg);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// APZStateChange has a 'sentinel' value, and the compiler complains
|
||||
// if an enumerator is not handled and there is no 'default' case.
|
||||
|
@ -1962,6 +1979,10 @@ TabChild::RecvRealTouchEvent(const WidgetTouchEvent& aEvent,
|
|||
return true;
|
||||
}
|
||||
|
||||
if (aEvent.message == NS_TOUCH_START && localEvent.touches.Length() > 0) {
|
||||
mActiveElementManager->SetTargetElement(localEvent.touches[0]->Target());
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> outerWindow = do_GetInterface(WebNavigation());
|
||||
nsCOMPtr<nsPIDOMWindow> innerWindow = outerWindow->GetCurrentInnerWindow();
|
||||
|
||||
|
|
|
@ -42,6 +42,10 @@ namespace layout {
|
|||
class RenderFrameChild;
|
||||
}
|
||||
|
||||
namespace widget {
|
||||
class ActiveElementManager;
|
||||
}
|
||||
|
||||
namespace dom {
|
||||
|
||||
class TabChild;
|
||||
|
@ -228,6 +232,7 @@ class TabChild : public PBrowserChild,
|
|||
typedef mozilla::dom::ClonedMessageData ClonedMessageData;
|
||||
typedef mozilla::layout::RenderFrameChild RenderFrameChild;
|
||||
typedef mozilla::layout::ScrollingBehavior ScrollingBehavior;
|
||||
typedef mozilla::widget::ActiveElementManager ActiveElementManager;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@ -545,6 +550,7 @@ private:
|
|||
void FireSingleTapEvent(LayoutDevicePoint aPoint);
|
||||
|
||||
bool mIgnoreKeyPressEvent;
|
||||
nsRefPtr<ActiveElementManager> mActiveElementManager;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче