зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1439223: Stop ShadowRoot::Host from being a useless function call. r=smaug
Also, change DocumentFragment to use RefPtr, since that's the usual style. MozReview-Commit-ID: 4PQ19nbmhUh --HG-- extra : rebase_source : 2afb214b764ba48a4a8718190a6853ae6d6ea80b
This commit is contained in:
Родитель
feb9be572d
Коммит
30b133d3c7
|
@ -107,7 +107,7 @@ protected:
|
|||
|
||||
nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
|
||||
bool aPreallocateChildren) const override;
|
||||
nsCOMPtr<Element> mHost;
|
||||
RefPtr<Element> mHost;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -450,16 +450,6 @@ ShadowRoot::SetInnerHTML(const nsAString& aInnerHTML, ErrorResult& aError)
|
|||
SetInnerHTMLInternal(aInnerHTML, aError);
|
||||
}
|
||||
|
||||
Element*
|
||||
ShadowRoot::Host()
|
||||
{
|
||||
nsIContent* host = GetHost();
|
||||
MOZ_ASSERT(host && host->IsElement(),
|
||||
"ShadowRoot host should always be an element, "
|
||||
"how else did we create this ShadowRoot?");
|
||||
return host->AsElement();
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::AttributeChanged(nsIDocument* aDocument,
|
||||
Element* aElement,
|
||||
|
|
|
@ -65,7 +65,13 @@ public:
|
|||
nsXBLPrototypeBinding* aProtoBinding);
|
||||
|
||||
// Shadow DOM v1
|
||||
Element* Host();
|
||||
Element* Host() const
|
||||
{
|
||||
MOZ_ASSERT(GetHost(), "ShadowRoot always has a host, how did we create "
|
||||
"this ShadowRoot?");
|
||||
return GetHost();
|
||||
}
|
||||
|
||||
ShadowRootMode Mode() const
|
||||
{
|
||||
return mMode;
|
||||
|
|
Загрузка…
Ссылка в новой задаче