mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 937688 - Add a helper to APZCCallbackHelper to obtain the presShellId and viewId. r=botond
This commit is contained in:
parent
8b6dd7fcb5
commit
bc389873b6
@ -133,5 +133,17 @@ APZCCallbackHelper::GetDOMWindowUtils(nsIContent* aContent)
|
||||
return utils.forget();
|
||||
}
|
||||
|
||||
bool
|
||||
APZCCallbackHelper::GetScrollIdentifiers(nsIContent* aContent,
|
||||
uint32_t* aPresShellIdOut,
|
||||
FrameMetrics::ViewID* aViewIdOut)
|
||||
{
|
||||
if (!nsLayoutUtils::FindIDFor(aContent, aViewIdOut)) {
|
||||
return false;
|
||||
}
|
||||
nsCOMPtr<nsIDOMWindowUtils> utils = GetDOMWindowUtils(aContent);
|
||||
return utils && (utils->GetPresShellId(aPresShellIdOut) == NS_OK);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -48,6 +48,12 @@ public:
|
||||
/* Get the DOMWindowUtils for the window corresponding to the givent content
|
||||
element. This might be an iframe inside the tab, for instance. */
|
||||
static already_AddRefed<nsIDOMWindowUtils> GetDOMWindowUtils(nsIContent* aContent);
|
||||
|
||||
/* Get the presShellId and view ID for the given content element, if they can be
|
||||
found. Returns false if the values could not be found, true if they could. */
|
||||
static bool GetScrollIdentifiers(nsIContent* aContent,
|
||||
uint32_t* aPresShellIdOut,
|
||||
FrameMetrics::ViewID* aViewIdOut);
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user