mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out 2 changesets (bug 1131695) for mochitest-1 failures on a CLOSED TREE
Backed out changeset 13af514d6aea (bug 1131695) Backed out changeset 6823625f2042 (bug 1131695)
This commit is contained in:
parent
7e0c081e5f
commit
b2382a0c97
@ -538,24 +538,7 @@ BrowserElementParent.prototype = {
|
||||
return this._frameLoader.visible;
|
||||
},
|
||||
|
||||
getChildProcessOffset: function() {
|
||||
let offset = { x: 0, y: 0 };
|
||||
let tabParent = this._frameLoader.tabParent;
|
||||
if (tabParent) {
|
||||
let offsetX = {};
|
||||
let offsetY = {};
|
||||
tabParent.getChildProcessOffset(offsetX, offsetY);
|
||||
offset.x = offsetX.value;
|
||||
offset.y = offsetY.value;
|
||||
}
|
||||
return offset;
|
||||
},
|
||||
|
||||
sendMouseEvent: defineNoReturnMethod(function(type, x, y, button, clickCount, modifiers) {
|
||||
let offset = this.getChildProcessOffset();
|
||||
x += offset.x;
|
||||
y += offset.y;
|
||||
|
||||
this._sendAsyncMsg("send-mouse-event", {
|
||||
"type": type,
|
||||
"x": x,
|
||||
@ -583,13 +566,6 @@ BrowserElementParent.prototype = {
|
||||
count,
|
||||
modifiers);
|
||||
} else {
|
||||
let offset = this.getChildProcessOffset();
|
||||
for (var i = 0; i < touchesX.length; i++) {
|
||||
touchesX[i] += offset.x;
|
||||
}
|
||||
for (var i = 0; i < touchesY.length; i++) {
|
||||
touchesY[i] += offset.y;
|
||||
}
|
||||
this._sendAsyncMsg("send-touch-event", {
|
||||
"type": type,
|
||||
"identifiers": identifiers,
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "domstubs.idl"
|
||||
|
||||
[scriptable, uuid(b19038ba-0d75-40d2-be35-742e26d33bf9)]
|
||||
[scriptable, uuid(30361a5b-a3b8-4dbc-b464-e08761abb123)]
|
||||
interface nsITabParent : nsISupports
|
||||
{
|
||||
void injectTouchEvent(in AString aType,
|
||||
@ -19,8 +19,6 @@ interface nsITabParent : nsISupports
|
||||
in uint32_t count,
|
||||
in long aModifiers);
|
||||
|
||||
void getChildProcessOffset(out int32_t aCssX, out int32_t aCssY);
|
||||
|
||||
readonly attribute boolean useAsyncPanZoom;
|
||||
|
||||
void setIsDocShellActive(in bool aIsActive);
|
||||
|
@ -1222,21 +1222,23 @@ bool TabParent::SendRealMouseEvent(WidgetMouseEvent& event)
|
||||
return PBrowserParent::SendRealMouseEvent(event);
|
||||
}
|
||||
|
||||
LayoutDeviceToCSSScale
|
||||
TabParent::GetLayoutDeviceToCSSScale()
|
||||
{
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(mFrameElement);
|
||||
nsIDocument* doc = (content ? content->OwnerDoc() : nullptr);
|
||||
nsIPresShell* shell = (doc ? doc->GetShell() : nullptr);
|
||||
nsPresContext* ctx = (shell ? shell->GetPresContext() : nullptr);
|
||||
return LayoutDeviceToCSSScale(ctx
|
||||
? (float)ctx->AppUnitsPerDevPixel() / nsPresContext::AppUnitsPerCSSPixel()
|
||||
: 0.0f);
|
||||
}
|
||||
|
||||
CSSPoint TabParent::AdjustTapToChildWidget(const CSSPoint& aPoint)
|
||||
{
|
||||
return aPoint + (LayoutDevicePoint(mChildProcessOffsetAtTouchStart) * GetLayoutDeviceToCSSScale());
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(mFrameElement);
|
||||
|
||||
if (!content || !content->OwnerDoc()) {
|
||||
return aPoint;
|
||||
}
|
||||
|
||||
nsIDocument* doc = content->OwnerDoc();
|
||||
if (!doc || !doc->GetShell()) {
|
||||
return aPoint;
|
||||
}
|
||||
nsPresContext* presContext = doc->GetShell()->GetPresContext();
|
||||
|
||||
return aPoint + CSSPoint(
|
||||
presContext->DevPixelsToFloatCSSPixels(mChildProcessOffsetAtTouchStart.x),
|
||||
presContext->DevPixelsToFloatCSSPixels(mChildProcessOffsetAtTouchStart.y));
|
||||
}
|
||||
|
||||
bool TabParent::SendHandleSingleTap(const CSSPoint& aPoint, const ScrollableLayerGuid& aGuid)
|
||||
@ -1822,18 +1824,6 @@ TabParent::RecvEnableDisableCommands(const nsString& aAction,
|
||||
return true;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TabParent::GetChildProcessOffset(int32_t* aOutCssX, int32_t* aOutCssY)
|
||||
{
|
||||
NS_ENSURE_ARG(aOutCssX);
|
||||
NS_ENSURE_ARG(aOutCssY);
|
||||
CSSPoint offset = LayoutDevicePoint(LayoutDeviceIntPoint::FromUntyped(GetChildProcessOffset()))
|
||||
* GetLayoutDeviceToCSSScale();
|
||||
*aOutCssX = offset.x;
|
||||
*aOutCssY = offset.y;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIntPoint
|
||||
TabParent::GetChildProcessOffset()
|
||||
{
|
||||
|
@ -267,7 +267,6 @@ public:
|
||||
bool MapEventCoordinatesForChildProcess(mozilla::WidgetEvent* aEvent);
|
||||
void MapEventCoordinatesForChildProcess(const LayoutDeviceIntPoint& aOffset,
|
||||
mozilla::WidgetEvent* aEvent);
|
||||
LayoutDeviceToCSSScale GetLayoutDeviceToCSSScale();
|
||||
|
||||
virtual bool RecvRequestNativeKeyBindings(const mozilla::WidgetKeyboardEvent& aEvent,
|
||||
MaybeNativeKeyBinding* aBindings) MOZ_OVERRIDE;
|
||||
|
Loading…
Reference in New Issue
Block a user