mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1480147 - Add [ChromeOnly] Node.flattenedTreeParentNode, r=mrbkap
This commit is contained in:
parent
58e27f3dd9
commit
b9479cb08b
@ -59,6 +59,7 @@
|
||||
#include "nsAtom.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIContentInlines.h"
|
||||
#include "nsIContentIterator.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsIDocument.h"
|
||||
@ -2976,6 +2977,12 @@ nsINode::Localize(JSContext* aCx,
|
||||
return promise.forget();
|
||||
}
|
||||
|
||||
nsINode*
|
||||
nsINode::GetFlattenedTreeParentNodeNonInline() const
|
||||
{
|
||||
return GetFlattenedTreeParentNode();
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsNodeWeakReference,
|
||||
nsIWeakReference)
|
||||
|
||||
|
@ -980,6 +980,8 @@ public:
|
||||
*/
|
||||
inline nsINode* GetFlattenedTreeParentNode() const;
|
||||
|
||||
nsINode* GetFlattenedTreeParentNodeNonInline() const;
|
||||
|
||||
/**
|
||||
* Like GetFlattenedTreeParentNode, but returns the document for any native
|
||||
* anonymous content that was generated for ancestor frames of the document
|
||||
|
@ -105,6 +105,8 @@ interface Node : EventTarget {
|
||||
readonly attribute URI? baseURIObject;
|
||||
[ChromeOnly]
|
||||
DOMString generateXPath();
|
||||
[ChromeOnly, Pure, BinaryName="flattenedTreeParentNodeNonInline"]
|
||||
readonly attribute Node? flattenedTreeParentNode;
|
||||
|
||||
/**
|
||||
* This method provides a fast-path for the Fluent localization system to
|
||||
|
@ -122,18 +122,7 @@ TooltipTextProvider.prototype = {
|
||||
usedTipElement = tipElement;
|
||||
}
|
||||
|
||||
let parent = tipElement.parentNode;
|
||||
if (defView.ShadowRoot &&
|
||||
parent instanceof defView.ShadowRoot) {
|
||||
tipElement = parent.host;
|
||||
} else {
|
||||
let slot = tipElement.openOrClosedAssignedSlot;
|
||||
if (slot) {
|
||||
tipElement = slot;
|
||||
} else {
|
||||
tipElement = parent;
|
||||
}
|
||||
}
|
||||
tipElement = tipElement.flattenedTreeParentNode;
|
||||
}
|
||||
|
||||
return [titleText, XLinkTitleText, SVGTitleText, XULtooltiptextText].some(function(t) {
|
||||
|
Loading…
Reference in New Issue
Block a user