forked from mirrors/gecko-dev
Backed out 6 changesets (bug 1712140) for causing wpt failures in declarative-shadow-dom-opt-in.html.
Backed out changeset 554a46ed8046 (bug 1712140) Backed out changeset 14ebbfca2e84 (bug 1712140) Backed out changeset 98dd5766dd46 (bug 1712140) Backed out changeset 4241a7241a9b (bug 1712140) Backed out changeset 59ee434d503e (bug 1712140) Backed out changeset ff3bb42f91d1 (bug 1712140)
This commit is contained in:
parent
0db2b895fb
commit
c69cbb70a3
43 changed files with 2947 additions and 1444 deletions
|
|
@ -1392,7 +1392,6 @@ Document::Document(const char* aContentType)
|
||||||
mHasUserInteractionTimerScheduled(false),
|
mHasUserInteractionTimerScheduled(false),
|
||||||
mShouldResistFingerprinting(false),
|
mShouldResistFingerprinting(false),
|
||||||
mCloningForSVGUse(false),
|
mCloningForSVGUse(false),
|
||||||
mAllowDeclarativeShadowRoots(false),
|
|
||||||
mXMLDeclarationBits(0),
|
mXMLDeclarationBits(0),
|
||||||
mOnloadBlockCount(0),
|
mOnloadBlockCount(0),
|
||||||
mWriteLevel(0),
|
mWriteLevel(0),
|
||||||
|
|
@ -18932,40 +18931,4 @@ RadioGroupContainer& Document::OwnedRadioGroupContainer() {
|
||||||
return *mRadioGroupContainer;
|
return *mRadioGroupContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::SetAllowDeclarativeShadowRoots(
|
|
||||||
bool aAllowDeclarativeShadowRoots) {
|
|
||||||
mAllowDeclarativeShadowRoots = aAllowDeclarativeShadowRoots;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Document::AllowsDeclarativeShadowRoots() const {
|
|
||||||
return mAllowDeclarativeShadowRoots;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* static */
|
|
||||||
already_AddRefed<Document> Document::ParseHTMLUnsafe(GlobalObject& aGlobal,
|
|
||||||
const nsAString& aHTML) {
|
|
||||||
nsCOMPtr<nsIURI> uri;
|
|
||||||
NS_NewURI(getter_AddRefs(uri), "about:blank");
|
|
||||||
if (!uri) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<Document> doc;
|
|
||||||
nsresult rv =
|
|
||||||
NS_NewHTMLDocument(getter_AddRefs(doc), aGlobal.GetSubjectPrincipal(),
|
|
||||||
aGlobal.GetSubjectPrincipal());
|
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
doc->SetAllowDeclarativeShadowRoots(true);
|
|
||||||
doc->SetDocumentURI(uri);
|
|
||||||
rv = nsContentUtils::ParseDocumentHTML(aHTML, doc, false);
|
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return doc.forget();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace mozilla::dom
|
} // namespace mozilla::dom
|
||||||
|
|
|
||||||
|
|
@ -3858,9 +3858,6 @@ class Document : public nsINode,
|
||||||
*/
|
*/
|
||||||
bool AllowsL10n() const;
|
bool AllowsL10n() const;
|
||||||
|
|
||||||
void SetAllowDeclarativeShadowRoots(bool aAllowDeclarativeShadowRoots);
|
|
||||||
bool AllowsDeclarativeShadowRoots() const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RefPtr<DocumentL10n> mDocumentL10n;
|
RefPtr<DocumentL10n> mDocumentL10n;
|
||||||
|
|
||||||
|
|
@ -4823,8 +4820,6 @@ class Document : public nsINode,
|
||||||
// Whether we're cloning the contents of an SVG use element.
|
// Whether we're cloning the contents of an SVG use element.
|
||||||
bool mCloningForSVGUse : 1;
|
bool mCloningForSVGUse : 1;
|
||||||
|
|
||||||
bool mAllowDeclarativeShadowRoots : 1;
|
|
||||||
|
|
||||||
// The fingerprinting protections overrides for this document. The value will
|
// The fingerprinting protections overrides for this document. The value will
|
||||||
// override the default enabled fingerprinting protections for this document.
|
// override the default enabled fingerprinting protections for this document.
|
||||||
// This will only get populated if these is one that comes from the local
|
// This will only get populated if these is one that comes from the local
|
||||||
|
|
@ -5335,9 +5330,6 @@ class Document : public nsINode,
|
||||||
void LoadEventFired();
|
void LoadEventFired();
|
||||||
|
|
||||||
RadioGroupContainer& OwnedRadioGroupContainer();
|
RadioGroupContainer& OwnedRadioGroupContainer();
|
||||||
|
|
||||||
static already_AddRefed<Document> ParseHTMLUnsafe(GlobalObject& aGlobal,
|
|
||||||
const nsAString& aHTML);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_DEFINE_STATIC_IID_ACCESSOR(Document, NS_IDOCUMENT_IID)
|
NS_DEFINE_STATIC_IID_ACCESSOR(Document, NS_IDOCUMENT_IID)
|
||||||
|
|
|
||||||
|
|
@ -1249,9 +1249,8 @@ bool Element::CanAttachShadowDOM() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/commit-snapshots/1eadf0a4a271acc92013d1c0de8c730ac96204f9/#dom-element-attachshadow
|
// https://dom.spec.whatwg.org/commit-snapshots/1eadf0a4a271acc92013d1c0de8c730ac96204f9/#dom-element-attachshadow
|
||||||
already_AddRefed<ShadowRoot> Element::AttachShadow(
|
already_AddRefed<ShadowRoot> Element::AttachShadow(const ShadowRootInit& aInit,
|
||||||
const ShadowRootInit& aInit, ErrorResult& aError,
|
ErrorResult& aError) {
|
||||||
ShadowRootDeclarative aNewShadowIsDeclarative) {
|
|
||||||
/**
|
/**
|
||||||
* Step 1, 2, and 3.
|
* Step 1, 2, and 3.
|
||||||
*/
|
*/
|
||||||
|
|
@ -1261,41 +1260,25 @@ already_AddRefed<ShadowRoot> Element::AttachShadow(
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4. If element is a shadow host, then:
|
* 4. If this is a shadow host, then throw a "NotSupportedError" DOMException.
|
||||||
*/
|
*/
|
||||||
if (RefPtr<ShadowRoot> root = GetShadowRoot()) {
|
if (GetShadowRoot()) {
|
||||||
/*
|
|
||||||
* 1. If element’s shadow root’s declarative is false, then throw an
|
|
||||||
* "NotSupportedError" DOMException.
|
|
||||||
*/
|
|
||||||
if (!root->IsDeclarative()) {
|
|
||||||
aError.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
aError.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
// https://github.com/whatwg/dom/issues/1235
|
|
||||||
root->SetIsDeclarative(aNewShadowIsDeclarative);
|
|
||||||
/*
|
|
||||||
* 2. Otherwise, remove all of element’s shadow root’s children, in tree
|
|
||||||
* order, and return.
|
|
||||||
*/
|
|
||||||
root->ReplaceChildren(nullptr, aError);
|
|
||||||
return root.forget();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StaticPrefs::dom_webcomponents_shadowdom_report_usage()) {
|
if (StaticPrefs::dom_webcomponents_shadowdom_report_usage()) {
|
||||||
OwnerDoc()->ReportShadowDOMUsage();
|
OwnerDoc()->ReportShadowDOMUsage();
|
||||||
}
|
}
|
||||||
|
|
||||||
return AttachShadowWithoutNameChecks(
|
return AttachShadowWithoutNameChecks(aInit.mMode,
|
||||||
aInit.mMode, DelegatesFocus(aInit.mDelegatesFocus), aInit.mSlotAssignment,
|
DelegatesFocus(aInit.mDelegatesFocus),
|
||||||
ShadowRootClonable(aInit.mClonable),
|
aInit.mSlotAssignment);
|
||||||
ShadowRootDeclarative(aNewShadowIsDeclarative));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<ShadowRoot> Element::AttachShadowWithoutNameChecks(
|
already_AddRefed<ShadowRoot> Element::AttachShadowWithoutNameChecks(
|
||||||
ShadowRootMode aMode, DelegatesFocus aDelegatesFocus,
|
ShadowRootMode aMode, DelegatesFocus aDelegatesFocus,
|
||||||
SlotAssignmentMode aSlotAssignment, ShadowRootClonable aClonable,
|
SlotAssignmentMode aSlotAssignment) {
|
||||||
ShadowRootDeclarative aDeclarative) {
|
|
||||||
nsAutoScriptBlocker scriptBlocker;
|
nsAutoScriptBlocker scriptBlocker;
|
||||||
|
|
||||||
auto* nim = mNodeInfo->NodeInfoManager();
|
auto* nim = mNodeInfo->NodeInfoManager();
|
||||||
|
|
@ -1319,9 +1302,8 @@ already_AddRefed<ShadowRoot> Element::AttachShadowWithoutNameChecks(
|
||||||
* context object's node document, host is context object,
|
* context object's node document, host is context object,
|
||||||
* and mode is init's mode.
|
* and mode is init's mode.
|
||||||
*/
|
*/
|
||||||
RefPtr<ShadowRoot> shadowRoot =
|
RefPtr<ShadowRoot> shadowRoot = new (nim) ShadowRoot(
|
||||||
new (nim) ShadowRoot(this, aMode, aDelegatesFocus, aSlotAssignment,
|
this, aMode, aDelegatesFocus, aSlotAssignment, nodeInfo.forget());
|
||||||
aClonable, aDeclarative, nodeInfo.forget());
|
|
||||||
|
|
||||||
if (NodeOrAncestorHasDirAuto()) {
|
if (NodeOrAncestorHasDirAuto()) {
|
||||||
shadowRoot->SetAncestorHasDirAuto();
|
shadowRoot->SetAncestorHasDirAuto();
|
||||||
|
|
@ -5016,8 +4998,4 @@ bool Element::Translate() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Element::SetHTMLUnsafe(const nsAString& aHTML) {
|
|
||||||
nsContentUtils::SetHTMLUnsafe(this, this, aHTML);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace mozilla::dom
|
} // namespace mozilla::dom
|
||||||
|
|
|
||||||
|
|
@ -1309,23 +1309,15 @@ class Element : public FragmentOrElement {
|
||||||
bool ParseLoadingAttribute(const nsAString& aValue, nsAttrValue& aResult);
|
bool ParseLoadingAttribute(const nsAString& aValue, nsAttrValue& aResult);
|
||||||
|
|
||||||
// Shadow DOM v1
|
// Shadow DOM v1
|
||||||
enum class ShadowRootDeclarative : bool { No, Yes };
|
already_AddRefed<ShadowRoot> AttachShadow(const ShadowRootInit& aInit,
|
||||||
|
ErrorResult& aError);
|
||||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY
|
|
||||||
already_AddRefed<ShadowRoot> AttachShadow(
|
|
||||||
const ShadowRootInit& aInit, ErrorResult& aError,
|
|
||||||
ShadowRootDeclarative aNewShadowIsDeclarative =
|
|
||||||
ShadowRootDeclarative::No);
|
|
||||||
bool CanAttachShadowDOM() const;
|
bool CanAttachShadowDOM() const;
|
||||||
|
|
||||||
enum class DelegatesFocus : bool { No, Yes };
|
enum class DelegatesFocus : bool { No, Yes };
|
||||||
enum class ShadowRootClonable : bool { No, Yes };
|
|
||||||
|
|
||||||
already_AddRefed<ShadowRoot> AttachShadowWithoutNameChecks(
|
already_AddRefed<ShadowRoot> AttachShadowWithoutNameChecks(
|
||||||
ShadowRootMode aMode, DelegatesFocus = DelegatesFocus::No,
|
ShadowRootMode aMode, DelegatesFocus = DelegatesFocus::No,
|
||||||
SlotAssignmentMode aSlotAssignmentMode = SlotAssignmentMode::Named,
|
SlotAssignmentMode aSlotAssignmentMode = SlotAssignmentMode::Named);
|
||||||
ShadowRootClonable aClonable = ShadowRootClonable::No,
|
|
||||||
ShadowRootDeclarative aDeclarative = ShadowRootDeclarative::No);
|
|
||||||
|
|
||||||
// Attach UA Shadow Root if it is not attached.
|
// Attach UA Shadow Root if it is not attached.
|
||||||
enum class NotifyUAWidgetSetup : bool { No, Yes };
|
enum class NotifyUAWidgetSetup : bool { No, Yes };
|
||||||
|
|
@ -2076,9 +2068,6 @@ class Element : public FragmentOrElement {
|
||||||
|
|
||||||
virtual bool Translate() const;
|
virtual bool Translate() const;
|
||||||
|
|
||||||
MOZ_CAN_RUN_SCRIPT
|
|
||||||
virtual void SetHTMLUnsafe(const nsAString& aHTML);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum class ReparseAttributes { No, Yes };
|
enum class ReparseAttributes { No, Yes };
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,7 @@ NS_IMPL_RELEASE_INHERITED(ShadowRoot, DocumentFragment)
|
||||||
|
|
||||||
ShadowRoot::ShadowRoot(Element* aElement, ShadowRootMode aMode,
|
ShadowRoot::ShadowRoot(Element* aElement, ShadowRootMode aMode,
|
||||||
Element::DelegatesFocus aDelegatesFocus,
|
Element::DelegatesFocus aDelegatesFocus,
|
||||||
SlotAssignmentMode aSlotAssignment, Clonable aIsClonable,
|
SlotAssignmentMode aSlotAssignment,
|
||||||
Declarative aDeclarative,
|
|
||||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||||
: DocumentFragment(std::move(aNodeInfo)),
|
: DocumentFragment(std::move(aNodeInfo)),
|
||||||
DocumentOrShadowRoot(this),
|
DocumentOrShadowRoot(this),
|
||||||
|
|
@ -60,9 +59,7 @@ ShadowRoot::ShadowRoot(Element* aElement, ShadowRootMode aMode,
|
||||||
mDelegatesFocus(aDelegatesFocus),
|
mDelegatesFocus(aDelegatesFocus),
|
||||||
mSlotAssignment(aSlotAssignment),
|
mSlotAssignment(aSlotAssignment),
|
||||||
mIsDetailsShadowTree(aElement->IsHTMLElement(nsGkAtoms::details)),
|
mIsDetailsShadowTree(aElement->IsHTMLElement(nsGkAtoms::details)),
|
||||||
mIsAvailableToElementInternals(false),
|
mIsAvailableToElementInternals(false) {
|
||||||
mIsDeclarative(aDeclarative),
|
|
||||||
mIsClonable(aIsClonable) {
|
|
||||||
// nsINode.h relies on this.
|
// nsINode.h relies on this.
|
||||||
MOZ_ASSERT(static_cast<nsINode*>(this) == reinterpret_cast<nsINode*>(this));
|
MOZ_ASSERT(static_cast<nsINode*>(this) == reinterpret_cast<nsINode*>(this));
|
||||||
MOZ_ASSERT(static_cast<nsIContent*>(this) ==
|
MOZ_ASSERT(static_cast<nsIContent*>(this) ==
|
||||||
|
|
@ -877,8 +874,3 @@ nsresult ShadowRoot::Clone(dom::NodeInfo* aNodeInfo, nsINode** aResult) const {
|
||||||
*aResult = nullptr;
|
*aResult = nullptr;
|
||||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShadowRoot::SetHTMLUnsafe(const nsAString& aHTML) {
|
|
||||||
RefPtr<Element> host = GetHost();
|
|
||||||
nsContentUtils::SetHTMLUnsafe(this, host, aHTML);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,6 @@ class HTMLInputElement;
|
||||||
class ShadowRoot final : public DocumentFragment, public DocumentOrShadowRoot {
|
class ShadowRoot final : public DocumentFragment, public DocumentOrShadowRoot {
|
||||||
friend class DocumentOrShadowRoot;
|
friend class DocumentOrShadowRoot;
|
||||||
|
|
||||||
using Declarative = Element::ShadowRootDeclarative;
|
|
||||||
using Clonable = Element::ShadowRootClonable;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NS_IMPL_FROMNODE_HELPER(ShadowRoot, IsShadowRoot());
|
NS_IMPL_FROMNODE_HELPER(ShadowRoot, IsShadowRoot());
|
||||||
|
|
||||||
|
|
@ -53,8 +50,7 @@ class ShadowRoot final : public DocumentFragment, public DocumentOrShadowRoot {
|
||||||
|
|
||||||
ShadowRoot(Element* aElement, ShadowRootMode aMode,
|
ShadowRoot(Element* aElement, ShadowRootMode aMode,
|
||||||
Element::DelegatesFocus aDelegatesFocus,
|
Element::DelegatesFocus aDelegatesFocus,
|
||||||
SlotAssignmentMode aSlotAssignment, Clonable aClonable,
|
SlotAssignmentMode aSlotAssignment,
|
||||||
Declarative aDeclarative,
|
|
||||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||||
|
|
||||||
void AddSizeOfExcludingThis(nsWindowSizes&, size_t* aNodeSize) const final;
|
void AddSizeOfExcludingThis(nsWindowSizes&, size_t* aNodeSize) const final;
|
||||||
|
|
@ -235,19 +231,6 @@ class ShadowRoot final : public DocumentFragment, public DocumentOrShadowRoot {
|
||||||
|
|
||||||
void GetEventTargetParent(EventChainPreVisitor& aVisitor) override;
|
void GetEventTargetParent(EventChainPreVisitor& aVisitor) override;
|
||||||
|
|
||||||
bool IsDeclarative() const { return mIsDeclarative == Declarative::Yes; }
|
|
||||||
void SetIsDeclarative(Declarative aIsDeclarative) {
|
|
||||||
mIsDeclarative = aIsDeclarative;
|
|
||||||
}
|
|
||||||
void SetIsDeclarative(bool aIsDeclarative) {
|
|
||||||
mIsDeclarative = aIsDeclarative ? Declarative::Yes : Declarative::No;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsClonable() const { return mIsClonable == Clonable::Yes; }
|
|
||||||
|
|
||||||
MOZ_CAN_RUN_SCRIPT
|
|
||||||
void SetHTMLUnsafe(const nsAString& aHTML);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// FIXME(emilio): This will need to become more fine-grained.
|
// FIXME(emilio): This will need to become more fine-grained.
|
||||||
void ApplicableRulesChanged();
|
void ApplicableRulesChanged();
|
||||||
|
|
@ -285,12 +268,6 @@ class ShadowRoot final : public DocumentFragment, public DocumentOrShadowRoot {
|
||||||
// https://dom.spec.whatwg.org/#shadowroot-available-to-element-internals
|
// https://dom.spec.whatwg.org/#shadowroot-available-to-element-internals
|
||||||
bool mIsAvailableToElementInternals : 1;
|
bool mIsAvailableToElementInternals : 1;
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#shadowroot-declarative
|
|
||||||
Declarative mIsDeclarative;
|
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#shadowroot-clonable
|
|
||||||
Clonable mIsClonable;
|
|
||||||
|
|
||||||
nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
|
nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5376,34 +5376,6 @@ bool AllowsUnsanitizedContentForAboutNewTab(nsIPrincipal* aPrincipal) {
|
||||||
return aboutModuleFlags & nsIAboutModule::ALLOW_UNSANITIZED_CONTENT;
|
return aboutModuleFlags & nsIAboutModule::ALLOW_UNSANITIZED_CONTENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
|
||||||
void nsContentUtils::SetHTMLUnsafe(FragmentOrElement* aTarget,
|
|
||||||
Element* aContext,
|
|
||||||
const nsAString& aSource) {
|
|
||||||
MOZ_ASSERT(!sFragmentParsingActive, "Re-entrant fragment parsing attempted.");
|
|
||||||
mozilla::AutoRestore<bool> guard(sFragmentParsingActive);
|
|
||||||
sFragmentParsingActive = true;
|
|
||||||
if (!sHTMLFragmentParser) {
|
|
||||||
NS_ADDREF(sHTMLFragmentParser = new nsHtml5StringParser());
|
|
||||||
// Now sHTMLFragmentParser owns the object
|
|
||||||
}
|
|
||||||
|
|
||||||
nsAtom* contextLocalName = aContext->NodeInfo()->NameAtom();
|
|
||||||
int32_t contextNameSpaceID = aContext->GetNameSpaceID();
|
|
||||||
|
|
||||||
RefPtr<Document> doc = aTarget->OwnerDoc();
|
|
||||||
RefPtr<DocumentFragment> fragment = doc->CreateDocumentFragment();
|
|
||||||
nsresult rv = sHTMLFragmentParser->ParseFragment(
|
|
||||||
aSource, fragment, contextLocalName, contextNameSpaceID,
|
|
||||||
fragment->OwnerDoc()->GetCompatibilityMode() == eCompatibility_NavQuirks,
|
|
||||||
true, true);
|
|
||||||
if (NS_FAILED(rv)) {
|
|
||||||
NS_WARNING("Failed to parse fragment for SetHTMLUnsafe");
|
|
||||||
}
|
|
||||||
|
|
||||||
aTarget->ReplaceChildren(fragment, IgnoreErrors());
|
|
||||||
}
|
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
nsresult nsContentUtils::ParseFragmentHTML(
|
nsresult nsContentUtils::ParseFragmentHTML(
|
||||||
const nsAString& aSourceBuffer, nsIContent* aTargetNode,
|
const nsAString& aSourceBuffer, nsIContent* aTargetNode,
|
||||||
|
|
@ -5459,7 +5431,7 @@ nsresult nsContentUtils::ParseFragmentHTML(
|
||||||
|
|
||||||
nsresult rv = sHTMLFragmentParser->ParseFragment(
|
nsresult rv = sHTMLFragmentParser->ParseFragment(
|
||||||
aSourceBuffer, target, aContextLocalName, aContextNamespace, aQuirks,
|
aSourceBuffer, target, aContextLocalName, aContextNamespace, aQuirks,
|
||||||
aPreventScriptExecution, false);
|
aPreventScriptExecution);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
if (fragment) {
|
if (fragment) {
|
||||||
|
|
@ -11298,25 +11270,6 @@ template bool nsContentUtils::AddElementToListByTreeOrder(
|
||||||
nsTArray<RefPtr<HTMLInputElement>>& aList, HTMLInputElement* aChild,
|
nsTArray<RefPtr<HTMLInputElement>>& aList, HTMLInputElement* aChild,
|
||||||
nsIContent* aAncestor);
|
nsIContent* aAncestor);
|
||||||
|
|
||||||
nsIContent* nsContentUtils::AttachDeclarativeShadowRoot(nsIContent* aHost,
|
|
||||||
ShadowRootMode aMode,
|
|
||||||
bool aDelegatesFocus) {
|
|
||||||
RefPtr<Element> host = mozilla::dom::Element::FromNodeOrNull(aHost);
|
|
||||||
if (!host) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
ShadowRootInit init;
|
|
||||||
init.mMode = aMode;
|
|
||||||
init.mDelegatesFocus = aDelegatesFocus;
|
|
||||||
init.mSlotAssignment = SlotAssignmentMode::Named;
|
|
||||||
init.mClonable = true;
|
|
||||||
|
|
||||||
RefPtr shadowRoot = host->AttachShadow(init, IgnoreErrors(),
|
|
||||||
Element::ShadowRootDeclarative::Yes);
|
|
||||||
return shadowRoot;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
std::ostream& operator<<(std::ostream& aOut,
|
std::ostream& operator<<(std::ostream& aOut,
|
||||||
const PreventDefaultResult aPreventDefaultResult) {
|
const PreventDefaultResult aPreventDefaultResult) {
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,6 @@ class DOMArena;
|
||||||
class Element;
|
class Element;
|
||||||
class Event;
|
class Event;
|
||||||
class EventTarget;
|
class EventTarget;
|
||||||
class FragmentOrElement;
|
|
||||||
class HTMLElement;
|
class HTMLElement;
|
||||||
class HTMLInputElement;
|
class HTMLInputElement;
|
||||||
class IPCTransferable;
|
class IPCTransferable;
|
||||||
|
|
@ -188,7 +187,6 @@ class MessageBroadcaster;
|
||||||
class NodeInfo;
|
class NodeInfo;
|
||||||
class OwningFileOrUSVStringOrFormData;
|
class OwningFileOrUSVStringOrFormData;
|
||||||
class Selection;
|
class Selection;
|
||||||
enum class ShadowRootMode : uint8_t;
|
|
||||||
struct StructuredSerializeOptions;
|
struct StructuredSerializeOptions;
|
||||||
class WorkerPrivate;
|
class WorkerPrivate;
|
||||||
enum class ElementCallbackType;
|
enum class ElementCallbackType;
|
||||||
|
|
@ -1804,9 +1802,6 @@ class nsContentUtils {
|
||||||
bool aPreventScriptExecution,
|
bool aPreventScriptExecution,
|
||||||
mozilla::ErrorResult& aRv);
|
mozilla::ErrorResult& aRv);
|
||||||
|
|
||||||
MOZ_CAN_RUN_SCRIPT
|
|
||||||
static void SetHTMLUnsafe(mozilla::dom::FragmentOrElement* aTarget,
|
|
||||||
Element* aContext, const nsAString& aSource);
|
|
||||||
/**
|
/**
|
||||||
* Invoke the fragment parsing algorithm (innerHTML) using the HTML parser.
|
* Invoke the fragment parsing algorithm (innerHTML) using the HTML parser.
|
||||||
*
|
*
|
||||||
|
|
@ -3462,11 +3457,6 @@ class nsContentUtils {
|
||||||
nsIContent* aContent2,
|
nsIContent* aContent2,
|
||||||
const nsIContent* aCommonAncestor);
|
const nsIContent* aCommonAncestor);
|
||||||
|
|
||||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY
|
|
||||||
static nsIContent* AttachDeclarativeShadowRoot(
|
|
||||||
nsIContent* aHost, mozilla::dom::ShadowRootMode aMode,
|
|
||||||
bool aDelegatesFocus);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool InitializeEventTable();
|
static bool InitializeEventTable();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@
|
||||||
#include "mozilla/dom/DebuggerNotificationBinding.h"
|
#include "mozilla/dom/DebuggerNotificationBinding.h"
|
||||||
#include "mozilla/dom/DocumentType.h"
|
#include "mozilla/dom/DocumentType.h"
|
||||||
#include "mozilla/dom/Element.h"
|
#include "mozilla/dom/Element.h"
|
||||||
#include "mozilla/dom/ElementBinding.h"
|
|
||||||
#include "mozilla/dom/Event.h"
|
#include "mozilla/dom/Event.h"
|
||||||
#include "mozilla/dom/Exceptions.h"
|
#include "mozilla/dom/Exceptions.h"
|
||||||
#include "mozilla/dom/Link.h"
|
#include "mozilla/dom/Link.h"
|
||||||
|
|
@ -3615,38 +3614,6 @@ already_AddRefed<nsINode> nsINode::CloneAndAdopt(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aClone && aNode->IsElement() &&
|
|
||||||
!nodeInfo->GetDocument()->IsStaticDocument()) {
|
|
||||||
// Clone the Shadow DOM
|
|
||||||
ShadowRoot* originalShadowRoot = aNode->AsElement()->GetShadowRoot();
|
|
||||||
if (originalShadowRoot && originalShadowRoot->IsClonable()) {
|
|
||||||
ShadowRootInit init;
|
|
||||||
init.mMode = originalShadowRoot->Mode();
|
|
||||||
init.mDelegatesFocus = originalShadowRoot->DelegatesFocus();
|
|
||||||
init.mSlotAssignment = originalShadowRoot->SlotAssignment();
|
|
||||||
init.mClonable = true;
|
|
||||||
|
|
||||||
RefPtr<ShadowRoot> newShadowRoot =
|
|
||||||
clone->AsElement()->AttachShadow(init, aError);
|
|
||||||
if (NS_WARN_IF(aError.Failed())) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
newShadowRoot->SetIsDeclarative(originalShadowRoot->IsDeclarative());
|
|
||||||
|
|
||||||
if (aDeep) {
|
|
||||||
for (nsIContent* origChild = originalShadowRoot->GetFirstChild();
|
|
||||||
origChild; origChild = origChild->GetNextSibling()) {
|
|
||||||
nsCOMPtr<nsINode> child =
|
|
||||||
CloneAndAdopt(origChild, aClone, aDeep, nodeInfoManager,
|
|
||||||
aReparentScope, newShadowRoot, aError);
|
|
||||||
if (NS_WARN_IF(aError.Failed())) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cloning template element.
|
// Cloning template element.
|
||||||
if (aDeep && aClone && aNode->IsTemplateElement()) {
|
if (aDeep && aClone && aNode->IsTemplateElement()) {
|
||||||
DocumentFragment* origContent =
|
DocumentFragment* origContent =
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@
|
||||||
#include "mozilla/dom/HTMLTemplateElementBinding.h"
|
#include "mozilla/dom/HTMLTemplateElementBinding.h"
|
||||||
|
|
||||||
#include "mozilla/dom/Document.h"
|
#include "mozilla/dom/Document.h"
|
||||||
#include "mozilla/dom/NameSpaceConstants.h"
|
|
||||||
#include "mozilla/dom/ShadowRootBinding.h"
|
|
||||||
#include "nsGenericHTMLElement.h"
|
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
#include "nsStyleConsts.h"
|
#include "nsStyleConsts.h"
|
||||||
#include "nsAtom.h"
|
#include "nsAtom.h"
|
||||||
|
|
@ -19,13 +16,6 @@ NS_IMPL_NS_NEW_HTML_ELEMENT(Template)
|
||||||
|
|
||||||
namespace mozilla::dom {
|
namespace mozilla::dom {
|
||||||
|
|
||||||
static constexpr nsAttrValue::EnumTable kShadowRootModeTable[] = {
|
|
||||||
{"open", ShadowRootMode::Open},
|
|
||||||
{"closed", ShadowRootMode::Closed},
|
|
||||||
{nullptr, {}}};
|
|
||||||
|
|
||||||
const nsAttrValue::EnumTable* kShadowRootModeDefault = &kShadowRootModeTable[2];
|
|
||||||
|
|
||||||
HTMLTemplateElement::HTMLTemplateElement(
|
HTMLTemplateElement::HTMLTemplateElement(
|
||||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||||
: nsGenericHTMLElement(std::move(aNodeInfo)) {
|
: nsGenericHTMLElement(std::move(aNodeInfo)) {
|
||||||
|
|
@ -41,7 +31,7 @@ HTMLTemplateElement::HTMLTemplateElement(
|
||||||
}
|
}
|
||||||
|
|
||||||
HTMLTemplateElement::~HTMLTemplateElement() {
|
HTMLTemplateElement::~HTMLTemplateElement() {
|
||||||
if (mContent && mContent->GetHost() == this) {
|
if (mContent) {
|
||||||
mContent->SetHost(nullptr);
|
mContent->SetHost(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -54,9 +44,7 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLTemplateElement)
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLTemplateElement,
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLTemplateElement,
|
||||||
nsGenericHTMLElement)
|
nsGenericHTMLElement)
|
||||||
if (tmp->mContent) {
|
if (tmp->mContent) {
|
||||||
if (tmp->mContent->GetHost() == tmp) {
|
|
||||||
tmp->mContent->SetHost(nullptr);
|
tmp->mContent->SetHost(nullptr);
|
||||||
}
|
|
||||||
tmp->mContent = nullptr;
|
tmp->mContent = nullptr;
|
||||||
}
|
}
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||||
|
|
@ -73,38 +61,4 @@ JSObject* HTMLTemplateElement::WrapNode(JSContext* aCx,
|
||||||
return HTMLTemplateElement_Binding::Wrap(aCx, this, aGivenProto);
|
return HTMLTemplateElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTMLTemplateElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
|
||||||
const nsAttrValue* aValue,
|
|
||||||
const nsAttrValue* aOldValue,
|
|
||||||
nsIPrincipal* aMaybeScriptedPrincipal,
|
|
||||||
bool aNotify) {
|
|
||||||
if (aNamespaceID == kNameSpaceID_None && aName == nsGkAtoms::shadowrootmode &&
|
|
||||||
aValue && aValue->Type() == nsAttrValue::ValueType::eEnum &&
|
|
||||||
!mShadowRootMode.isSome()) {
|
|
||||||
mShadowRootMode.emplace(
|
|
||||||
static_cast<ShadowRootMode>(aValue->GetEnumValue()));
|
|
||||||
}
|
|
||||||
|
|
||||||
nsGenericHTMLElement::AfterSetAttr(aNamespaceID, aName, aValue, aOldValue,
|
|
||||||
aMaybeScriptedPrincipal, aNotify);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HTMLTemplateElement::ParseAttribute(int32_t aNamespaceID,
|
|
||||||
nsAtom* aAttribute,
|
|
||||||
const nsAString& aValue,
|
|
||||||
nsIPrincipal* aMaybeScriptedPrincipal,
|
|
||||||
nsAttrValue& aResult) {
|
|
||||||
if (aNamespaceID == kNameSpaceID_None &&
|
|
||||||
aAttribute == nsGkAtoms::shadowrootmode) {
|
|
||||||
return aResult.ParseEnumValue(aValue, kShadowRootModeTable, false, nullptr);
|
|
||||||
}
|
|
||||||
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
|
|
||||||
aMaybeScriptedPrincipal, aResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HTMLTemplateElement::SetHTMLUnsafe(const nsAString& aHTML) {
|
|
||||||
RefPtr<DocumentFragment> content = mContent;
|
|
||||||
nsContentUtils::SetHTMLUnsafe(content, this, aHTML);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace mozilla::dom
|
} // namespace mozilla::dom
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,8 @@
|
||||||
#define mozilla_dom_HTMLTemplateElement_h
|
#define mozilla_dom_HTMLTemplateElement_h
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "mozilla/ErrorResult.h"
|
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "mozilla/dom/DocumentFragment.h"
|
#include "mozilla/dom/DocumentFragment.h"
|
||||||
#include "mozilla/dom/ShadowRootBinding.h"
|
|
||||||
#include "nsGkAtoms.h"
|
|
||||||
|
|
||||||
namespace mozilla::dom {
|
namespace mozilla::dom {
|
||||||
|
|
||||||
|
|
@ -29,38 +26,9 @@ class HTMLTemplateElement final : public nsGenericHTMLElement {
|
||||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLTemplateElement,
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLTemplateElement,
|
||||||
nsGenericHTMLElement)
|
nsGenericHTMLElement)
|
||||||
|
|
||||||
void AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
|
|
||||||
const nsAttrValue* aValue, const nsAttrValue* aOldValue,
|
|
||||||
nsIPrincipal* aMaybeScriptedPrincipal,
|
|
||||||
bool aNotify) override;
|
|
||||||
|
|
||||||
bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|
||||||
const nsAString& aValue,
|
|
||||||
nsIPrincipal* aMaybeScriptedPrincipal,
|
|
||||||
nsAttrValue& aResult) override;
|
|
||||||
|
|
||||||
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
|
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
|
||||||
|
|
||||||
DocumentFragment* Content() { return mContent; }
|
DocumentFragment* Content() { return mContent; }
|
||||||
void SetContent(DocumentFragment* aContent) { mContent = aContent; }
|
|
||||||
|
|
||||||
void GetShadowRootMode(nsAString& aResult) const {
|
|
||||||
GetEnumAttr(nsGkAtoms::shadowrootmode, nullptr, aResult);
|
|
||||||
}
|
|
||||||
void SetShadowRootMode(const nsAString& aValue) {
|
|
||||||
SetHTMLAttr(nsGkAtoms::shadowrootmode, aValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ShadowRootDelegatesFocus() {
|
|
||||||
return GetBoolAttr(nsGkAtoms::shadowrootdelegatesfocus);
|
|
||||||
}
|
|
||||||
void SetShadowRootDelegatesFocus(bool aValue) {
|
|
||||||
SetHTMLBoolAttr(nsGkAtoms::shadowrootdelegatesfocus, aValue,
|
|
||||||
IgnoredErrorResult());
|
|
||||||
}
|
|
||||||
|
|
||||||
MOZ_CAN_RUN_SCRIPT
|
|
||||||
void SetHTMLUnsafe(const nsAString& aHTML) final;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~HTMLTemplateElement();
|
virtual ~HTMLTemplateElement();
|
||||||
|
|
@ -69,7 +37,6 @@ class HTMLTemplateElement final : public nsGenericHTMLElement {
|
||||||
JS::Handle<JSObject*> aGivenProto) override;
|
JS::Handle<JSObject*> aGivenProto) override;
|
||||||
|
|
||||||
RefPtr<DocumentFragment> mContent;
|
RefPtr<DocumentFragment> mContent;
|
||||||
Maybe<ShadowRootMode> mShadowRootMode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mozilla::dom
|
} // namespace mozilla::dom
|
||||||
|
|
|
||||||
|
|
@ -151,9 +151,6 @@ interface Document : Node {
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/dom.html#the-document-object
|
// https://html.spec.whatwg.org/multipage/dom.html#the-document-object
|
||||||
partial interface Document {
|
partial interface Document {
|
||||||
[Pref="dom.webcomponents.shadowdom.declarative.enabled"]
|
|
||||||
static Document parseHTMLUnsafe(DOMString html);
|
|
||||||
|
|
||||||
[PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
|
[PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
|
||||||
[SetterThrows] attribute DOMString domain;
|
[SetterThrows] attribute DOMString domain;
|
||||||
readonly attribute DOMString referrer;
|
readonly attribute DOMString referrer;
|
||||||
|
|
|
||||||
|
|
@ -276,8 +276,6 @@ dictionary ShadowRootInit {
|
||||||
required ShadowRootMode mode;
|
required ShadowRootMode mode;
|
||||||
boolean delegatesFocus = false;
|
boolean delegatesFocus = false;
|
||||||
SlotAssignmentMode slotAssignment = "named";
|
SlotAssignmentMode slotAssignment = "named";
|
||||||
[Pref="dom.webcomponents.shadowdom.declarative.enabled"]
|
|
||||||
boolean clonable = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#element
|
// https://dom.spec.whatwg.org/#element
|
||||||
|
|
@ -405,9 +403,3 @@ partial interface Element {
|
||||||
[SecureContext, UseCounter, Throws, Pref="dom.security.setHTML.enabled"]
|
[SecureContext, UseCounter, Throws, Pref="dom.security.setHTML.enabled"]
|
||||||
undefined setHTML(DOMString aInnerHTML, optional SetHTMLOptions options = {});
|
undefined setHTML(DOMString aInnerHTML, optional SetHTMLOptions options = {});
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface Element {
|
|
||||||
// https://html.spec.whatwg.org/#dom-element-sethtmlunsafe
|
|
||||||
[Pref="dom.webcomponents.shadowdom.declarative.enabled"]
|
|
||||||
undefined setHTMLUnsafe(DOMString html);
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* The origin of this IDL file is
|
* The origin of this IDL file is
|
||||||
* https://html.spec.whatwg.org/multipage/scripting.html#the-template-element
|
* https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
|
||||||
*
|
*
|
||||||
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
|
|
@ -14,8 +14,4 @@ interface HTMLTemplateElement : HTMLElement {
|
||||||
[HTMLConstructor] constructor();
|
[HTMLConstructor] constructor();
|
||||||
|
|
||||||
readonly attribute DocumentFragment content;
|
readonly attribute DocumentFragment content;
|
||||||
[CEReactions, Pref="dom.webcomponents.shadowdom.declarative.enabled"]
|
|
||||||
attribute DOMString shadowRootMode;
|
|
||||||
[CEReactions, Pref="dom.webcomponents.shadowdom.declarative.enabled"]
|
|
||||||
attribute boolean shadowRootDelegatesFocus;
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,4 @@ interface ShadowRoot : DocumentFragment
|
||||||
boolean isUAWidget();
|
boolean isUAWidget();
|
||||||
};
|
};
|
||||||
|
|
||||||
partial interface ShadowRoot {
|
|
||||||
// https://html.spec.whatwg.org/#dom-shadowroot-sethtmlunsafe
|
|
||||||
[Pref="dom.webcomponents.shadowdom.declarative.enabled"]
|
|
||||||
undefined setHTMLUnsafe(DOMString html);
|
|
||||||
};
|
|
||||||
|
|
||||||
ShadowRoot includes DocumentOrShadowRoot;
|
ShadowRoot includes DocumentOrShadowRoot;
|
||||||
|
|
|
||||||
|
|
@ -314,8 +314,6 @@ nsresult nsContentDLF::CreateDocument(
|
||||||
nsCOMPtr<nsIDocumentViewer> viewer = NS_NewDocumentViewer();
|
nsCOMPtr<nsIDocumentViewer> viewer = NS_NewDocumentViewer();
|
||||||
|
|
||||||
doc->SetContainer(static_cast<nsDocShell*>(aContainer));
|
doc->SetContainer(static_cast<nsDocShell*>(aContainer));
|
||||||
doc->SetAllowDeclarativeShadowRoots(
|
|
||||||
mozilla::StaticPrefs::dom_webcomponents_shadowdom_declarative_enabled());
|
|
||||||
|
|
||||||
// Initialize the document to begin loading the data. An
|
// Initialize the document to begin loading the data. An
|
||||||
// nsIStreamListener connected to the parser is returned in
|
// nsIStreamListener connected to the parser is returned in
|
||||||
|
|
|
||||||
|
|
@ -4515,12 +4515,6 @@
|
||||||
value: false
|
value: false
|
||||||
mirror: always
|
mirror: always
|
||||||
|
|
||||||
# Is support for Declarative ShadowDOM enabled?
|
|
||||||
- name: dom.webcomponents.shadowdom.declarative.enabled
|
|
||||||
type: bool
|
|
||||||
value: @IS_NIGHTLY_BUILD@
|
|
||||||
mirror: always
|
|
||||||
|
|
||||||
# Is support for the Web GPU API enabled?
|
# Is support for the Web GPU API enabled?
|
||||||
- name: dom.webgpu.enabled
|
- name: dom.webgpu.enabled
|
||||||
type: RelaxedAtomicBool
|
type: RelaxedAtomicBool
|
||||||
|
|
|
||||||
|
|
@ -798,12 +798,10 @@ public final class AttributeName
|
||||||
public static final AttributeName LOADING = new AttributeName(ALL_NO_NS, "loading", "loading", "loading", "loading", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName LOADING = new AttributeName(ALL_NO_NS, "loading", "loading", "loading", "loading", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
public static final AttributeName READONLY = new AttributeName(ALL_NO_NS, "readonly", "readonly", "readonly", "readonly", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG | CASE_FOLDED | BOOLEAN);
|
public static final AttributeName READONLY = new AttributeName(ALL_NO_NS, "readonly", "readonly", "readonly", "readonly", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG | CASE_FOLDED | BOOLEAN);
|
||||||
public static final AttributeName RENDERING_INTENT = new AttributeName(ALL_NO_NS, "rendering-intent", "rendering-intent", "rendering-intent", "rendering-intent", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName RENDERING_INTENT = new AttributeName(ALL_NO_NS, "rendering-intent", "rendering-intent", "rendering-intent", "rendering-intent", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
public static final AttributeName SHADOWROOTMODE = new AttributeName(ALL_NO_NS, "shadowrootmode", "shadowrootmode", "shadowrootmode", "shadowrootmode", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
|
||||||
public static final AttributeName SEED = new AttributeName(ALL_NO_NS, "seed", "seed", "seed", "seed", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName SEED = new AttributeName(ALL_NO_NS, "seed", "seed", "seed", "seed", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
public static final AttributeName SRCDOC = new AttributeName(ALL_NO_NS, "srcdoc", "srcdoc", "srcdoc", "srcdoc", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName SRCDOC = new AttributeName(ALL_NO_NS, "srcdoc", "srcdoc", "srcdoc", "srcdoc", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
public static final AttributeName STDDEVIATION = new AttributeName(ALL_NO_NS, "stddeviation", "stddeviation", "stdDeviation", "stddeviation", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName STDDEVIATION = new AttributeName(ALL_NO_NS, "stddeviation", "stddeviation", "stdDeviation", "stddeviation", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
public static final AttributeName SANDBOX = new AttributeName(ALL_NO_NS, "sandbox", "sandbox", "sandbox", "sandbox", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName SANDBOX = new AttributeName(ALL_NO_NS, "sandbox", "sandbox", "sandbox", "sandbox", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
public static final AttributeName SHADOWROOTDELEGATESFOCUS = new AttributeName(ALL_NO_NS, "shadowrootdelegatesfocus", "shadowrootdelegatesfocus", "shadowrootdelegatesfocus", "shadowrootdelegatesfocus", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
|
||||||
public static final AttributeName WORD_SPACING = new AttributeName(ALL_NO_NS, "word-spacing", "word-spacing", "word-spacing", "word-spacing", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName WORD_SPACING = new AttributeName(ALL_NO_NS, "word-spacing", "word-spacing", "word-spacing", "word-spacing", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
public static final AttributeName ACCENTUNDER = new AttributeName(ALL_NO_NS, "accentunder", "accentunder", "accentunder", "accentunder", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName ACCENTUNDER = new AttributeName(ALL_NO_NS, "accentunder", "accentunder", "accentunder", "accentunder", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
public static final AttributeName ACCEPT_CHARSET = new AttributeName(ALL_NO_NS, "accept-charset", "accept-charset", "accept-charset", "accept-charset", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName ACCEPT_CHARSET = new AttributeName(ALL_NO_NS, "accept-charset", "accept-charset", "accept-charset", "accept-charset", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
|
|
@ -1194,36 +1192,36 @@ public final class AttributeName
|
||||||
public static final AttributeName RY = new AttributeName(ALL_NO_NS, "ry", "ry", "ry", "ry", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName RY = new AttributeName(ALL_NO_NS, "ry", "ry", "ry", "ry", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
public static final AttributeName REFY = new AttributeName(ALL_NO_NS, "refy", "refy", "refY", "refy", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
public static final AttributeName REFY = new AttributeName(ALL_NO_NS, "refy", "refy", "refY", "refy", ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG);
|
||||||
private final static @NoLength AttributeName[] ATTRIBUTE_NAMES = {
|
private final static @NoLength AttributeName[] ATTRIBUTE_NAMES = {
|
||||||
CELLSPACING,
|
DECLARE,
|
||||||
CODETYPE,
|
CITE,
|
||||||
ATTRIBUTENAME,
|
CHAR,
|
||||||
CLEAR,
|
CLEAR,
|
||||||
ALIGNMENTSCOPE,
|
HEIGHT,
|
||||||
BGCOLOR,
|
COLOR_RENDERING,
|
||||||
FILTERUNITS,
|
FONT_SIZE,
|
||||||
ARIA_DISABLED,
|
ARIA_DISABLED,
|
||||||
OPACITY,
|
OPACITY,
|
||||||
ONBEFORECOPY,
|
ONBEFOREPASTE,
|
||||||
ACTION,
|
ADDITIVE,
|
||||||
KERNELMATRIX,
|
KERNELUNITLENGTH,
|
||||||
STROKE_DASHOFFSET,
|
STROKE_MITERLIMIT,
|
||||||
IS,
|
KEYSPLINES,
|
||||||
INPUTMODE,
|
ONCUT,
|
||||||
Y,
|
Y,
|
||||||
ARIA_MULTISELECTABLE,
|
ARIA_MULTISELECTABLE,
|
||||||
ROTATE,
|
ROTATE,
|
||||||
STDDEVIATION,
|
SANDBOX,
|
||||||
MODE,
|
NORESIZE,
|
||||||
SUPERSCRIPTSHIFT,
|
SCHEME,
|
||||||
TARGETX,
|
ARCHIVE,
|
||||||
SCRIPTMINSIZE,
|
VALIGN,
|
||||||
FORMAT,
|
FRAME,
|
||||||
TRANSFORM,
|
WHEN,
|
||||||
ONMOUSEOVER,
|
ONCONTEXTMENU,
|
||||||
GLYPHREF,
|
KEYPOINTS,
|
||||||
OVERFLOW,
|
ONDRAGLEAVE,
|
||||||
CONTENTEDITABLE,
|
CONTENT,
|
||||||
STITCHTILES,
|
TEXT_RENDERING,
|
||||||
RX,
|
RX,
|
||||||
MIN,
|
MIN,
|
||||||
K3,
|
K3,
|
||||||
|
|
@ -1232,30 +1230,30 @@ public final class AttributeName
|
||||||
LOCAL,
|
LOCAL,
|
||||||
ONABORT,
|
ONABORT,
|
||||||
HIDDEN,
|
HIDDEN,
|
||||||
ACCEPT,
|
BASEFREQUENCY,
|
||||||
ENTERKEYHINT,
|
INDEX,
|
||||||
OTHER,
|
ONREADYSTATECHANGE,
|
||||||
REPEAT,
|
RULES,
|
||||||
HREF,
|
ONAFTERPRINT,
|
||||||
LARGEOP,
|
LENGTHADJUST,
|
||||||
MATHCOLOR,
|
NOSHADE,
|
||||||
MEDIA,
|
ONFINISH,
|
||||||
MARKER_END,
|
MARKER_START,
|
||||||
ONBLUR,
|
ROWLINES,
|
||||||
SYMMETRIC,
|
USEMAP,
|
||||||
POINTER_EVENTS,
|
POINTSATX,
|
||||||
XMLNS,
|
XLINK_SHOW,
|
||||||
FLOOD_COLOR,
|
LQUOTE,
|
||||||
ONFOCUS,
|
ONFOCUSOUT,
|
||||||
CLIP,
|
CLIP_PATH,
|
||||||
SCOPE,
|
SLOPE,
|
||||||
ONDRAG,
|
ONDRAGOVER,
|
||||||
COLSPAN,
|
CROSSORIGIN,
|
||||||
PRESERVEASPECTRATIO,
|
ROWSPACING,
|
||||||
FONTWEIGHT,
|
FONTSTYLE,
|
||||||
ONSTOP,
|
POSTER,
|
||||||
WIDTH,
|
COLUMNSPAN,
|
||||||
VALUETYPE,
|
ELEVATION,
|
||||||
DY,
|
DY,
|
||||||
END,
|
END,
|
||||||
SRC,
|
SRC,
|
||||||
|
|
@ -1271,54 +1269,54 @@ public final class AttributeName
|
||||||
FETCHPRIORITY,
|
FETCHPRIORITY,
|
||||||
BORDER,
|
BORDER,
|
||||||
RENDERING_INTENT,
|
RENDERING_INTENT,
|
||||||
ACCENTUNDER,
|
ACCESSKEY,
|
||||||
BASEPROFILE,
|
BASE,
|
||||||
DATETIME,
|
EDGEMODE,
|
||||||
INTEGRITY,
|
LABEL,
|
||||||
ONREPEAT,
|
ONSELECT,
|
||||||
ONBEGIN,
|
ORIENT,
|
||||||
ONKEYUP,
|
ONKEYDOWN,
|
||||||
REPEATCOUNT,
|
SELECTED,
|
||||||
SELECTION,
|
TYPE,
|
||||||
SURFACESCALE,
|
ALIGN,
|
||||||
IMAGESRCSET,
|
LANGUAGE,
|
||||||
MARGINWIDTH,
|
PING,
|
||||||
LIGHTING_COLOR,
|
METHOD,
|
||||||
PATHLENGTH,
|
ALTIMG,
|
||||||
DOMINANT_BASELINE,
|
DEFINITIONURL,
|
||||||
RADIOGROUP,
|
SCRIPTLEVEL,
|
||||||
BACKGROUND,
|
MARKER_MID,
|
||||||
MASKUNITS,
|
MASKCONTENTUNITS,
|
||||||
FILL,
|
MAXLENGTH,
|
||||||
STYLE,
|
TITLE,
|
||||||
FROM,
|
PROMPT,
|
||||||
ASYNC,
|
IN,
|
||||||
OPEN,
|
ONEND,
|
||||||
POINTSATZ,
|
STANDBY,
|
||||||
XLINK_TITLE,
|
XLINK_ARCROLE,
|
||||||
AUTOPLAY,
|
AUTOFOCUS,
|
||||||
COLOR,
|
ENCODING,
|
||||||
NOMODULE,
|
ONMOUSEWHEEL,
|
||||||
ONCOPY,
|
ONMOUSEMOVE,
|
||||||
TO,
|
STROKE_LINECAP,
|
||||||
SCROLLING,
|
STROKE_OPACITY,
|
||||||
DISPLAY,
|
GLYPH_ORIENTATION_VERTICAL,
|
||||||
PROPERTY,
|
STEP,
|
||||||
STOP_OPACITY,
|
WRAP,
|
||||||
CHAROFF,
|
NOWRAP,
|
||||||
ONDROP,
|
ONERROR,
|
||||||
START,
|
AXIS,
|
||||||
CURSOR,
|
CLOSE,
|
||||||
MAXSIZE,
|
OFFSET,
|
||||||
SRCSET,
|
VERSION,
|
||||||
DEPTH,
|
FONT_STRETCH,
|
||||||
FONTFAMILY,
|
FONT_VARIANT,
|
||||||
LETTER_SPACING,
|
MULTIPLE,
|
||||||
PATTERN,
|
PATTERNCONTENTUNITS,
|
||||||
TEXT_ANCHOR,
|
TEXT,
|
||||||
COLUMNALIGN,
|
COLUMNWIDTH,
|
||||||
REQUIREDFEATURES,
|
REQUIREDEXTENSIONS,
|
||||||
VIEWBOX,
|
DX,
|
||||||
BY,
|
BY,
|
||||||
RY,
|
RY,
|
||||||
DIR,
|
DIR,
|
||||||
|
|
@ -1348,103 +1346,103 @@ public final class AttributeName
|
||||||
SPECULAREXPONENT,
|
SPECULAREXPONENT,
|
||||||
GRADIENTTRANSFORM,
|
GRADIENTTRANSFORM,
|
||||||
LOADING,
|
LOADING,
|
||||||
SEED,
|
SRCDOC,
|
||||||
SHADOWROOTDELEGATESFOCUS,
|
ACCENTUNDER,
|
||||||
ACCESSKEY,
|
ACCEPT,
|
||||||
BASEFREQUENCY,
|
BASEPROFILE,
|
||||||
BASE,
|
CODETYPE,
|
||||||
CITE,
|
DATETIME,
|
||||||
EDGEMODE,
|
ENTERKEYHINT,
|
||||||
INDEX,
|
INTEGRITY,
|
||||||
LABEL,
|
MODE,
|
||||||
NORESIZE,
|
ONREPEAT,
|
||||||
ONSELECT,
|
OTHER,
|
||||||
ONREADYSTATECHANGE,
|
ONBEGIN,
|
||||||
ORIENT,
|
ONBEFORECOPY,
|
||||||
ONBEFOREPASTE,
|
ONKEYUP,
|
||||||
ONKEYDOWN,
|
REPEAT,
|
||||||
RULES,
|
REPEATCOUNT,
|
||||||
SELECTED,
|
SUPERSCRIPTSHIFT,
|
||||||
SCHEME,
|
SELECTION,
|
||||||
TYPE,
|
HREF,
|
||||||
ONAFTERPRINT,
|
SURFACESCALE,
|
||||||
ALIGN,
|
ALIGNMENTSCOPE,
|
||||||
HEIGHT,
|
IMAGESRCSET,
|
||||||
LANGUAGE,
|
LARGEOP,
|
||||||
LENGTHADJUST,
|
MARGINWIDTH,
|
||||||
PING,
|
TARGETX,
|
||||||
ARCHIVE,
|
LIGHTING_COLOR,
|
||||||
METHOD,
|
MATHCOLOR,
|
||||||
NOSHADE,
|
PATHLENGTH,
|
||||||
ALTIMG,
|
ACTION,
|
||||||
ADDITIVE,
|
DOMINANT_BASELINE,
|
||||||
DEFINITIONURL,
|
MEDIA,
|
||||||
ONFINISH,
|
RADIOGROUP,
|
||||||
SCRIPTLEVEL,
|
SCRIPTMINSIZE,
|
||||||
VALIGN,
|
BACKGROUND,
|
||||||
MARKER_MID,
|
MARKER_END,
|
||||||
MARKER_START,
|
MASKUNITS,
|
||||||
MASKCONTENTUNITS,
|
CELLSPACING,
|
||||||
DECLARE,
|
FILL,
|
||||||
MAXLENGTH,
|
ONBLUR,
|
||||||
ROWLINES,
|
STYLE,
|
||||||
TITLE,
|
FORMAT,
|
||||||
FRAME,
|
FROM,
|
||||||
PROMPT,
|
SYMMETRIC,
|
||||||
USEMAP,
|
ASYNC,
|
||||||
IN,
|
KERNELMATRIX,
|
||||||
KERNELUNITLENGTH,
|
OPEN,
|
||||||
ONEND,
|
POINTER_EVENTS,
|
||||||
POINTSATX,
|
POINTSATZ,
|
||||||
STANDBY,
|
TRANSFORM,
|
||||||
WHEN,
|
XLINK_TITLE,
|
||||||
XLINK_ARCROLE,
|
XMLNS,
|
||||||
XLINK_SHOW,
|
AUTOPLAY,
|
||||||
AUTOFOCUS,
|
BGCOLOR,
|
||||||
COLOR_RENDERING,
|
COLOR,
|
||||||
ENCODING,
|
FLOOD_COLOR,
|
||||||
LQUOTE,
|
NOMODULE,
|
||||||
ONMOUSEWHEEL,
|
ONMOUSEOVER,
|
||||||
ONCONTEXTMENU,
|
ONCOPY,
|
||||||
ONMOUSEMOVE,
|
ONFOCUS,
|
||||||
ONFOCUSOUT,
|
TO,
|
||||||
STROKE_LINECAP,
|
STROKE_DASHOFFSET,
|
||||||
STROKE_MITERLIMIT,
|
SCROLLING,
|
||||||
STROKE_OPACITY,
|
CLIP,
|
||||||
CLIP_PATH,
|
DISPLAY,
|
||||||
GLYPH_ORIENTATION_VERTICAL,
|
GLYPHREF,
|
||||||
KEYPOINTS,
|
PROPERTY,
|
||||||
STEP,
|
SCOPE,
|
||||||
SLOPE,
|
STOP_OPACITY,
|
||||||
WRAP,
|
ATTRIBUTENAME,
|
||||||
CHAR,
|
CHAROFF,
|
||||||
NOWRAP,
|
ONDRAG,
|
||||||
ONDRAGOVER,
|
ONDROP,
|
||||||
ONERROR,
|
OVERFLOW,
|
||||||
ONDRAGLEAVE,
|
START,
|
||||||
AXIS,
|
COLSPAN,
|
||||||
CROSSORIGIN,
|
CURSOR,
|
||||||
CLOSE,
|
IS,
|
||||||
KEYSPLINES,
|
MAXSIZE,
|
||||||
OFFSET,
|
PRESERVEASPECTRATIO,
|
||||||
ROWSPACING,
|
SRCSET,
|
||||||
VERSION,
|
CONTENTEDITABLE,
|
||||||
CONTENT,
|
DEPTH,
|
||||||
FONT_STRETCH,
|
FONTWEIGHT,
|
||||||
FONTSTYLE,
|
FONTFAMILY,
|
||||||
FONT_VARIANT,
|
FILTERUNITS,
|
||||||
FONT_SIZE,
|
LETTER_SPACING,
|
||||||
MULTIPLE,
|
ONSTOP,
|
||||||
POSTER,
|
PATTERN,
|
||||||
PATTERNCONTENTUNITS,
|
STITCHTILES,
|
||||||
TEXT_RENDERING,
|
TEXT_ANCHOR,
|
||||||
TEXT,
|
WIDTH,
|
||||||
COLUMNSPAN,
|
COLUMNALIGN,
|
||||||
COLUMNWIDTH,
|
INPUTMODE,
|
||||||
ONCUT,
|
REQUIREDFEATURES,
|
||||||
REQUIREDEXTENSIONS,
|
VALUETYPE,
|
||||||
ELEVATION,
|
VIEWBOX,
|
||||||
DX,
|
FX,
|
||||||
REFX,
|
REFX,
|
||||||
CY,
|
CY,
|
||||||
FY,
|
FY,
|
||||||
|
|
@ -1503,9 +1501,8 @@ public final class AttributeName
|
||||||
GRADIENTUNITS,
|
GRADIENTUNITS,
|
||||||
HEADERS,
|
HEADERS,
|
||||||
READONLY,
|
READONLY,
|
||||||
SHADOWROOTMODE,
|
SEED,
|
||||||
SRCDOC,
|
STDDEVIATION,
|
||||||
SANDBOX,
|
|
||||||
WORD_SPACING,
|
WORD_SPACING,
|
||||||
ACCEPT_CHARSET,
|
ACCEPT_CHARSET,
|
||||||
ACCENT,
|
ACCENT,
|
||||||
|
|
@ -1696,39 +1693,38 @@ public final class AttributeName
|
||||||
VALUE,
|
VALUE,
|
||||||
VIEWTARGET,
|
VIEWTARGET,
|
||||||
CX,
|
CX,
|
||||||
FX,
|
|
||||||
};
|
};
|
||||||
private final static int[] ATTRIBUTE_HASHES = {
|
private final static int[] ATTRIBUTE_HASHES = {
|
||||||
1865910331,
|
1866496199,
|
||||||
1748503880,
|
1748566068,
|
||||||
1965512429,
|
1966384692,
|
||||||
1681174213,
|
1681174213,
|
||||||
1781007934,
|
1784574102,
|
||||||
1915757815,
|
1916247343,
|
||||||
2001826027,
|
2001898809,
|
||||||
1680165421,
|
1680165421,
|
||||||
1721347639,
|
1721347639,
|
||||||
1754835516,
|
1754860061,
|
||||||
1814560070,
|
1814656840,
|
||||||
1903612236,
|
1903759600,
|
||||||
1924517489,
|
1924583073,
|
||||||
1984430082,
|
1987422362,
|
||||||
2019887833,
|
2023342821,
|
||||||
71827457,
|
71827457,
|
||||||
1680282148,
|
1680282148,
|
||||||
1689324870,
|
1689324870,
|
||||||
1740119884,
|
1740130375,
|
||||||
1753550036,
|
1754434872,
|
||||||
1756762256,
|
1756836998,
|
||||||
1791068279,
|
1797886599,
|
||||||
1824159037,
|
1825437894,
|
||||||
1884079398,
|
1884246821,
|
||||||
1908462185,
|
1909819252,
|
||||||
1922413307,
|
1922566877,
|
||||||
1934970504,
|
1937336473,
|
||||||
1972922984,
|
1972996699,
|
||||||
2000096287,
|
2000160071,
|
||||||
2008401563,
|
2009041198,
|
||||||
2073034754,
|
2073034754,
|
||||||
57205395,
|
57205395,
|
||||||
911736834,
|
911736834,
|
||||||
|
|
@ -1737,30 +1733,30 @@ public final class AttributeName
|
||||||
1685882101,
|
1685882101,
|
||||||
1704526375,
|
1704526375,
|
||||||
1734182982,
|
1734182982,
|
||||||
1747479606,
|
1747800157,
|
||||||
1749549708,
|
1751507685,
|
||||||
1754644293,
|
1754647074,
|
||||||
1756147974,
|
1756219733,
|
||||||
1767725700,
|
1771569964,
|
||||||
1786775671,
|
1786851500,
|
||||||
1804081401,
|
1804405895,
|
||||||
1820727381,
|
1821958888,
|
||||||
1854366938,
|
1854466380,
|
||||||
1872343590,
|
1873656984,
|
||||||
1890996553,
|
1891937366,
|
||||||
1906408542,
|
1906419001,
|
||||||
1910503637,
|
1910527802,
|
||||||
1917857531,
|
1921061206,
|
||||||
1922677495,
|
1922679610,
|
||||||
1932959284,
|
1933123337,
|
||||||
1941435445,
|
1941440197,
|
||||||
1972656710,
|
1972744954,
|
||||||
1983157559,
|
1983290011,
|
||||||
1990107683,
|
1991220282,
|
||||||
2001634458,
|
2001669449,
|
||||||
2006459190,
|
2006824246,
|
||||||
2010716309,
|
2016711994,
|
||||||
2026893641,
|
2034765641,
|
||||||
2082471938,
|
2082471938,
|
||||||
53006051,
|
53006051,
|
||||||
60345635,
|
60345635,
|
||||||
|
|
@ -1776,54 +1772,54 @@ public final class AttributeName
|
||||||
1716623661,
|
1716623661,
|
||||||
1731048742,
|
1731048742,
|
||||||
1739583824,
|
1739583824,
|
||||||
1747295467,
|
1747309881,
|
||||||
1747906667,
|
1748021284,
|
||||||
1748971848,
|
1749350104,
|
||||||
1751755561,
|
1753049109,
|
||||||
1754579720,
|
1754612424,
|
||||||
1754698327,
|
1754794646,
|
||||||
1754899031,
|
1754927689,
|
||||||
1756360955,
|
1756704824,
|
||||||
1756889417,
|
1757421892,
|
||||||
1773606972,
|
1780879045,
|
||||||
1785053243,
|
1786622296,
|
||||||
1787365531,
|
1788842244,
|
||||||
1803561214,
|
1804054854,
|
||||||
1805715690,
|
1814517574,
|
||||||
1816104145,
|
1816178925,
|
||||||
1823574314,
|
1823829083,
|
||||||
1848600826,
|
1854285018,
|
||||||
1854497001,
|
1854497008,
|
||||||
1867462756,
|
1871251689,
|
||||||
1874270021,
|
1874788501,
|
||||||
1884295780,
|
1889569526,
|
||||||
1898415413,
|
1900544002,
|
||||||
1905628916,
|
1905754853,
|
||||||
1906423097,
|
1907701479,
|
||||||
1910441627,
|
1910441773,
|
||||||
1915025672,
|
1915341049,
|
||||||
1916286197,
|
1917295176,
|
||||||
1921977416,
|
1922400908,
|
||||||
1922607670,
|
1922665179,
|
||||||
1923088386,
|
1924443742,
|
||||||
1924629705,
|
1924773438,
|
||||||
1933369607,
|
1934917290,
|
||||||
1939976792,
|
1941286708,
|
||||||
1941550652,
|
1943317364,
|
||||||
1966442279,
|
1972151670,
|
||||||
1972904518,
|
1972908839,
|
||||||
1975062341,
|
1982254612,
|
||||||
1983398182,
|
1983432389,
|
||||||
1988784439,
|
1989522022,
|
||||||
1991625270,
|
1993343287,
|
||||||
2000752725,
|
2001527900,
|
||||||
2001710298,
|
2001732764,
|
||||||
2004846654,
|
2005342360,
|
||||||
2007021895,
|
2007064819,
|
||||||
2009079867,
|
2009231684,
|
||||||
2016810187,
|
2017010843,
|
||||||
2024647008,
|
2024794274,
|
||||||
2060474743,
|
2065694722,
|
||||||
2081423362,
|
2081423362,
|
||||||
2089811970,
|
2089811970,
|
||||||
52488851,
|
52488851,
|
||||||
|
|
@ -1853,103 +1849,103 @@ public final class AttributeName
|
||||||
1723336432,
|
1723336432,
|
||||||
1733874289,
|
1733874289,
|
||||||
1736416327,
|
1736416327,
|
||||||
1739927860,
|
1740096054,
|
||||||
1740222216,
|
1747295467,
|
||||||
1747309881,
|
1747479606,
|
||||||
1747800157,
|
1747906667,
|
||||||
1748021284,
|
1748503880,
|
||||||
1748566068,
|
1748971848,
|
||||||
1749350104,
|
1749549708,
|
||||||
1751507685,
|
1751755561,
|
||||||
1753049109,
|
1753550036,
|
||||||
1754434872,
|
1754579720,
|
||||||
1754612424,
|
1754644293,
|
||||||
1754647074,
|
1754698327,
|
||||||
1754794646,
|
1754835516,
|
||||||
1754860061,
|
1754899031,
|
||||||
1754927689,
|
1756147974,
|
||||||
1756219733,
|
1756360955,
|
||||||
1756704824,
|
1756762256,
|
||||||
1756836998,
|
1756889417,
|
||||||
1757421892,
|
1767725700,
|
||||||
1771569964,
|
1773606972,
|
||||||
1780879045,
|
1781007934,
|
||||||
1784574102,
|
1785053243,
|
||||||
1786622296,
|
1786775671,
|
||||||
1786851500,
|
1787365531,
|
||||||
1788842244,
|
1791068279,
|
||||||
1797886599,
|
1803561214,
|
||||||
1804054854,
|
1804081401,
|
||||||
1804405895,
|
1805715690,
|
||||||
1814517574,
|
1814560070,
|
||||||
1814656840,
|
1816104145,
|
||||||
1816178925,
|
1820727381,
|
||||||
1821958888,
|
1823574314,
|
||||||
1823829083,
|
1824159037,
|
||||||
1825437894,
|
1848600826,
|
||||||
1854285018,
|
1854366938,
|
||||||
1854466380,
|
1854497001,
|
||||||
1854497008,
|
1865910331,
|
||||||
1866496199,
|
1867462756,
|
||||||
1871251689,
|
1872343590,
|
||||||
1873656984,
|
1874270021,
|
||||||
1874788501,
|
1884079398,
|
||||||
1884246821,
|
1884295780,
|
||||||
1889569526,
|
1890996553,
|
||||||
1891937366,
|
1898415413,
|
||||||
1900544002,
|
1903612236,
|
||||||
1903759600,
|
1905628916,
|
||||||
1905754853,
|
1906408542,
|
||||||
1906419001,
|
1906423097,
|
||||||
1907701479,
|
1908462185,
|
||||||
1909819252,
|
1910441627,
|
||||||
1910441773,
|
1910503637,
|
||||||
1910527802,
|
1915025672,
|
||||||
1915341049,
|
1915757815,
|
||||||
1916247343,
|
1916286197,
|
||||||
1917295176,
|
1917857531,
|
||||||
1921061206,
|
1921977416,
|
||||||
1922400908,
|
1922413307,
|
||||||
1922566877,
|
1922607670,
|
||||||
1922665179,
|
1922677495,
|
||||||
1922679610,
|
1923088386,
|
||||||
1924443742,
|
1924517489,
|
||||||
1924583073,
|
1924629705,
|
||||||
1924773438,
|
1932959284,
|
||||||
1933123337,
|
1933369607,
|
||||||
1934917290,
|
1934970504,
|
||||||
1937336473,
|
1939976792,
|
||||||
1941286708,
|
1941435445,
|
||||||
1941440197,
|
1941550652,
|
||||||
1943317364,
|
1965512429,
|
||||||
1966384692,
|
1966442279,
|
||||||
1972151670,
|
1972656710,
|
||||||
1972744954,
|
1972904518,
|
||||||
1972908839,
|
1972922984,
|
||||||
1972996699,
|
1975062341,
|
||||||
1982254612,
|
1983157559,
|
||||||
1983290011,
|
1983398182,
|
||||||
1983432389,
|
1984430082,
|
||||||
1987422362,
|
1988784439,
|
||||||
1989522022,
|
1990107683,
|
||||||
1991220282,
|
1991625270,
|
||||||
1993343287,
|
2000096287,
|
||||||
2000160071,
|
2000752725,
|
||||||
2001527900,
|
2001634458,
|
||||||
2001669449,
|
2001710298,
|
||||||
2001732764,
|
2001826027,
|
||||||
2001898809,
|
2004846654,
|
||||||
2005342360,
|
2006459190,
|
||||||
2006824246,
|
2007021895,
|
||||||
2007064819,
|
2008401563,
|
||||||
2009041198,
|
2009079867,
|
||||||
2009231684,
|
2010716309,
|
||||||
2016711994,
|
2016810187,
|
||||||
2017010843,
|
2019887833,
|
||||||
2023342821,
|
2024647008,
|
||||||
2024794274,
|
2026893641,
|
||||||
2034765641,
|
2060474743,
|
||||||
2065694722,
|
2066743298,
|
||||||
2075005220,
|
2075005220,
|
||||||
2081947650,
|
2081947650,
|
||||||
2083520514,
|
2083520514,
|
||||||
|
|
@ -2008,9 +2004,8 @@ public final class AttributeName
|
||||||
1733919469,
|
1733919469,
|
||||||
1734404167,
|
1734404167,
|
||||||
1739561208,
|
1739561208,
|
||||||
1739914974,
|
1739927860,
|
||||||
1740096054,
|
1740119884,
|
||||||
1740130375,
|
|
||||||
1742183484,
|
1742183484,
|
||||||
1747299630,
|
1747299630,
|
||||||
1747446838,
|
1747446838,
|
||||||
|
|
@ -2201,6 +2196,5 @@ public final class AttributeName
|
||||||
2026975253,
|
2026975253,
|
||||||
2060302634,
|
2060302634,
|
||||||
2065170434,
|
2065170434,
|
||||||
2066743298,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -434,8 +434,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
||||||
|
|
||||||
private boolean forceNoQuirks = false;
|
private boolean forceNoQuirks = false;
|
||||||
|
|
||||||
private boolean allowDeclarativeShadowRoots = false;
|
|
||||||
|
|
||||||
// [NOCPP[
|
// [NOCPP[
|
||||||
|
|
||||||
private boolean reportingDoctype = true;
|
private boolean reportingDoctype = true;
|
||||||
|
|
@ -2960,20 +2958,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
||||||
|| (("http://www.w3.org/1998/Math/MathML" == ns) && (stackNode.getGroup() == MI_MO_MN_MS_MTEXT));
|
|| (("http://www.w3.org/1998/Math/MathML" == ns) && (stackNode.getGroup() == MI_MO_MN_MS_MTEXT));
|
||||||
}
|
}
|
||||||
|
|
||||||
private T getDeclarativeShadowRoot(T currentNode, T templateNode, HtmlAttributes attributes) {
|
|
||||||
if (!isAllowDeclarativeShadowRoots()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
String shadowRootMode = attributes.getValue(AttributeName.SHADOWROOTMODE);
|
|
||||||
if (shadowRootMode == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean shadowRootDelegatesFocus = attributes.contains(AttributeName.SHADOWROOTDELEGATESFOCUS);
|
|
||||||
return getShadowRootFromHost(currentNode, templateNode, shadowRootMode, shadowRootDelegatesFocus);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -5318,18 +5302,10 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
||||||
T elt = createElement("http://www.w3.org/1999/xhtml", elementName.getName(), attributes, currentNode
|
T elt = createElement("http://www.w3.org/1999/xhtml", elementName.getName(), attributes, currentNode
|
||||||
// CPPONLY: , htmlCreator(elementName.getHtmlCreator())
|
// CPPONLY: , htmlCreator(elementName.getHtmlCreator())
|
||||||
);
|
);
|
||||||
|
appendElement(elt, currentNode);
|
||||||
if (ElementName.TEMPLATE == elementName) {
|
if (ElementName.TEMPLATE == elementName) {
|
||||||
T root = getDeclarativeShadowRoot(currentNode, elt, attributes);
|
|
||||||
if (root != null) {
|
|
||||||
setDocumentFragmentForTemplate(elt, root);
|
|
||||||
elt = root;
|
|
||||||
} else {
|
|
||||||
appendElement(elt, currentNode);
|
|
||||||
elt = getDocumentFragmentForTemplate(elt);
|
elt = getDocumentFragmentForTemplate(elt);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
appendElement(elt, currentNode);
|
|
||||||
}
|
|
||||||
StackNode<T> node = createStackNode(elementName, elt
|
StackNode<T> node = createStackNode(elementName, elt
|
||||||
// [NOCPP[
|
// [NOCPP[
|
||||||
, errorHandler == null ? null : new TaintableLocatorImpl(tokenizer)
|
, errorHandler == null ? null : new TaintableLocatorImpl(tokenizer)
|
||||||
|
|
@ -5415,13 +5391,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDocumentFragmentForTemplate(T template, T fragment) {
|
|
||||||
}
|
|
||||||
|
|
||||||
T getShadowRootFromHost(T host, T template, String shadowRootMode, boolean shadowRootDelegatesFocus) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
T getFormPointerForContext(T context) {
|
T getFormPointerForContext(T context) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -5540,7 +5509,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
||||||
} else {
|
} else {
|
||||||
T currentNode = nodeFromStackWithBlinkCompat(currentPtr);
|
T currentNode = nodeFromStackWithBlinkCompat(currentPtr);
|
||||||
elt = createElement("http://www.w3.org/1999/xhtml", name,
|
elt = createElement("http://www.w3.org/1999/xhtml", name,
|
||||||
|
|
||||||
attributes, formOwner, currentNode
|
attributes, formOwner, currentNode
|
||||||
// CPPONLY: , htmlCreator(elementName.getHtmlCreator())
|
// CPPONLY: , htmlCreator(elementName.getHtmlCreator())
|
||||||
);
|
);
|
||||||
|
|
@ -5925,14 +5893,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
|
||||||
this.setForceNoQuirks(isSrcdocDocument);
|
this.setForceNoQuirks(isSrcdocDocument);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAllowDeclarativeShadowRoots() {
|
|
||||||
return allowDeclarativeShadowRoots;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAllowDeclarativeShadowRoots(boolean allow) {
|
|
||||||
allowDeclarativeShadowRoots = allow;
|
|
||||||
}
|
|
||||||
|
|
||||||
// [NOCPP[
|
// [NOCPP[
|
||||||
|
|
||||||
public void setNamePolicy(XmlViolationPolicy namePolicy) {
|
public void setNamePolicy(XmlViolationPolicy namePolicy) {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -281,12 +281,10 @@ class nsHtml5AttributeName {
|
||||||
static nsHtml5AttributeName* ATTR_LOADING;
|
static nsHtml5AttributeName* ATTR_LOADING;
|
||||||
static nsHtml5AttributeName* ATTR_READONLY;
|
static nsHtml5AttributeName* ATTR_READONLY;
|
||||||
static nsHtml5AttributeName* ATTR_RENDERING_INTENT;
|
static nsHtml5AttributeName* ATTR_RENDERING_INTENT;
|
||||||
static nsHtml5AttributeName* ATTR_SHADOWROOTMODE;
|
|
||||||
static nsHtml5AttributeName* ATTR_SEED;
|
static nsHtml5AttributeName* ATTR_SEED;
|
||||||
static nsHtml5AttributeName* ATTR_SRCDOC;
|
static nsHtml5AttributeName* ATTR_SRCDOC;
|
||||||
static nsHtml5AttributeName* ATTR_STDDEVIATION;
|
static nsHtml5AttributeName* ATTR_STDDEVIATION;
|
||||||
static nsHtml5AttributeName* ATTR_SANDBOX;
|
static nsHtml5AttributeName* ATTR_SANDBOX;
|
||||||
static nsHtml5AttributeName* ATTR_SHADOWROOTDELEGATESFOCUS;
|
|
||||||
static nsHtml5AttributeName* ATTR_WORD_SPACING;
|
static nsHtml5AttributeName* ATTR_WORD_SPACING;
|
||||||
static nsHtml5AttributeName* ATTR_ACCENTUNDER;
|
static nsHtml5AttributeName* ATTR_ACCENTUNDER;
|
||||||
static nsHtml5AttributeName* ATTR_ACCEPT_CHARSET;
|
static nsHtml5AttributeName* ATTR_ACCEPT_CHARSET;
|
||||||
|
|
|
||||||
|
|
@ -678,8 +678,6 @@ void nsHtml5Parser::StartTokenizer(bool aScriptingEnabled) {
|
||||||
|
|
||||||
mTreeBuilder->SetPreventScriptExecution(!aScriptingEnabled);
|
mTreeBuilder->SetPreventScriptExecution(!aScriptingEnabled);
|
||||||
mTreeBuilder->setScriptingEnabled(aScriptingEnabled);
|
mTreeBuilder->setScriptingEnabled(aScriptingEnabled);
|
||||||
mTreeBuilder->setAllowDeclarativeShadowRoots(
|
|
||||||
mExecutor->GetDocument()->AllowsDeclarativeShadowRoots());
|
|
||||||
mTokenizer->start();
|
mTokenizer->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1125,8 +1125,6 @@ nsresult nsHtml5StreamParser::OnStartRequest(nsIRequest* aRequest) {
|
||||||
mTreeBuilder->setScriptingEnabled(scriptingEnabled);
|
mTreeBuilder->setScriptingEnabled(scriptingEnabled);
|
||||||
mTreeBuilder->SetPreventScriptExecution(
|
mTreeBuilder->SetPreventScriptExecution(
|
||||||
!((mMode == NORMAL) && scriptingEnabled));
|
!((mMode == NORMAL) && scriptingEnabled));
|
||||||
mTreeBuilder->setAllowDeclarativeShadowRoots(
|
|
||||||
mExecutor->GetDocument()->AllowsDeclarativeShadowRoots());
|
|
||||||
mTokenizer->start();
|
mTokenizer->start();
|
||||||
mExecutor->Start();
|
mExecutor->Start();
|
||||||
mExecutor->StartReadingFromStage();
|
mExecutor->StartReadingFromStage();
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,12 @@ nsHtml5StringParser::nsHtml5StringParser()
|
||||||
|
|
||||||
nsHtml5StringParser::~nsHtml5StringParser() {}
|
nsHtml5StringParser::~nsHtml5StringParser() {}
|
||||||
|
|
||||||
nsresult nsHtml5StringParser::ParseFragment(
|
nsresult nsHtml5StringParser::ParseFragment(const nsAString& aSourceBuffer,
|
||||||
const nsAString& aSourceBuffer, nsIContent* aTargetNode,
|
nsIContent* aTargetNode,
|
||||||
nsAtom* aContextLocalName, int32_t aContextNamespace, bool aQuirks,
|
nsAtom* aContextLocalName,
|
||||||
bool aPreventScriptExecution, bool aAllowDeclarativeShadowRoots) {
|
int32_t aContextNamespace,
|
||||||
|
bool aQuirks,
|
||||||
|
bool aPreventScriptExecution) {
|
||||||
NS_ENSURE_TRUE(aSourceBuffer.Length() <= INT32_MAX, NS_ERROR_OUT_OF_MEMORY);
|
NS_ENSURE_TRUE(aSourceBuffer.Length() <= INT32_MAX, NS_ERROR_OUT_OF_MEMORY);
|
||||||
|
|
||||||
Document* doc = aTargetNode->OwnerDoc();
|
Document* doc = aTargetNode->OwnerDoc();
|
||||||
|
|
@ -50,7 +52,7 @@ nsresult nsHtml5StringParser::ParseFragment(
|
||||||
|
|
||||||
mTreeBuilder->SetPreventScriptExecution(aPreventScriptExecution);
|
mTreeBuilder->SetPreventScriptExecution(aPreventScriptExecution);
|
||||||
|
|
||||||
return Tokenize(aSourceBuffer, doc, true, aAllowDeclarativeShadowRoots);
|
return Tokenize(aSourceBuffer, doc, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsHtml5StringParser::ParseDocument(
|
nsresult nsHtml5StringParser::ParseDocument(
|
||||||
|
|
@ -65,14 +67,12 @@ nsresult nsHtml5StringParser::ParseDocument(
|
||||||
mTreeBuilder->SetPreventScriptExecution(true);
|
mTreeBuilder->SetPreventScriptExecution(true);
|
||||||
|
|
||||||
return Tokenize(aSourceBuffer, aTargetDoc,
|
return Tokenize(aSourceBuffer, aTargetDoc,
|
||||||
aScriptingEnabledForNoscriptParsing,
|
aScriptingEnabledForNoscriptParsing);
|
||||||
aTargetDoc->AllowsDeclarativeShadowRoots());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsHtml5StringParser::Tokenize(const nsAString& aSourceBuffer,
|
nsresult nsHtml5StringParser::Tokenize(
|
||||||
Document* aDocument,
|
const nsAString& aSourceBuffer, Document* aDocument,
|
||||||
bool aScriptingEnabledForNoscriptParsing,
|
bool aScriptingEnabledForNoscriptParsing) {
|
||||||
bool aDeclarativeShadowRootsAllowed) {
|
|
||||||
nsIURI* uri = aDocument->GetDocumentURI();
|
nsIURI* uri = aDocument->GetDocumentURI();
|
||||||
|
|
||||||
mBuilder->Init(aDocument, uri, nullptr, nullptr);
|
mBuilder->Init(aDocument, uri, nullptr, nullptr);
|
||||||
|
|
@ -85,7 +85,6 @@ nsresult nsHtml5StringParser::Tokenize(const nsAString& aSourceBuffer,
|
||||||
|
|
||||||
mTreeBuilder->setScriptingEnabled(aScriptingEnabledForNoscriptParsing);
|
mTreeBuilder->setScriptingEnabled(aScriptingEnabledForNoscriptParsing);
|
||||||
mTreeBuilder->setIsSrcdocDocument(aDocument->IsSrcdocDocument());
|
mTreeBuilder->setIsSrcdocDocument(aDocument->IsSrcdocDocument());
|
||||||
mTreeBuilder->setAllowDeclarativeShadowRoots(aDeclarativeShadowRootsAllowed);
|
|
||||||
mBuilder->Start();
|
mBuilder->Start();
|
||||||
mTokenizer->start();
|
mTokenizer->start();
|
||||||
if (!aSourceBuffer.IsEmpty()) {
|
if (!aSourceBuffer.IsEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -41,14 +41,11 @@ class nsHtml5StringParser : public nsParserBase {
|
||||||
* @param aPreventScriptExecution true to prevent scripts from executing;
|
* @param aPreventScriptExecution true to prevent scripts from executing;
|
||||||
* don't set to false when parsing into a target node that has been bound
|
* don't set to false when parsing into a target node that has been bound
|
||||||
* to tree.
|
* to tree.
|
||||||
* @param aAllowDeclarativeShadowRoots allow the creation of declarative
|
|
||||||
* shadow roots.
|
|
||||||
*/
|
*/
|
||||||
nsresult ParseFragment(const nsAString& aSourceBuffer,
|
nsresult ParseFragment(const nsAString& aSourceBuffer,
|
||||||
nsIContent* aTargetNode, nsAtom* aContextLocalName,
|
nsIContent* aTargetNode, nsAtom* aContextLocalName,
|
||||||
int32_t aContextNamespace, bool aQuirks,
|
int32_t aContextNamespace, bool aQuirks,
|
||||||
bool aPreventScriptExecution,
|
bool aPreventScriptExecution);
|
||||||
bool aAllowDeclarativeShadowRoots);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse an entire HTML document from a source string.
|
* Parse an entire HTML document from a source string.
|
||||||
|
|
@ -64,8 +61,7 @@ class nsHtml5StringParser : public nsParserBase {
|
||||||
|
|
||||||
nsresult Tokenize(const nsAString& aSourceBuffer,
|
nsresult Tokenize(const nsAString& aSourceBuffer,
|
||||||
mozilla::dom::Document* aDocument,
|
mozilla::dom::Document* aDocument,
|
||||||
bool aScriptingEnabledForNoscriptParsing,
|
bool aScriptingEnabledForNoscriptParsing);
|
||||||
bool aDeclarativeShadowRootsAllowed);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The tree operation executor
|
* The tree operation executor
|
||||||
|
|
|
||||||
|
|
@ -2093,23 +2093,6 @@ bool nsHtml5TreeBuilder::isSpecialParentInForeign(nsHtml5StackNode* stackNode) {
|
||||||
(stackNode->getGroup() == MI_MO_MN_MS_MTEXT));
|
(stackNode->getGroup() == MI_MO_MN_MS_MTEXT));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIContentHandle* nsHtml5TreeBuilder::getDeclarativeShadowRoot(
|
|
||||||
nsIContentHandle* currentNode, nsIContentHandle* templateNode,
|
|
||||||
nsHtml5HtmlAttributes* attributes) {
|
|
||||||
if (!isAllowDeclarativeShadowRoots()) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
nsHtml5String shadowRootMode =
|
|
||||||
attributes->getValue(nsHtml5AttributeName::ATTR_SHADOWROOTMODE);
|
|
||||||
if (!shadowRootMode) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
bool shadowRootDelegatesFocus =
|
|
||||||
attributes->contains(nsHtml5AttributeName::ATTR_SHADOWROOTDELEGATESFOCUS);
|
|
||||||
return getShadowRootFromHost(currentNode, templateNode, shadowRootMode,
|
|
||||||
shadowRootDelegatesFocus);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsHtml5String nsHtml5TreeBuilder::extractCharsetFromContent(
|
nsHtml5String nsHtml5TreeBuilder::extractCharsetFromContent(
|
||||||
nsHtml5String attributeValue, nsHtml5TreeBuilder* tb) {
|
nsHtml5String attributeValue, nsHtml5TreeBuilder* tb) {
|
||||||
int32_t charsetState = CHARSET_INITIAL;
|
int32_t charsetState = CHARSET_INITIAL;
|
||||||
|
|
@ -4235,19 +4218,10 @@ void nsHtml5TreeBuilder::appendToCurrentNodeAndPushElement(
|
||||||
nsIContentHandle* elt =
|
nsIContentHandle* elt =
|
||||||
createElement(kNameSpaceID_XHTML, elementName->getName(), attributes,
|
createElement(kNameSpaceID_XHTML, elementName->getName(), attributes,
|
||||||
currentNode, htmlCreator(elementName->getHtmlCreator()));
|
currentNode, htmlCreator(elementName->getHtmlCreator()));
|
||||||
|
appendElement(elt, currentNode);
|
||||||
if (nsHtml5ElementName::ELT_TEMPLATE == elementName) {
|
if (nsHtml5ElementName::ELT_TEMPLATE == elementName) {
|
||||||
nsIContentHandle* root =
|
|
||||||
getDeclarativeShadowRoot(currentNode, elt, attributes);
|
|
||||||
if (root) {
|
|
||||||
setDocumentFragmentForTemplate(elt, root);
|
|
||||||
elt = root;
|
|
||||||
} else {
|
|
||||||
appendElement(elt, currentNode);
|
|
||||||
elt = getDocumentFragmentForTemplate(elt);
|
elt = getDocumentFragmentForTemplate(elt);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
appendElement(elt, currentNode);
|
|
||||||
}
|
|
||||||
nsHtml5StackNode* node = createStackNode(elementName, elt);
|
nsHtml5StackNode* node = createStackNode(elementName, elt);
|
||||||
push(node);
|
push(node);
|
||||||
}
|
}
|
||||||
|
|
@ -4508,14 +4482,6 @@ void nsHtml5TreeBuilder::setIsSrcdocDocument(bool isSrcdocDocument) {
|
||||||
this->setForceNoQuirks(isSrcdocDocument);
|
this->setForceNoQuirks(isSrcdocDocument);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nsHtml5TreeBuilder::isAllowDeclarativeShadowRoots() {
|
|
||||||
return allowDeclarativeShadowRoots;
|
|
||||||
}
|
|
||||||
|
|
||||||
void nsHtml5TreeBuilder::setAllowDeclarativeShadowRoots(bool allow) {
|
|
||||||
allowDeclarativeShadowRoots = allow;
|
|
||||||
}
|
|
||||||
|
|
||||||
void nsHtml5TreeBuilder::flushCharacters() {
|
void nsHtml5TreeBuilder::flushCharacters() {
|
||||||
if (charBufferLen > 0) {
|
if (charBufferLen > 0) {
|
||||||
if ((mode == IN_TABLE || mode == IN_TABLE_BODY || mode == IN_ROW) &&
|
if ((mode == IN_TABLE || mode == IN_TABLE_BODY || mode == IN_ROW) &&
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,6 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState {
|
||||||
private:
|
private:
|
||||||
bool quirks;
|
bool quirks;
|
||||||
bool forceNoQuirks;
|
bool forceNoQuirks;
|
||||||
bool allowDeclarativeShadowRoots;
|
|
||||||
inline nsHtml5ContentCreatorFunction htmlCreator(
|
inline nsHtml5ContentCreatorFunction htmlCreator(
|
||||||
mozilla::dom::HTMLContentCreatorFunction htmlCreator) {
|
mozilla::dom::HTMLContentCreatorFunction htmlCreator) {
|
||||||
nsHtml5ContentCreatorFunction creator;
|
nsHtml5ContentCreatorFunction creator;
|
||||||
|
|
@ -354,9 +353,6 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState {
|
||||||
bool isTemplateContents();
|
bool isTemplateContents();
|
||||||
bool isTemplateModeStackEmpty();
|
bool isTemplateModeStackEmpty();
|
||||||
bool isSpecialParentInForeign(nsHtml5StackNode* stackNode);
|
bool isSpecialParentInForeign(nsHtml5StackNode* stackNode);
|
||||||
nsIContentHandle* getDeclarativeShadowRoot(nsIContentHandle* currentNode,
|
|
||||||
nsIContentHandle* templateNode,
|
|
||||||
nsHtml5HtmlAttributes* attributes);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static nsHtml5String extractCharsetFromContent(nsHtml5String attributeValue,
|
static nsHtml5String extractCharsetFromContent(nsHtml5String attributeValue,
|
||||||
|
|
@ -560,8 +556,6 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState {
|
||||||
void setScriptingEnabled(bool scriptingEnabled);
|
void setScriptingEnabled(bool scriptingEnabled);
|
||||||
void setForceNoQuirks(bool forceNoQuirks);
|
void setForceNoQuirks(bool forceNoQuirks);
|
||||||
void setIsSrcdocDocument(bool isSrcdocDocument);
|
void setIsSrcdocDocument(bool isSrcdocDocument);
|
||||||
bool isAllowDeclarativeShadowRoots();
|
|
||||||
void setAllowDeclarativeShadowRoots(bool allow);
|
|
||||||
void flushCharacters();
|
void flushCharacters();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,9 @@
|
||||||
#include "ErrorList.h"
|
#include "ErrorList.h"
|
||||||
#include "nsError.h"
|
#include "nsError.h"
|
||||||
#include "nsHtml5AttributeName.h"
|
#include "nsHtml5AttributeName.h"
|
||||||
#include "nsHtml5HtmlAttributes.h"
|
|
||||||
#include "nsHtml5String.h"
|
#include "nsHtml5String.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "mozilla/dom/FetchPriority.h"
|
#include "mozilla/dom/FetchPriority.h"
|
||||||
#include "mozilla/dom/ShadowRoot.h"
|
|
||||||
#include "mozilla/dom/ShadowRootBinding.h"
|
|
||||||
#include "mozilla/CheckedInt.h"
|
#include "mozilla/CheckedInt.h"
|
||||||
#include "mozilla/Likely.h"
|
#include "mozilla/Likely.h"
|
||||||
#include "mozilla/StaticPrefs_dom.h"
|
#include "mozilla/StaticPrefs_dom.h"
|
||||||
|
|
@ -1639,53 +1636,6 @@ nsIContentHandle* nsHtml5TreeBuilder::getDocumentFragmentForTemplate(
|
||||||
return fragHandle;
|
return fragHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsHtml5TreeBuilder::setDocumentFragmentForTemplate(
|
|
||||||
nsIContentHandle* aTemplate, nsIContentHandle* aFragment) {
|
|
||||||
if (mBuilder) {
|
|
||||||
nsHtml5TreeOperation::SetDocumentFragmentForTemplate(
|
|
||||||
static_cast<nsIContent*>(aTemplate),
|
|
||||||
static_cast<nsIContent*>(aFragment));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement(mozilla::fallible);
|
|
||||||
if (MOZ_UNLIKELY(!treeOp)) {
|
|
||||||
MarkAsBrokenAndRequestSuspensionWithoutBuilder(NS_ERROR_OUT_OF_MEMORY);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
opSetDocumentFragmentForTemplate operation(aTemplate, aFragment);
|
|
||||||
treeOp->Init(mozilla::AsVariant(operation));
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIContentHandle* nsHtml5TreeBuilder::getShadowRootFromHost(
|
|
||||||
nsIContentHandle* aHost, nsIContentHandle* aTemplateNode,
|
|
||||||
nsHtml5String aShadowRootMode, bool aShadowRootDelegatesFocus) {
|
|
||||||
ShadowRootMode mode;
|
|
||||||
if (aShadowRootMode.LowerCaseEqualsASCII("open")) {
|
|
||||||
mode = ShadowRootMode::Open;
|
|
||||||
} else if (aShadowRootMode.LowerCaseEqualsASCII("closed")) {
|
|
||||||
mode = ShadowRootMode::Closed;
|
|
||||||
} else {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mBuilder) {
|
|
||||||
return nsContentUtils::AttachDeclarativeShadowRoot(
|
|
||||||
static_cast<nsIContent*>(aHost), mode, aShadowRootDelegatesFocus);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement(mozilla::fallible);
|
|
||||||
if (MOZ_UNLIKELY(!treeOp)) {
|
|
||||||
MarkAsBrokenAndRequestSuspensionWithoutBuilder(NS_ERROR_OUT_OF_MEMORY);
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
nsIContentHandle* fragHandle = AllocateContentHandle();
|
|
||||||
opGetShadowRootFromHost operation(aHost, fragHandle, aTemplateNode, mode,
|
|
||||||
aShadowRootDelegatesFocus);
|
|
||||||
treeOp->Init(mozilla::AsVariant(operation));
|
|
||||||
return fragHandle;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIContentHandle* nsHtml5TreeBuilder::getFormPointerForContext(
|
nsIContentHandle* nsHtml5TreeBuilder::getFormPointerForContext(
|
||||||
nsIContentHandle* aContext) {
|
nsIContentHandle* aContext) {
|
||||||
MOZ_ASSERT(mBuilder, "Must have builder.");
|
MOZ_ASSERT(mBuilder, "Must have builder.");
|
||||||
|
|
|
||||||
|
|
@ -58,13 +58,6 @@ bool mActive;
|
||||||
void documentMode(nsHtml5DocumentMode m);
|
void documentMode(nsHtml5DocumentMode m);
|
||||||
|
|
||||||
nsIContentHandle* getDocumentFragmentForTemplate(nsIContentHandle* aTemplate);
|
nsIContentHandle* getDocumentFragmentForTemplate(nsIContentHandle* aTemplate);
|
||||||
void setDocumentFragmentForTemplate(nsIContentHandle* aTemplate,
|
|
||||||
nsIContentHandle* aFragment);
|
|
||||||
|
|
||||||
nsIContentHandle* getShadowRootFromHost(nsIContentHandle* aHost,
|
|
||||||
nsIContentHandle* aTemplateNode,
|
|
||||||
nsHtml5String aShadowRootMode,
|
|
||||||
bool aShadowRootDelegatesFocus);
|
|
||||||
|
|
||||||
nsIContentHandle* getFormPointerForContext(nsIContentHandle* aContext);
|
nsIContentHandle* getFormPointerForContext(nsIContentHandle* aContext);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
#include "mozilla/dom/Comment.h"
|
#include "mozilla/dom/Comment.h"
|
||||||
#include "mozilla/dom/CustomElementRegistry.h"
|
#include "mozilla/dom/CustomElementRegistry.h"
|
||||||
#include "mozilla/dom/DocGroup.h"
|
#include "mozilla/dom/DocGroup.h"
|
||||||
#include "mozilla/dom/DocumentFragment.h"
|
|
||||||
#include "mozilla/dom/DocumentType.h"
|
#include "mozilla/dom/DocumentType.h"
|
||||||
#include "mozilla/dom/Element.h"
|
#include "mozilla/dom/Element.h"
|
||||||
#include "mozilla/dom/LinkStyle.h"
|
#include "mozilla/dom/LinkStyle.h"
|
||||||
|
|
@ -19,14 +18,12 @@
|
||||||
#include "mozilla/dom/HTMLImageElement.h"
|
#include "mozilla/dom/HTMLImageElement.h"
|
||||||
#include "mozilla/dom/HTMLTemplateElement.h"
|
#include "mozilla/dom/HTMLTemplateElement.h"
|
||||||
#include "mozilla/dom/MutationObservers.h"
|
#include "mozilla/dom/MutationObservers.h"
|
||||||
#include "mozilla/dom/ShadowRoot.h"
|
|
||||||
#include "mozilla/dom/Text.h"
|
#include "mozilla/dom/Text.h"
|
||||||
#include "nsAttrName.h"
|
#include "nsAttrName.h"
|
||||||
#include "nsContentCreatorFunctions.h"
|
#include "nsContentCreatorFunctions.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsDocElementCreatedNotificationRunner.h"
|
#include "nsDocElementCreatedNotificationRunner.h"
|
||||||
#include "nsEscape.h"
|
#include "nsEscape.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
|
||||||
#include "nsHtml5AutoPauseUpdate.h"
|
#include "nsHtml5AutoPauseUpdate.h"
|
||||||
#include "nsHtml5DocumentMode.h"
|
#include "nsHtml5DocumentMode.h"
|
||||||
#include "nsHtml5HtmlAttributes.h"
|
#include "nsHtml5HtmlAttributes.h"
|
||||||
|
|
@ -138,10 +135,6 @@ nsHtml5TreeOperation::~nsHtml5TreeOperation() {
|
||||||
|
|
||||||
void operator()(const opGetDocumentFragmentForTemplate& aOperation) {}
|
void operator()(const opGetDocumentFragmentForTemplate& aOperation) {}
|
||||||
|
|
||||||
void operator()(const opSetDocumentFragmentForTemplate& aOperation) {}
|
|
||||||
|
|
||||||
void operator()(const opGetShadowRootFromHost& aOperation) {}
|
|
||||||
|
|
||||||
void operator()(const opGetFosterParent& aOperation) {}
|
void operator()(const opGetFosterParent& aOperation) {}
|
||||||
|
|
||||||
void operator()(const opMarkAsBroken& aOperation) {}
|
void operator()(const opMarkAsBroken& aOperation) {}
|
||||||
|
|
@ -701,12 +694,6 @@ nsIContent* nsHtml5TreeOperation::GetDocumentFragmentForTemplate(
|
||||||
return tempElem->Content();
|
return tempElem->Content();
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsHtml5TreeOperation::SetDocumentFragmentForTemplate(
|
|
||||||
nsIContent* aNode, nsIContent* aDocumentFragment) {
|
|
||||||
auto* tempElem = static_cast<HTMLTemplateElement*>(aNode);
|
|
||||||
tempElem->SetContent(static_cast<DocumentFragment*>(aDocumentFragment));
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIContent* nsHtml5TreeOperation::GetFosterParent(nsIContent* aTable,
|
nsIContent* nsHtml5TreeOperation::GetFosterParent(nsIContent* aTable,
|
||||||
nsIContent* aStackParent) {
|
nsIContent* aStackParent) {
|
||||||
nsIContent* tableParent = aTable->GetParent();
|
nsIContent* tableParent = aTable->GetParent();
|
||||||
|
|
@ -907,31 +894,6 @@ nsresult nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult operator()(const opSetDocumentFragmentForTemplate& aOperation) {
|
|
||||||
SetDocumentFragmentForTemplate(*aOperation.mTemplate,
|
|
||||||
*aOperation.mFragment);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult operator()(const opGetShadowRootFromHost& aOperation) {
|
|
||||||
nsIContent* root = nsContentUtils::AttachDeclarativeShadowRoot(
|
|
||||||
*aOperation.mHost, aOperation.mShadowRootMode,
|
|
||||||
aOperation.mShadowRootDelegatesFocus);
|
|
||||||
if (root) {
|
|
||||||
*aOperation.mFragHandle = root;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We failed to attach a new shadow root, so instead attach a template
|
|
||||||
// element and return its content.
|
|
||||||
nsHtml5TreeOperation::Append(*aOperation.mTemplateNode, *aOperation.mHost,
|
|
||||||
mBuilder);
|
|
||||||
*aOperation.mFragHandle =
|
|
||||||
static_cast<HTMLTemplateElement*>(*aOperation.mTemplateNode)
|
|
||||||
->Content();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult operator()(const opGetFosterParent& aOperation) {
|
nsresult operator()(const opGetFosterParent& aOperation) {
|
||||||
nsIContent* table = *(aOperation.mTable);
|
nsIContent* table = *(aOperation.mTable);
|
||||||
nsIContent* stackParent = *(aOperation.mStackParent);
|
nsIContent* stackParent = *(aOperation.mStackParent);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
#include "nsHtml5DocumentMode.h"
|
#include "nsHtml5DocumentMode.h"
|
||||||
#include "nsHtml5HtmlAttributes.h"
|
#include "nsHtml5HtmlAttributes.h"
|
||||||
#include "mozilla/dom/FromParser.h"
|
#include "mozilla/dom/FromParser.h"
|
||||||
#include "mozilla/dom/ShadowRootBinding.h"
|
|
||||||
#include "mozilla/NotNull.h"
|
#include "mozilla/NotNull.h"
|
||||||
#include "mozilla/Variant.h"
|
#include "mozilla/Variant.h"
|
||||||
#include "nsCharsetSource.h"
|
#include "nsCharsetSource.h"
|
||||||
|
|
@ -265,37 +264,6 @@ struct opGetDocumentFragmentForTemplate {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct opSetDocumentFragmentForTemplate {
|
|
||||||
nsIContent** mTemplate;
|
|
||||||
nsIContent** mFragment;
|
|
||||||
|
|
||||||
explicit opSetDocumentFragmentForTemplate(nsIContentHandle* aTemplate,
|
|
||||||
nsIContentHandle* aFragment) {
|
|
||||||
mTemplate = static_cast<nsIContent**>(aTemplate);
|
|
||||||
mFragment = static_cast<nsIContent**>(aFragment);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct opGetShadowRootFromHost {
|
|
||||||
nsIContent** mHost;
|
|
||||||
nsIContent** mFragHandle;
|
|
||||||
nsIContent** mTemplateNode;
|
|
||||||
mozilla::dom::ShadowRootMode mShadowRootMode;
|
|
||||||
bool mShadowRootDelegatesFocus;
|
|
||||||
|
|
||||||
explicit opGetShadowRootFromHost(nsIContentHandle* aHost,
|
|
||||||
nsIContentHandle* aFragHandle,
|
|
||||||
nsIContentHandle* aTemplateNode,
|
|
||||||
mozilla::dom::ShadowRootMode aShadowRootMode,
|
|
||||||
bool aShadowRootDelegatesFocus) {
|
|
||||||
mHost = static_cast<nsIContent**>(aHost);
|
|
||||||
mFragHandle = static_cast<nsIContent**>(aFragHandle);
|
|
||||||
mTemplateNode = static_cast<nsIContent**>(aTemplateNode);
|
|
||||||
mShadowRootMode = aShadowRootMode;
|
|
||||||
mShadowRootDelegatesFocus = aShadowRootDelegatesFocus;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct opGetFosterParent {
|
struct opGetFosterParent {
|
||||||
nsIContent** mTable;
|
nsIContent** mTable;
|
||||||
nsIContent** mStackParent;
|
nsIContent** mStackParent;
|
||||||
|
|
@ -524,8 +492,7 @@ typedef mozilla::Variant<
|
||||||
opCreateHTMLElement, opCreateSVGElement, opCreateMathMLElement,
|
opCreateHTMLElement, opCreateSVGElement, opCreateMathMLElement,
|
||||||
opSetFormElement, opAppendText, opFosterParentText, opAppendComment,
|
opSetFormElement, opAppendText, opFosterParentText, opAppendComment,
|
||||||
opAppendCommentToDocument, opAppendDoctypeToDocument,
|
opAppendCommentToDocument, opAppendDoctypeToDocument,
|
||||||
opGetDocumentFragmentForTemplate, opSetDocumentFragmentForTemplate,
|
opGetDocumentFragmentForTemplate, opGetFosterParent,
|
||||||
opGetShadowRootFromHost, opGetFosterParent,
|
|
||||||
// Gecko-specific on-pop ops
|
// Gecko-specific on-pop ops
|
||||||
opMarkAsBroken, opRunScriptThatMayDocumentWriteOrBlock,
|
opMarkAsBroken, opRunScriptThatMayDocumentWriteOrBlock,
|
||||||
opRunScriptThatCannotDocumentWriteOrBlock, opPreventScriptExecution,
|
opRunScriptThatCannotDocumentWriteOrBlock, opPreventScriptExecution,
|
||||||
|
|
@ -620,8 +587,6 @@ class nsHtml5TreeOperation final {
|
||||||
nsHtml5DocumentBuilder* aBuilder);
|
nsHtml5DocumentBuilder* aBuilder);
|
||||||
|
|
||||||
static nsIContent* GetDocumentFragmentForTemplate(nsIContent* aNode);
|
static nsIContent* GetDocumentFragmentForTemplate(nsIContent* aNode);
|
||||||
static void SetDocumentFragmentForTemplate(nsIContent* aNode,
|
|
||||||
nsIContent* aDocumentFragment);
|
|
||||||
|
|
||||||
static nsIContent* GetFosterParent(nsIContent* aTable,
|
static nsIContent* GetFosterParent(nsIContent* aTable,
|
||||||
nsIContent* aStackParent);
|
nsIContent* aStackParent);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
[part-pseudo.html]
|
||||||
|
expected: FAIL
|
||||||
|
|
@ -579,6 +579,12 @@ prefs: [dom.security.featurePolicy.experimental.enabled:true, dom.security.featu
|
||||||
[PopStateEvent interface: new PopStateEvent("popstate", { data: {} }) must inherit property "hasUAVisualTransition" with the proper type]
|
[PopStateEvent interface: new PopStateEvent("popstate", { data: {} }) must inherit property "hasUAVisualTransition" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Element interface: document.createElement("noscript") must inherit property "setHTMLUnsafe(DOMString)" with the proper type]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Element interface: calling setHTMLUnsafe(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
[CloseWatcher interface: existence and properties of interface object]
|
[CloseWatcher interface: existence and properties of interface object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
@ -612,6 +618,12 @@ prefs: [dom.security.featurePolicy.experimental.enabled:true, dom.security.featu
|
||||||
[CloseWatcher interface: attribute onclose]
|
[CloseWatcher interface: attribute onclose]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[ShadowRoot interface: operation setHTMLUnsafe(DOMString)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Element interface: operation setHTMLUnsafe(DOMString)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
||||||
[idlharness.https.html?include=(Document|Window)]
|
[idlharness.https.html?include=(Document|Window)]
|
||||||
[Window interface: window must inherit property "originAgentCluster" with the proper type]
|
[Window interface: window must inherit property "originAgentCluster" with the proper type]
|
||||||
|
|
@ -683,9 +695,18 @@ prefs: [dom.security.featurePolicy.experimental.enabled:true, dom.security.featu
|
||||||
[Window interface: attribute clientInformation]
|
[Window interface: attribute clientInformation]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Document interface: operation parseHTMLUnsafe(DOMString)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: calling parseHTMLUnsafe(DOMString) on iframe.contentDocument with too few arguments must throw TypeError]
|
[Document interface: calling parseHTMLUnsafe(DOMString) on iframe.contentDocument with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Document interface: calling parseHTMLUnsafe(DOMString) on new Document() with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Document interface: calling parseHTMLUnsafe(DOMString) on documentWithHandlers with too few arguments must throw TypeError]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
||||||
[idlharness.https.html?include=HTML.*]
|
[idlharness.https.html?include=HTML.*]
|
||||||
[HTMLVideoElement interface: attribute playsInline]
|
[HTMLVideoElement interface: attribute playsInline]
|
||||||
|
|
@ -792,3 +813,15 @@ prefs: [dom.security.featurePolicy.experimental.enabled:true, dom.security.featu
|
||||||
|
|
||||||
[HTMLDetailsElement interface: document.createElement("details") must inherit property "name" with the proper type]
|
[HTMLDetailsElement interface: document.createElement("details") must inherit property "name" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[HTMLTemplateElement interface: attribute shadowRootMode]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[HTMLTemplateElement interface: attribute shadowRootDelegatesFocus]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[HTMLTemplateElement interface: document.createElement("template") must inherit property "shadowRootMode" with the proper type]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[HTMLTemplateElement interface: document.createElement("template") must inherit property "shadowRootDelegatesFocus" with the proper type]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
[Element-setHTMLUnsafe-04.tentative.html]
|
[Element-setHTMLUnsafe-04.tentative.html]
|
||||||
prefs: [dom.webcomponents.shadowdom.declarative.enabled:true]
|
[setHTMLUnsafe should leave the removed children alone.]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,15 @@
|
||||||
[setHTMLUnsafe.tentative.html]
|
[setHTMLUnsafe.tentative.html]
|
||||||
prefs: [dom.webcomponents.shadowdom.declarative.enabled:true]
|
[Element: setHTMLUnsafe with no shadowdom.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Element: setHTMLUnsafe with shadowdom.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[ShadowRoot: setHTMLUnsafe with no shadowdom.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[ShadowRoot: setHTMLUnsafe with shadowdom.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[template.setHTMLUnsafe() should modify template content fragment rather than actual children.]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
prefs: [dom.webcomponents.shadowdom.declarative.enabled:true]
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,42 @@
|
||||||
|
[declarative-shadow-dom-basic.html]
|
||||||
|
[Declarative Shadow DOM: Basic test]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: Feature detection]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Shadowrootmode reflection]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: Fragment parser basic test]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: Invalid shadow root attribute]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: Closed shadow root attribute]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: Missing closing tag]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: delegates focus attribute]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: Multiple roots]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: template containing declarative shadow root]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: template containing (deeply nested) declarative shadow root]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: template containing a template containing declarative shadow root]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Declarative Shadow DOM: template containing declarative shadow root and UA shadow root]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Shadowrootmode reflection, setter]
|
||||||
|
expected: FAIL
|
||||||
|
|
@ -1,7 +1,18 @@
|
||||||
[declarative-shadow-dom-opt-in.html]
|
[declarative-shadow-dom-opt-in.html]
|
||||||
prefs: [dom.webcomponents.shadowdom.declarative.enabled:true]
|
[Non-fragment parsing needs no opt-in]
|
||||||
[DOMParser]
|
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[document.write disallowed on fresh document]
|
[document.write allowed from synchronous script loaded from main document]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[iframe]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[iframe, no sandbox]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[sandboxed iframe allows declarative Shadow DOM]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[iframe with no sandbox allows declarative Shadow DOM]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
[innerhtml-before-closing-tag.html]
|
||||||
|
expected: ERROR
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
[move-template-before-closing-tag.html]
|
||||||
|
[Moving the template node during parsing should attach to initial parent (content before observer)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Moving the template node during parsing should attach to initial parent (content after observer)]
|
||||||
|
expected: FAIL
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
[script-access.html]
|
||||||
|
expected: ERROR
|
||||||
|
|
@ -39,12 +39,8 @@ HTML_PARSER_ATOMS = [
|
||||||
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
||||||
Atom("rendering_intent", "rendering-intent"),
|
Atom("rendering_intent", "rendering-intent"),
|
||||||
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
||||||
Atom("shadowrootmode", "shadowrootmode"),
|
|
||||||
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
|
||||||
Atom("stddeviation", "stddeviation"),
|
Atom("stddeviation", "stddeviation"),
|
||||||
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
||||||
Atom("shadowrootdelegatesfocus", "shadowrootdelegatesfocus"),
|
|
||||||
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
|
||||||
Atom("basefrequency", "basefrequency"),
|
Atom("basefrequency", "basefrequency"),
|
||||||
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
# ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
|
||||||
Atom("baseprofile", "baseprofile"),
|
Atom("baseprofile", "baseprofile"),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue