зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1439016: Remove dead code from Shadow DOM v0. r=bholley
Could do that on a different bug but... MozReview-Commit-ID: L1ri2s8z75f --HG-- extra : rebase_source : cfdd998081cb8ef49cc5e66801fc706774f5497a
This commit is contained in:
Родитель
a5c61458d0
Коммит
6dd24e93ac
|
@ -57,7 +57,6 @@ ShadowRoot::ShadowRoot(Element* aElement, bool aClosed,
|
|||
: DocumentFragment(aNodeInfo)
|
||||
, DocumentOrShadowRoot(*this)
|
||||
, mProtoBinding(aProtoBinding)
|
||||
, mInsertionPointChanged(false)
|
||||
, mIsComposedDocParticipant(false)
|
||||
{
|
||||
SetHost(aElement);
|
||||
|
@ -433,32 +432,6 @@ ShadowRoot::MaybeReassignElement(Element* aElement,
|
|||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::DistributionChanged()
|
||||
{
|
||||
// FIXME(emilio): We could be more granular in a bunch of cases.
|
||||
auto* host = GetHost();
|
||||
if (!host || !host->IsInComposedDoc()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* shell = OwnerDoc()->GetShell();
|
||||
if (!shell) {
|
||||
return;
|
||||
}
|
||||
|
||||
shell->DestroyFramesForAndRestyle(host);
|
||||
}
|
||||
|
||||
void
|
||||
ShadowRoot::DistributeAllNodes()
|
||||
{
|
||||
|
||||
//XXX Handle <slot>.
|
||||
|
||||
DistributionChanged();
|
||||
}
|
||||
|
||||
Element*
|
||||
ShadowRoot::GetActiveElement()
|
||||
{
|
||||
|
@ -513,7 +486,7 @@ ShadowRoot::AttributeChanged(nsIDocument* aDocument,
|
|||
return;
|
||||
}
|
||||
|
||||
//XXX optimize this!
|
||||
// FIXME(emilio): We could be more granular in a bunch of cases.
|
||||
shell->DestroyFramesForAndRestyle(aElement);
|
||||
}
|
||||
|
||||
|
|
|
@ -83,12 +83,6 @@ public:
|
|||
return &DocumentOrShadowRoot::EnsureDOMStyleSheets();
|
||||
}
|
||||
|
||||
/**
|
||||
* Distributes all the explicit children of the pool host to the content
|
||||
* insertion points in this ShadowRoot.
|
||||
*/
|
||||
void DistributeAllNodes();
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
@ -113,19 +107,10 @@ private:
|
|||
const HTMLSlotElement* UnassignSlotFor(nsIContent* aContent,
|
||||
const nsAString& aSlotName);
|
||||
|
||||
/**
|
||||
* Called when we redistribute content after insertion points have changed.
|
||||
*/
|
||||
void DistributionChanged();
|
||||
|
||||
bool IsPooledNode(nsIContent* aChild) const;
|
||||
|
||||
public:
|
||||
void AddSlot(HTMLSlotElement* aSlot);
|
||||
void RemoveSlot(HTMLSlotElement* aSlot);
|
||||
|
||||
void SetInsertionPointChanged() { mInsertionPointChanged = true; }
|
||||
|
||||
void SetAssociatedBinding(nsXBLBinding* aBinding) { mAssociatedBinding = aBinding; }
|
||||
|
||||
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
@ -141,7 +126,11 @@ public:
|
|||
void SetInnerHTML(const nsAString& aInnerHTML, ErrorResult& aError);
|
||||
void StyleSheetChanged();
|
||||
|
||||
bool IsComposedDocParticipant() { return mIsComposedDocParticipant; }
|
||||
bool IsComposedDocParticipant() const
|
||||
{
|
||||
return mIsComposedDocParticipant;
|
||||
}
|
||||
|
||||
void SetIsComposedDocParticipant(bool aIsComposedDocParticipant)
|
||||
{
|
||||
mIsComposedDocParticipant = aIsComposedDocParticipant;
|
||||
|
@ -165,12 +154,6 @@ protected:
|
|||
// owns |mProtoBinding|.
|
||||
RefPtr<nsXBLBinding> mAssociatedBinding;
|
||||
|
||||
// A boolean that indicates that an insertion point was added or removed
|
||||
// from this ShadowRoot and that the nodes need to be redistributed into
|
||||
// the insertion points. After this flag is set, nodes will be distributed
|
||||
// on the next mutation event.
|
||||
bool mInsertionPointChanged;
|
||||
|
||||
// Flag to indicate whether the descendants of this shadow root are part of the
|
||||
// composed document. Ideally, we would use a node flag on nodes to
|
||||
// mark whether it is in the composed document, but we have run out of flags
|
||||
|
|
Загрузка…
Ссылка в новой задаче