зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1646510: Remove deprecated nsContentUtils::GetCrossDocParentNode. r=nika
Moves its last remaining (parent-process-only) caller to use a local static copy instead. Differential Revision: https://phabricator.services.mozilla.com/D109420
This commit is contained in:
Родитель
2e4b430900
Коммит
ed88fc8bd1
|
@ -2294,22 +2294,6 @@ bool nsContentUtils::LookupBindingMember(
|
|||
return true;
|
||||
}
|
||||
|
||||
// static
|
||||
nsINode* nsContentUtils::GetCrossDocParentNode(nsINode* aChild) {
|
||||
MOZ_ASSERT(aChild, "The child is null!");
|
||||
|
||||
nsINode* parent = aChild->GetParentNode();
|
||||
if (parent && parent->IsContent() && aChild->IsContent()) {
|
||||
parent = aChild->AsContent()->GetFlattenedTreeParent();
|
||||
}
|
||||
|
||||
if (parent || !aChild->IsDocument()) {
|
||||
return parent;
|
||||
}
|
||||
|
||||
return aChild->AsDocument()->GetEmbedderElement();
|
||||
}
|
||||
|
||||
nsINode* nsContentUtils::GetNearestInProcessCrossDocParentNode(
|
||||
nsINode* aChild) {
|
||||
if (aChild->IsDocument()) {
|
||||
|
|
|
@ -369,15 +369,12 @@ class nsContentUtils {
|
|||
int32_t* aOutputHeight);
|
||||
|
||||
/**
|
||||
* Returns the parent node of aChild crossing document boundaries.
|
||||
* Returns the parent node of aChild crossing document boundaries, but skips
|
||||
* any cross-process parent frames and continues with the nearest in-process
|
||||
* frame in the hierarchy.
|
||||
*
|
||||
* Uses the parent node in the composed document.
|
||||
*/
|
||||
static nsINode* GetCrossDocParentNode(nsINode* aChild);
|
||||
|
||||
/**
|
||||
* Like GetCrossDocParentNode, but skips any cross-process parent frames and
|
||||
* continues with the nearest in-process frame in the hierarchy.
|
||||
*/
|
||||
static nsINode* GetNearestInProcessCrossDocParentNode(nsINode* aChild);
|
||||
|
||||
/**
|
||||
|
|
|
@ -3078,6 +3078,22 @@ void EventStateManager::DecideGestureEvent(WidgetGestureNotifyEvent* aEvent,
|
|||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
static nsINode* GetCrossDocParentNode(nsINode* aChild) {
|
||||
MOZ_ASSERT(aChild, "The child is null!");
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
|
||||
nsINode* parent = aChild->GetParentNode();
|
||||
if (parent && parent->IsContent() && aChild->IsContent()) {
|
||||
parent = aChild->AsContent()->GetFlattenedTreeParent();
|
||||
}
|
||||
|
||||
if (parent || !aChild->IsDocument()) {
|
||||
return parent;
|
||||
}
|
||||
|
||||
return aChild->AsDocument()->GetEmbedderElement();
|
||||
}
|
||||
|
||||
static bool NodeAllowsClickThrough(nsINode* aNode) {
|
||||
while (aNode) {
|
||||
if (aNode->IsXULElement(nsGkAtoms::browser)) {
|
||||
|
@ -3095,7 +3111,7 @@ static bool NodeAllowsClickThrough(nsINode* aNode) {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
aNode = nsContentUtils::GetCrossDocParentNode(aNode);
|
||||
aNode = GetCrossDocParentNode(aNode);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче