diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 4980b44e6d3d..d1cd7ae86d39 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -330,14 +330,6 @@ parent: sync IsParentWindowMainWidgetVisible() returns (bool visible); - /** - * Returns the offset of this tab from the top level window - * origin in device pixels. - * - * aPoint offset values in device pixels. - */ - prio(high) sync GetTabOffset() returns (LayoutDeviceIntPoint aPoint); - /** * Gets the DPI of the screen corresponding to this browser. */ diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 8f423c54b1de..d1132e9b1e17 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -2266,13 +2266,6 @@ TabParent::RecvEnableDisableCommands(const nsString& aAction, return true; } -bool -TabParent::RecvGetTabOffset(LayoutDeviceIntPoint* aPoint) -{ - *aPoint = GetChildProcessOffset(); - return true; -} - NS_IMETHODIMP TabParent::GetChildProcessOffset(int32_t* aOutCssX, int32_t* aOutCssY) { diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index 80d67b5269e1..6ef8ca79b481 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -219,7 +219,6 @@ public: virtual bool RecvIsParentWindowMainWidgetVisible(bool* aIsVisible) override; virtual bool RecvShowTooltip(const uint32_t& aX, const uint32_t& aY, const nsString& aTooltip) override; virtual bool RecvHideTooltip() override; - virtual bool RecvGetTabOffset(LayoutDeviceIntPoint* aPoint) override; virtual bool RecvGetDPI(float* aValue) override; virtual bool RecvGetDefaultScale(double* aValue) override; virtual bool RecvGetMaxTouchPoints(uint32_t* aTouchPoints) override; diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp index 97a713d9f2ae..81f248f893fb 100644 --- a/layout/generic/nsPluginFrame.cpp +++ b/layout/generic/nsPluginFrame.cpp @@ -776,9 +776,7 @@ nsPluginFrame::GetRemoteTabChromeOffset() if (topWindow) { dom::TabChild* tc = dom::TabChild::GetFrom(topWindow); if (tc) { - LayoutDeviceIntPoint chromeOffset; - tc->SendGetTabOffset(&chromeOffset); - offset -= chromeOffset; + offset += tc->GetChromeDisplacement(); } } }