зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 8dbb04b2762b (bug 1858362) for causing wpt failures on /css/css-properties-values-api/register-property.html CLOSED TREE
This commit is contained in:
Родитель
a687046780
Коммит
ce7e750f80
|
@ -1508,12 +1508,6 @@ void ServoStyleSet::RegisterProperty(const PropertyDefinition& aDefinition,
|
|||
: nullptr);
|
||||
switch (result) {
|
||||
case Result::SuccessfullyRegistered:
|
||||
if (Element* root = mDocument->GetRootElement()) {
|
||||
if (nsPresContext* pc = GetPresContext()) {
|
||||
pc->RestyleManager()->PostRestyleEvent(
|
||||
root, RestyleHint::RecascadeSubtree(), nsChangeHint(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Result::InvalidName:
|
||||
return aRv.ThrowSyntaxError("Invalid name");
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[registered-property-change-style-001.html]
|
||||
[New registered property declaration]
|
||||
expected: FAIL
|
||||
|
||||
[Registered property overrides a previous declaration ]
|
||||
expected: FAIL
|
|
@ -70,3 +70,9 @@
|
|||
|
||||
[Initial value for <url>+ correctly computed [url(a) url(a)\]]
|
||||
expected: FAIL
|
||||
|
||||
[Initial inherited value can be substituted [purple, color\]]
|
||||
expected: FAIL
|
||||
|
||||
[Initial value for <transform-function> correctly computed [rotate(42deg)\]]
|
||||
expected: FAIL
|
||||
|
|
|
@ -22,3 +22,12 @@
|
|||
|
||||
[Fallback must adhere to registered syntax [<length>, var(--length-1)\]]
|
||||
expected: FAIL
|
||||
|
||||
[References to registered var()-properties work in registered lists]
|
||||
expected: FAIL
|
||||
|
||||
[References to mixed registered and unregistered var()-properties work in registered lists]
|
||||
expected: FAIL
|
||||
|
||||
[Registered lists may be concatenated]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Invalidation after CSS.registerProperty (reference)</title>
|
||||
<style>
|
||||
.failure {
|
||||
background: pink;
|
||||
}
|
||||
#visibility {
|
||||
visibility: hidden;
|
||||
}
|
||||
#display {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>This test PASS if you see no red in the list below.</p>
|
||||
<ul>
|
||||
<li>visibility <span id="visibility" class="failure">FAIL</span></li>
|
||||
<li>display <span id="display" class="failure">FAIL</span></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
|
@ -1,45 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Invalidation after CSS.registerProperty</title>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1/#registered-custom-property">
|
||||
<link rel="match" href="registered-property-change-style-002-ref.html">
|
||||
<meta name="assert" content="Rendering should properly be updated after call to CSS.registerProperty.">
|
||||
<style>
|
||||
.failure {
|
||||
background: pink;
|
||||
}
|
||||
#visibility {
|
||||
visibility: var(--my-visibility, visible);
|
||||
}
|
||||
#display {
|
||||
display: var(--my-display, inline-block);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>This test PASS if you see no red in the list below.</p>
|
||||
<ul>
|
||||
<li>visibility <span id="visibility" class="failure">FAIL</span></li>
|
||||
<li>display <span id="display" class="failure">FAIL</span></li>
|
||||
</ul>
|
||||
<script>
|
||||
document.documentElement.addEventListener("TestRendered", () => {
|
||||
CSS.registerProperty({
|
||||
name: "--my-visibility",
|
||||
syntax: "*",
|
||||
initialValue: "hidden",
|
||||
inherits: false,
|
||||
});
|
||||
CSS.registerProperty({
|
||||
name: "--my-display",
|
||||
syntax: "*",
|
||||
initialValue: "none",
|
||||
inherits: false,
|
||||
});
|
||||
document.documentElement.removeAttribute("class");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче