Backed out changeset 36d662fbab77 (bug 1350633) for failures in test_group_mouseevents.html a=backout
MozReview-Commit-ID: Gh9eflBppgq
This commit is contained in:
@@ -149,6 +149,11 @@ parent:
|
||||
|
||||
async PPaymentRequest();
|
||||
|
||||
/**
|
||||
* Return native data of root widget
|
||||
*/
|
||||
nested(inside_cpow) sync GetWidgetNativeData() returns (WindowsHandle value);
|
||||
|
||||
/**
|
||||
* Sends an NS_NATIVE_CHILD_OF_SHAREABLE_WINDOW to be adopted by the
|
||||
* widget's shareable window on the chrome side. Only used on Windows.
|
||||
@@ -889,12 +894,6 @@ child:
|
||||
*/
|
||||
async SetOriginAttributes(OriginAttributes aOriginAttributes);
|
||||
|
||||
/**
|
||||
* Pass the current handle for the current native widget to the content
|
||||
* process, so it can be used by PuppetWidget.
|
||||
*/
|
||||
async SetWidgetNativeData(WindowsHandle aHandle);
|
||||
|
||||
/*
|
||||
* FIXME: write protocol!
|
||||
|
||||
|
||||
@@ -411,7 +411,6 @@ TabChild::TabChild(nsIContentChild* aManager,
|
||||
, mPendingDocShellPreserveLayers(false)
|
||||
, mPendingDocShellReceivedMessage(false)
|
||||
, mPendingDocShellBlockers(0)
|
||||
, mWidgetNativeData(0)
|
||||
{
|
||||
nsWeakPtr weakPtrThis(do_GetWeakReference(static_cast<nsITabChild*>(this))); // for capture by the lambda
|
||||
mSetAllowedTouchBehaviorCallback = [weakPtrThis](uint64_t aInputBlockId,
|
||||
@@ -3213,13 +3212,6 @@ TabChild::RecvSetOriginAttributes(const OriginAttributes& aOriginAttributes)
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
TabChild::RecvSetWidgetNativeData(const WindowsHandle& aWidgetNativeData)
|
||||
{
|
||||
mWidgetNativeData = aWidgetNativeData;
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::plugins::PPluginWidgetChild*
|
||||
TabChild::AllocPPluginWidgetChild()
|
||||
{
|
||||
|
||||
@@ -697,12 +697,6 @@ public:
|
||||
void AddPendingDocShellBlocker();
|
||||
void RemovePendingDocShellBlocker();
|
||||
|
||||
// The HANDLE object for the widget this TabChild in.
|
||||
WindowsHandle WidgetNativeData()
|
||||
{
|
||||
return mWidgetNativeData;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~TabChild();
|
||||
|
||||
@@ -744,8 +738,6 @@ protected:
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvSetOriginAttributes(const OriginAttributes& aOriginAttributes) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvSetWidgetNativeData(const WindowsHandle& aWidgetNativeData) override;
|
||||
|
||||
private:
|
||||
void HandleDoubleTap(const CSSPoint& aPoint, const Modifiers& aModifiers,
|
||||
const ScrollableLayerGuid& aGuid);
|
||||
@@ -889,8 +881,6 @@ private:
|
||||
bool mPendingDocShellReceivedMessage;
|
||||
uint32_t mPendingDocShellBlockers;
|
||||
|
||||
WindowsHandle mWidgetNativeData;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
|
||||
};
|
||||
|
||||
|
||||
@@ -292,17 +292,6 @@ TabParent::SetOwnerElement(Element* aElement)
|
||||
|
||||
AddWindowListeners();
|
||||
TryCacheDPIAndScale();
|
||||
|
||||
// Try to send down WidgetNativeData, now that this TabParent is associated
|
||||
// with a widget.
|
||||
nsCOMPtr<nsIWidget> widget = GetTopLevelWidget();
|
||||
if (widget) {
|
||||
WindowsHandle widgetNativeData = reinterpret_cast<WindowsHandle>(
|
||||
widget->GetNativeData(NS_NATIVE_SHAREABLE_WINDOW));
|
||||
if (widgetNativeData) {
|
||||
Unused << SendSetWidgetNativeData(widgetNativeData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2329,6 +2318,18 @@ TabParent::GetTopLevelWidget()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
TabParent::RecvGetWidgetNativeData(WindowsHandle* aValue)
|
||||
{
|
||||
*aValue = 0;
|
||||
nsCOMPtr<nsIWidget> widget = GetTopLevelWidget();
|
||||
if (widget) {
|
||||
*aValue = reinterpret_cast<WindowsHandle>(
|
||||
widget->GetNativeData(NS_NATIVE_SHAREABLE_WINDOW));
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
TabParent::RecvSetNativeChildOfShareableWindow(const uintptr_t& aChildWindow)
|
||||
{
|
||||
|
||||
@@ -305,6 +305,8 @@ public:
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvGetWidgetRounding(int32_t* aValue) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvGetWidgetNativeData(WindowsHandle* aValue) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvSetNativeChildOfShareableWindow(const uintptr_t& childWindow) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvDispatchFocusToTopLevelWindow() override;
|
||||
|
||||
@@ -821,6 +821,8 @@ description =
|
||||
description =
|
||||
[PBrowser::PPluginWidget]
|
||||
description =
|
||||
[PBrowser::GetWidgetNativeData]
|
||||
description =
|
||||
[PBrowser::DispatchFocusToTopLevelWindow]
|
||||
description =
|
||||
[PBrowser::NotifyIMEFocus]
|
||||
|
||||
@@ -1189,14 +1189,10 @@ PuppetWidget::GetNativeData(uint32_t aDataType)
|
||||
{
|
||||
switch (aDataType) {
|
||||
case NS_NATIVE_SHAREABLE_WINDOW: {
|
||||
// NOTE: We can not have a tab child in some situations, such as when we're
|
||||
// rendering to a fake widget for thumbnails.
|
||||
if (!mTabChild) {
|
||||
NS_WARNING("Need TabChild to get the nativeWindow from!");
|
||||
}
|
||||
MOZ_ASSERT(mTabChild, "Need TabChild to get the nativeWindow from!");
|
||||
mozilla::WindowsHandle nativeData = 0;
|
||||
if (mTabChild) {
|
||||
nativeData = mTabChild->WidgetNativeData();
|
||||
mTabChild->SendGetWidgetNativeData(&nativeData);
|
||||
}
|
||||
return (void*)nativeData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user