Bug 1484690 - Move the enabled state to the sheet instead of sharing it. r=heycam

We share the inner object across sheets from the same URL, so what happens here
is that, once the sheet parses and loads, we call SetEnabled() on the first
sheet, which sets the inner bit, then calls ApplicableStateChanged.

That set actually turned the second sheet complete, so when inserting the sheet,
we think that the second sheet is already enabled, and thus in the author data,
and try to insert before it. Of course there's nothing there, so we panic.

We rely on calling SetEnabled() on all the sheets already to insert them in the
styleset / author data, so this makes it clearer and fixes the bug by moving the
state to each individual sheet.

Differential Revision: https://phabricator.services.mozilla.com/D3798

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2018-08-21 08:55:10 +00:00
Родитель bd36609f59
Коммит bbda2f1225
6 изменённых файлов: 143 добавлений и 388 удалений

Просмотреть файл

@ -37,8 +37,7 @@ StyleSheet::StyleSheet(css::SheetParsingMode aParsingMode,
, mOwningNode(nullptr)
, mOwnerRule(nullptr)
, mParsingMode(aParsingMode)
, mDisabled(false)
, mDirtyFlags(0)
, mState(static_cast<State>(0))
, mAssociationMode(NotOwnedByDocumentOrShadowRoot)
, mInner(new StyleSheetInfo(aCORSMode, aReferrerPolicy, aIntegrity, aParsingMode))
{
@ -56,8 +55,7 @@ StyleSheet::StyleSheet(const StyleSheet& aCopy,
, mOwningNode(aOwningNodeToUse)
, mOwnerRule(aOwnerRuleToUse)
, mParsingMode(aCopy.mParsingMode)
, mDisabled(aCopy.mDisabled)
, mDirtyFlags(aCopy.mDirtyFlags)
, mState(aCopy.mState)
// We only use this constructor during cloning. It's the cloner's
// responsibility to notify us if we end up being owned by a document.
, mAssociationMode(NotOwnedByDocumentOrShadowRoot)
@ -67,8 +65,8 @@ StyleSheet::StyleSheet(const StyleSheet& aCopy,
mInner->AddSheet(this);
if (HasForcedUniqueInner()) { // CSSOM's been there, force full copy now
NS_ASSERTION(mInner->mComplete,
"Why have rules been accessed on an incomplete sheet?");
MOZ_ASSERT(IsComplete(),
"Why have rules been accessed on an incomplete sheet?");
// FIXME: handle failure?
EnsureUniqueInner();
}
@ -234,20 +232,14 @@ StyleSheet::ParsingModeDOM()
return static_cast<mozilla::dom::CSSStyleSheetParsingMode>(mParsingMode);
}
bool
StyleSheet::IsComplete() const
{
return Inner().mComplete;
}
void
StyleSheet::SetComplete()
{
NS_ASSERTION(!HasForcedUniqueInner(),
"Can't complete a sheet that's already been forced "
"unique.");
Inner().mComplete = true;
if (!mDisabled) {
MOZ_ASSERT(!HasForcedUniqueInner(),
"Can't complete a sheet that's already been forced unique.");
MOZ_ASSERT(!IsComplete(), "Already complete?");
mState |= State::Complete;
if (!Disabled()) {
ApplicableStateChanged(true);
}
}
@ -268,14 +260,20 @@ StyleSheet::ApplicableStateChanged(bool aApplicable)
}
void
StyleSheet::SetEnabled(bool aEnabled)
StyleSheet::SetDisabled(bool aDisabled)
{
// Internal method, so callers must handle BeginUpdate/EndUpdate
bool oldDisabled = mDisabled;
mDisabled = !aEnabled;
if (aDisabled == Disabled()) {
return;
}
if (IsComplete() && oldDisabled != mDisabled) {
ApplicableStateChanged(!mDisabled);
if (aDisabled) {
mState |= State::Disabled;
} else {
mState &= ~State::Disabled;
}
if (IsComplete()) {
ApplicableStateChanged(!aDisabled);
}
}
@ -287,7 +285,6 @@ StyleSheetInfo::StyleSheetInfo(CORSMode aCORSMode,
, mCORSMode(aCORSMode)
, mReferrerPolicy(aReferrerPolicy)
, mIntegrity(aIntegrity)
, mComplete(false)
, mContents(Servo_StyleSheet_Empty(aParsingMode).Consume())
, mURLData(URLExtraData::Dummy())
#ifdef DEBUG
@ -308,7 +305,6 @@ StyleSheetInfo::StyleSheetInfo(StyleSheetInfo& aCopy, StyleSheet* aPrimarySheet)
, mCORSMode(aCopy.mCORSMode)
, mReferrerPolicy(aCopy.mReferrerPolicy)
, mIntegrity(aCopy.mIntegrity)
, mComplete(aCopy.mComplete)
, mFirstChild() // We don't rebuild the child because we're making a copy
// without children.
, mSourceMapURL(aCopy.mSourceMapURL)
@ -398,12 +394,6 @@ StyleSheet::GetType(nsAString& aType)
aType.AssignLiteral("text/css");
}
void
StyleSheet::SetDisabled(bool aDisabled)
{
SetEnabled(!aDisabled);
}
void
StyleSheet::GetHref(nsAString& aHref, ErrorResult& aRv)
{
@ -438,7 +428,7 @@ StyleSheet::GetTitle(nsAString& aTitle)
void
StyleSheet::WillDirty()
{
if (mInner->mComplete) {
if (IsComplete()) {
EnsureUniqueInner();
}
}
@ -463,7 +453,7 @@ StyleSheet::EnsureUniqueInner()
{
MOZ_ASSERT(mInner->mSheets.Length() != 0,
"unexpected number of outers");
mDirtyFlags |= FORCED_UNIQUE_INNER;
mState |= State::ForcedUniqueInner;
if (HasUniqueInner()) {
// already unique
@ -499,8 +489,7 @@ StyleSheet::AppendAllChildSheets(nsTArray<StyleSheet*>& aArray)
// WebIDL CSSStyleSheet API
dom::CSSRuleList*
StyleSheet::GetCssRules(nsIPrincipal& aSubjectPrincipal,
ErrorResult& aRv)
StyleSheet::GetCssRules(nsIPrincipal& aSubjectPrincipal, ErrorResult& aRv)
{
if (!AreRulesAvailable(aSubjectPrincipal, aRv)) {
return nullptr;
@ -620,7 +609,7 @@ StyleSheet::GetContainingShadow() const
void
StyleSheet::RuleAdded(css::Rule& aRule)
{
mDirtyFlags |= MODIFIED_RULES;
mState |= State::ModifiedRules;
NOTIFY(RuleAdded, (*this, aRule));
if (nsIDocument* doc = GetComposedDoc()) {
@ -631,7 +620,7 @@ StyleSheet::RuleAdded(css::Rule& aRule)
void
StyleSheet::RuleRemoved(css::Rule& aRule)
{
mDirtyFlags |= MODIFIED_RULES;
mState |= State::ModifiedRules;
NOTIFY(RuleRemoved, (*this, aRule));
if (nsIDocument* doc = GetComposedDoc()) {
@ -642,7 +631,7 @@ StyleSheet::RuleRemoved(css::Rule& aRule)
void
StyleSheet::RuleChanged(css::Rule* aRule)
{
mDirtyFlags |= MODIFIED_RULES;
mState |= State::ModifiedRules;
NOTIFY(RuleChanged, (*this, aRule));
if (nsIDocument* doc = GetComposedDoc()) {
@ -745,7 +734,7 @@ StyleSheet::SubjectSubsumesInnerPrincipal(nsIPrincipal& aSubjectPrincipal,
// That means we need a unique inner, of course. But we don't want to do that
// if we're not complete yet. Luckily, all the callers of this method throw
// anyway if not complete, so we can just do that here too.
if (!info.mComplete) {
if (!IsComplete()) {
aRv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
return;
}
@ -760,7 +749,7 @@ StyleSheet::AreRulesAvailable(nsIPrincipal& aSubjectPrincipal,
ErrorResult& aRv)
{
// Rules are not available on incomplete sheets.
if (!Inner().mComplete) {
if (!IsComplete()) {
aRv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
return false;
}
@ -1104,7 +1093,7 @@ StyleSheet::FinishParse()
nsresult
StyleSheet::ReparseSheet(const nsAString& aInput)
{
if (!mInner->mComplete) {
if (!IsComplete()) {
return NS_ERROR_DOM_INVALID_ACCESS_ERR;
}

Просмотреть файл

@ -53,6 +53,29 @@ class ShadowRoot;
class SRIMetadata;
} // namespace dom
enum class StyleSheetState : uint8_t
{
// Whether the sheet is disabled. Sheets can be made disabled via CSSOM, or
// via alternate links and such.
Disabled = 1 << 0,
// Whether the sheet is complete. The sheet is complete if it's finished
// loading. See StyleSheet::SetComplete.
Complete = 1 << 1,
// Whether we've forced a unique inner. StyleSheet objects share an 'inner'
// StyleSheetInfo object if they share URL, CORS mode, etc.
//
// See the Loader's `mCompleteSheets` and `mLoadingSheets`.
ForcedUniqueInner = 1 << 2,
// Whether this stylesheet has suffered any modification to the rules via
// CSSOM.
//
// FIXME(emilio): I think as of right now we also set this flag for normal
// @import rules, which looks very fishy.
ModifiedRules = 1 << 3,
};
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(StyleSheetState)
class StyleSheet final : public nsICSSLoaderObserver
, public nsWrapperCache
{
@ -64,6 +87,8 @@ class StyleSheet final : public nsICSSLoaderObserver
virtual ~StyleSheet();
using State = StyleSheetState;
public:
StyleSheet(css::SheetParsingMode aParsingMode,
CORSMode aCORSMode,
@ -149,19 +174,17 @@ public:
/**
* Whether the sheet is complete.
*/
bool IsComplete() const;
bool IsComplete() const
{
return bool(mState & State::Complete);
}
void SetComplete();
/**
* Set the stylesheet to be enabled. This may or may not make it
* applicable. Note that this WILL inform the sheet's document of
* its new applicable state if the state changes but WILL NOT call
* BeginUpdate() or EndUpdate() on the document -- calling those is
* the caller's responsibility. This allows use of SetEnabled when
* batched updates are desired. If you want updates handled for
* you, see SetDisabled().
*/
void SetEnabled(bool aEnabled);
void SetEnabled(bool aEnabled)
{
SetDisabled(!aEnabled);
}
// Whether the sheet is for an inline <style> element.
bool IsInline() const
@ -206,7 +229,7 @@ public:
*/
bool IsApplicable() const
{
return !mDisabled && Inner().mComplete;
return !Disabled() && IsComplete();
}
already_AddRefed<StyleSheet> Clone(StyleSheet* aCloneParent,
@ -216,17 +239,17 @@ public:
bool HasForcedUniqueInner() const
{
return mDirtyFlags & FORCED_UNIQUE_INNER;
return bool(mState & State::ForcedUniqueInner);
}
bool HasModifiedRules() const
{
return mDirtyFlags & MODIFIED_RULES;
return bool(mState & State::ModifiedRules);
}
void ClearModifiedRules()
{
mDirtyFlags &= ~MODIFIED_RULES;
mState &= ~State::ModifiedRules;
}
bool HasUniqueInner() const
@ -366,7 +389,10 @@ public:
}
void GetTitle(nsAString& aTitle);
dom::MediaList* Media();
bool Disabled() const { return mDisabled; }
bool Disabled() const
{
return bool(mState & State::Disabled);
}
void SetDisabled(bool aDisabled);
void GetSourceMapURL(nsAString& aTitle);
void SetSourceMapURL(const nsAString& aSourceMapURL);
@ -511,15 +537,12 @@ protected:
// mParsingMode controls access to nonstandard style constructs that
// are not safe for use on the public Web but necessary in UA sheets
// and/or useful in user sheets.
//
// FIXME(emilio): Given we store the parsed contents in the Inner, this should
// probably also move there.
css::SheetParsingMode mParsingMode;
bool mDisabled;
enum dirtyFlagAttributes {
FORCED_UNIQUE_INNER = 0x1,
MODIFIED_RULES = 0x2,
};
uint8_t mDirtyFlags; // has been modified
State mState;
// mAssociationMode determines whether mDocumentOrShadowRoot directly owns us
// (in the sense that if it's known-live then we're known-live).
@ -530,7 +553,7 @@ protected:
// Core information we get from parsed sheets, which are shared amongst
// StyleSheet clones.
//
// FIXME(emilio): Should be NonNull.
// Always nonnull until LastRelease().
StyleSheetInfo* mInner;
nsTArray<ServoStyleSet*> mStyleSets;

Просмотреть файл

@ -56,14 +56,13 @@ struct StyleSheetInfo final
// stored here.
ReferrerPolicy mReferrerPolicy;
dom::SRIMetadata mIntegrity;
bool mComplete;
// Pointer to start of linked list of child sheets. This is all fundamentally
// broken, because each of the child sheets has a unique parent... We can
// only hope (and currently this is the case) that any time page JS can get
// its hands on a child sheet that means we've already ensured unique infos
// throughout its parent chain and things are good.
RefPtr<StyleSheet> mFirstChild;
RefPtr<StyleSheet> mFirstChild;
AutoTArray<StyleSheet*, 8> mSheets;
// If a SourceMap or X-SourceMap response header is seen, this is

Просмотреть файл

@ -18,9 +18,9 @@ StyleSheet::SetURIs(nsIURI* aSheetURI,
nsIURI* aBaseURI)
{
MOZ_ASSERT(aSheetURI && aBaseURI, "null ptr");
StyleSheetInfo& info = Inner();
MOZ_ASSERT(!HasRules() && !info.mComplete,
MOZ_ASSERT(!HasRules() && !IsComplete(),
"Can't call SetURIs on sheets that are complete or have rules");
StyleSheetInfo& info = Inner();
info.mSheetURI = aSheetURI;
info.mOriginalSheetURI = aOriginalSheetURI;
info.mBaseURI = aBaseURI;

Просмотреть файл

@ -277087,16 +277087,6 @@
{}
]
],
"fetch/api/cors/resources/corspreflight.js": [
[
{}
]
],
"fetch/api/cors/resources/not-cors-safelisted.json": [
[
{}
]
],
"fetch/api/policies/csp-blocked.html.headers": [
[
{}
@ -277757,16 +277747,6 @@
{}
]
],
"fetch/sec-metadata/report.tentative.https.sub.html.sub.headers": [
[
{}
]
],
"fetch/sec-metadata/resources/dedicatedWorker.js": [
[
{}
]
],
"fetch/sec-metadata/resources/echo-as-json.py": [
[
{}
@ -277787,21 +277767,6 @@
{}
]
],
"fetch/sec-metadata/resources/record-header.py": [
[
{}
]
],
"fetch/sec-metadata/resources/sharedWorker.js": [
[
{}
]
],
"fetch/sec-metadata/resources/xslt-test.sub.xml": [
[
{}
]
],
"fetch/security/support/embedded-credential-window.sub.html": [
[
{}
@ -295077,6 +295042,16 @@
{}
]
],
"resources/chromium/chooser_service.mojom.js": [
[
{}
]
],
"resources/chromium/chooser_service.mojom.js.headers": [
[
{}
]
],
"resources/chromium/device.mojom.js": [
[
{}
@ -331639,6 +331614,12 @@
{}
]
],
"css/css-scoping/shadow-multiple-links.html": [
[
"/css/css-scoping/shadow-multiple-links.html",
{}
]
],
"css/css-scoping/slot-non-html-display-value.html": [
[
"/css/css-scoping/slot-non-html-display-value.html",
@ -350865,16 +350846,6 @@
{}
]
],
"fetch/api/cors/cors-preflight-not-cors-safelisted.any.js": [
[
"/fetch/api/cors/cors-preflight-not-cors-safelisted.any.html",
{}
],
[
"/fetch/api/cors/cors-preflight-not-cors-safelisted.any.worker.html",
{}
]
],
"fetch/api/cors/cors-preflight-redirect.any.js": [
[
"/fetch/api/cors/cors-preflight-redirect.any.html",
@ -351021,12 +350992,6 @@
{}
]
],
"fetch/api/headers/headers-no-cors.window.js": [
[
"/fetch/api/headers/headers-no-cors.window.html",
{}
]
],
"fetch/api/headers/headers-normalize.html": [
[
"/fetch/api/headers/headers-normalize.html",
@ -351861,24 +351826,12 @@
{}
]
],
"fetch/sec-metadata/embed.tentative.https.sub.html": [
[
"/fetch/sec-metadata/embed.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/fetch.tentative.https.sub.html": [
[
"/fetch/sec-metadata/fetch.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/font.tentative.https.sub.html": [
[
"/fetch/sec-metadata/font.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/iframe.tentative.https.sub.html": [
[
"/fetch/sec-metadata/iframe.tentative.https.sub.html",
@ -351891,102 +351844,12 @@
{}
]
],
"fetch/sec-metadata/object.tentative.https.sub.html": [
[
"/fetch/sec-metadata/object.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html": [
[
"/fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html": [
[
"/fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html": [
[
"/fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html": [
[
"/fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html": [
[
"/fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html": [
[
"/fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html": [
[
"/fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html": [
[
"/fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html": [
[
"/fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/report.tentative.https.sub.html": [
[
"/fetch/sec-metadata/report.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/script.tentative.https.sub.html": [
[
"/fetch/sec-metadata/script.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/serviceworker.tentative.https.sub.html": [
[
"/fetch/sec-metadata/serviceworker.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/sharedworker.tentative.https.sub.html": [
[
"/fetch/sec-metadata/sharedworker.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/style.tentative.https.sub.html": [
[
"/fetch/sec-metadata/style.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/track.tentative.https.sub.html": [
[
"/fetch/sec-metadata/track.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/window-open.tentative.https.sub.html": [
[
"/fetch/sec-metadata/window-open.tentative.https.sub.html",
@ -351995,18 +351858,6 @@
}
]
],
"fetch/sec-metadata/worker.tentative.https.sub.html": [
[
"/fetch/sec-metadata/worker.tentative.https.sub.html",
{}
]
],
"fetch/sec-metadata/xslt.tentative.https.sub.html": [
[
"/fetch/sec-metadata/xslt.tentative.https.sub.html",
{}
]
],
"fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html": [
[
"/fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html",
@ -365483,14 +365334,6 @@
{}
]
],
"infrastructure/testdriver/bless.html": [
[
"/infrastructure/testdriver/bless.html",
{
"testdriver": true
}
]
],
"infrastructure/testdriver/click.html": [
[
"/infrastructure/testdriver/click.html",
@ -368283,12 +368126,6 @@
{}
]
],
"mst-content-hint/MediaStreamTrack-contentHint.html": [
[
"/mst-content-hint/MediaStreamTrack-contentHint.html",
{}
]
],
"mst-content-hint/idlharness.window.js": [
[
"/mst-content-hint/idlharness.window.html",
@ -542386,6 +542223,10 @@
"d67929a1adbd42b807500685c6a36a9e61e22fed",
"reftest"
],
"css/css-scoping/shadow-multiple-links.html": [
"d1c4fd9eb7ed7595d5f30b01777b4f1c15f242ba",
"testharness"
],
"css/css-scoping/shadow-reassign-dynamic-001.html": [
"e8fe49ac96ff1694565bd82213c07f7204f0bb1c",
"reftest"
@ -543627,7 +543468,7 @@
"testharness"
],
"css/css-shapes/shape-outside/values/support/parsing-utils.js": [
"68b0c1b1f7c4641cc8e28eb0dca52163b71eb1f7",
"06007f50939e251851be58a896208d03bb58d0dd",
"support"
],
"css/css-shapes/spec-examples/reference/shape-outside-001-ref.html": [
@ -580039,7 +579880,7 @@
"support"
],
"docs/_writing-tests/testdriver.md": [
"a934e3278f1e2ea3b105b392cdac0e6a895e1b86",
"5cbe0bc377b4dafde60bec06c77aba83baebe9db",
"support"
],
"docs/_writing-tests/testharness-api.md": [
@ -580351,7 +580192,7 @@
"testharness"
],
"dom/events/event-global-extra.window.js": [
"0f14961c40a650a911a1d451e216e27d12195eb5",
"f26876966800121622b2d32ef86c955797c0141d",
"testharness"
],
"dom/events/event-global.html": [
@ -585222,10 +585063,6 @@
"ce6a169d8146750b183c9210d1b2041fac879248",
"testharness"
],
"fetch/api/cors/cors-preflight-not-cors-safelisted.any.js": [
"b2747ccd5bc09e4174aa4c59244e386c80527b51",
"testharness"
],
"fetch/api/cors/cors-preflight-redirect.any.js": [
"5d4de7ebaad1d45775cdb00bf0233aca1a34f612",
"testharness"
@ -585243,7 +585080,7 @@
"testharness"
],
"fetch/api/cors/cors-preflight.any.js": [
"7455b9774031c8ead6ebaf65165ee920eb9f4218",
"4765c5684cf84ddfad2dadace08e99d609bed6e6",
"testharness"
],
"fetch/api/cors/cors-redirect-credentials.any.js": [
@ -585258,14 +585095,6 @@
"cdf4097d5669241373dc7a03ad52c1cb974b5258",
"testharness"
],
"fetch/api/cors/resources/corspreflight.js": [
"f85d90d9edd6a345564e2b8144123472fde58e4d",
"support"
],
"fetch/api/cors/resources/not-cors-safelisted.json": [
"20a162f92c13b3d7fa8bcefab49c98cdd4b42a4c",
"support"
],
"fetch/api/cors/sandboxed-iframe.html": [
"feb9f1f2e5bd3e2a1d1937103ea13c2fdb32aea6",
"testharness"
@ -585302,10 +585131,6 @@
"194ff32f1559f2dd9b5903eb3738c17c061c7172",
"testharness"
],
"fetch/api/headers/headers-no-cors.window.js": [
"aa6562b7d377f4ad74456a87d7e37bf0bd18cb2b",
"testharness"
],
"fetch/api/headers/headers-normalize.html": [
"6dfcf9d8194776479d500a6f6c6a5851424d9efc",
"testharness"
@ -586326,136 +586151,40 @@
"c460aa1ecb941118b6999209ba4601eb145a61b9",
"support"
],
"fetch/sec-metadata/embed.tentative.https.sub.html": [
"745ef42d484f5258f46ffc6ee9447fe5d8d3c142",
"testharness"
],
"fetch/sec-metadata/fetch.tentative.https.sub.html": [
"12072476bebb693233a4cbffcb71019b1d1d5a91",
"testharness"
],
"fetch/sec-metadata/font.tentative.https.sub.html": [
"65432b5bacf3bddf8d5cbaad74bdbaf5e63fb44e",
"7a2c223d07112b38dd8053b07f44e7c4ac720161",
"testharness"
],
"fetch/sec-metadata/iframe.tentative.https.sub.html": [
"8d89cda8936cc33a22e0899a2c8b3560b7ef20bd",
"5b56c62ad71316c6c820d2cdfe2023c91c5a9da7",
"testharness"
],
"fetch/sec-metadata/img.tentative.https.sub.html": [
"20701a6514653f86e33b3cdf700ecd0628097d6c",
"7c5cbc34bfd5af975b534e75f3fa2383d6b594aa",
"testharness"
],
"fetch/sec-metadata/object.tentative.https.sub.html": [
"e1ac53157e023a9c6bc4806feda2e782ef4eefa5",
"testharness"
],
"fetch/sec-metadata/redirect/cross-site/cross-site.tentative.https.sub.html": [
"e25fd3f61d5487de6026a0204f107201f491afad",
"testharness"
],
"fetch/sec-metadata/redirect/cross-site/same-origin.tentative.https.sub.html": [
"ac5982d8956c96cd638c2464ec9f8cce3f7e3a34",
"testharness"
],
"fetch/sec-metadata/redirect/cross-site/same-site.tentative.https.sub.html": [
"5b3b965f5e96d75f93796e55e77cfac94de18a52",
"testharness"
],
"fetch/sec-metadata/redirect/same-origin/cross-site.tentative.https.sub.html": [
"ea6b167673f5e64396db4690abde56253e8af914",
"testharness"
],
"fetch/sec-metadata/redirect/same-origin/same-origin.tentative.https.sub.html": [
"430990a57c48b858fdc509653c0b689abcedcc6d",
"testharness"
],
"fetch/sec-metadata/redirect/same-origin/same-site.tentative.https.sub.html": [
"591cf67d18111592a5e696e346371a88770bdb32",
"testharness"
],
"fetch/sec-metadata/redirect/same-site/cross-site.tentative.https.sub.html": [
"8592d02c269b6afc4193f4323238b68d8fc26979",
"testharness"
],
"fetch/sec-metadata/redirect/same-site/same-origin.tentative.https.sub.html": [
"191dbaa7f77a3ac569b37e95e2db9f2ac4985a3e",
"testharness"
],
"fetch/sec-metadata/redirect/same-site/same-site.tentative.https.sub.html": [
"11d60473981cf056ebc56b15905f27c070dad9c8",
"testharness"
],
"fetch/sec-metadata/report.tentative.https.sub.html": [
"279836457ebe72354ec68525bd92bc533b11b0dd",
"testharness"
],
"fetch/sec-metadata/report.tentative.https.sub.html.sub.headers": [
"5c8bc58ad472ed9de841491df4e3e9e26e2e1c70",
"support"
],
"fetch/sec-metadata/resources/dedicatedWorker.js": [
"18626d3d8458b967829b724fabebc10e939b62a9",
"support"
],
"fetch/sec-metadata/resources/echo-as-json.py": [
"16cc67774f76347e5c71220f590a82a37302cff0",
"a45bb68654618fa95f0fa3266be6412612750b57",
"support"
],
"fetch/sec-metadata/resources/echo-as-script.py": [
"c1c6a4673acfbda17e2a7045a304a30082288d1d",
"c503822d5c605de0141e7e5316182519b6adc740",
"support"
],
"fetch/sec-metadata/resources/helper.js": [
"cbd96d06863427f34d75d0621839bcfe76c7ad96",
"03d2d2d2ebaa8d04d348230a9f751b611ae0dfec",
"support"
],
"fetch/sec-metadata/resources/post-to-owner.py": [
"fe08cd1cbcaa4585fb3be0ce0ee33e7d75759129",
"support"
],
"fetch/sec-metadata/resources/record-header.py": [
"06157e4cd8bd35e54b99c04f09a995185ba5686c",
"support"
],
"fetch/sec-metadata/resources/sharedWorker.js": [
"5eb89cb4f68a098154cf3605f53318af2f5e56f1",
"support"
],
"fetch/sec-metadata/resources/xslt-test.sub.xml": [
"4beb9af8d282f2672ab08c4c369d1fe0b061e80f",
"support"
],
"fetch/sec-metadata/script.tentative.https.sub.html": [
"643e11827f565ad11416589ae601d18cd8008239",
"testharness"
],
"fetch/sec-metadata/serviceworker.tentative.https.sub.html": [
"9d1fe2a3449da49b3b4e167f74e63e815ef5cf6c",
"testharness"
],
"fetch/sec-metadata/sharedworker.tentative.https.sub.html": [
"aa118e04239691f5488c4d62f3f1cf0ae59e8f1d",
"testharness"
],
"fetch/sec-metadata/style.tentative.https.sub.html": [
"78fac567b43f3c48c81897b44237d820a6209d8a",
"testharness"
],
"fetch/sec-metadata/track.tentative.https.sub.html": [
"e89d4745ff2db234e3e49ee28dd8af15acbc9731",
"6f86e87c5388bc8962feec80a67f9ab4413b4ff8",
"testharness"
],
"fetch/sec-metadata/window-open.tentative.https.sub.html": [
"3cd6190f944816258b29546ef89ec5947faa035d",
"testharness"
],
"fetch/sec-metadata/worker.tentative.https.sub.html": [
"eff66fcc7811d9aacced799d6707f8f9edcafa9b",
"testharness"
],
"fetch/sec-metadata/xslt.tentative.https.sub.html": [
"dff996679ff900cf3e3fe82381ef29ea5f5889b5",
"1f9df663f1da911a6683ed54649efba0e8df7c85",
"testharness"
],
"fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html": [
@ -600299,7 +600028,7 @@
"testharness"
],
"html/semantics/forms/form-submission-0/constructing-form-data-set.html": [
"afd75d87e95a6344bb3cb004c5af9973b63d645e",
"0fe917138693fe2bdd0a2b4d83b5f4c797b61244",
"testharness"
],
"html/semantics/forms/form-submission-0/contains.json": [
@ -606178,10 +605907,6 @@
"ea7973a62e0ee9cdc874879fd844b2309e944e61",
"testharness"
],
"infrastructure/testdriver/bless.html": [
"feb444f89d91088b51e04b610dd642c00814c3b4",
"testharness"
],
"infrastructure/testdriver/click.html": [
"37721ad9ef3df10f8cdc1da74c27a2259d4601f6",
"testharness"
@ -609986,10 +609711,6 @@
"7f79eccbaa6b9950233ee8968c6b358dd89b5d03",
"support"
],
"mst-content-hint/MediaStreamTrack-contentHint.html": [
"98c88e66ea1ec137cdcf794c63a14d9af4b964b1",
"testharness"
],
"mst-content-hint/idlharness.window.js": [
"0d9137dc6fb91b1499d922e01d6ad96049f5757b",
"testharness"
@ -626906,6 +626627,14 @@
"b53c6a8c4232dbe9c787b0ea17f0ed1a49f1e386",
"support"
],
"resources/chromium/chooser_service.mojom.js": [
"fd344e71faf7806a8ee687bd2049537b26e89ae2",
"support"
],
"resources/chromium/chooser_service.mojom.js.headers": [
"6805c323df5a975231648b830e33ce183c3cbbd3",
"support"
],
"resources/chromium/device.mojom.js": [
"435fc1fc7addabfddb093e003795512c28360357",
"support"
@ -626995,7 +626724,7 @@
"support"
],
"resources/chromium/web_usb_service.mojom.js": [
"d0b93a168bf06fe6b1dac3dd58c9e7d6f2a66d13",
"c283f0e9aea4bee4202352ef91f7d95b6f291f2e",
"support"
],
"resources/chromium/web_usb_service.mojom.js.headers": [
@ -627003,7 +626732,7 @@
"support"
],
"resources/chromium/webusb-test.js": [
"9037a109c91610957091f73752074faa031e497b",
"94db93d31e389aa2aa525d82feb57ff414d0426b",
"support"
],
"resources/chromium/webusb-test.js.headers": [
@ -642663,7 +642392,7 @@
"support"
],
"tools/wpt/testfiles.py": [
"35a4b97d7ffaa24f630d70c6877c719d155c2ec7",
"c4e714c2640925bda1343b3575f77823144a8b1d",
"support"
],
"tools/wpt/tests/latest_mozilla_central.txt": [
@ -642671,7 +642400,7 @@
"support"
],
"tools/wpt/tests/test_wpt.py": [
"16d286d382c7179ad36807b47638d82b4b46f286",
"ada7cc7c164d835edcdf081d421bfe2a4daff0bf",
"support"
],
"tools/wpt/tox.ini": [
@ -643251,7 +642980,7 @@
"support"
],
"tools/wptrunner/wptrunner/wptrunner.py": [
"aab5996afd94e78686a027fd8546ca83e77766f4",
"74f7a7b9e733f1b73b9937705c6472b66e117c04",
"support"
],
"tools/wptrunner/wptrunner/wpttest.py": [
@ -643467,7 +643196,7 @@
"support"
],
"tools/wptserve/tests/functional/test_request.py": [
"97d75eb71289adf643ab073ddc740f1f24cffc76",
"de29638f6c11dae97cbb5d26d60d3fd530403e5b",
"support"
],
"tools/wptserve/tests/functional/test_response.py": [
@ -650323,7 +650052,7 @@
"support"
],
"webusb/resources/usb-helpers.js": [
"93740920dee8f259fc266cd4927b5972985df77e",
"881ea8b95619393a35e1df05864c3cad2ff0eb60",
"support"
],
"webusb/usb-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [

Просмотреть файл

@ -0,0 +1,15 @@
<!doctype html>
<title>CSS Test: ShadowRoot with multiple sheet links with the same href shouldn't crash</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<div id="host"></div>
<script>
test(function() {
host.attachShadow({ mode: "open" }).innerHTML = `
<link rel="stylesheet" href="data:text/css,">
<link rel="stylesheet" href="data:text/css,">
`;
}, "Multiple stylesheets with the same href in a ShadowRoot should not assert or crash");
</script>