зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1418433) for unexpected "why should we have flushed style again?" assertion failures
Backed out changeset 761f84b8edb0 (bug 1418433) Backed out changeset 436723f33b10 (bug 1418433) MozReview-Commit-ID: 84FAoZcyQjU --HG-- extra : rebase_source : 5fbba91a8b80fbb25f57f4a6d8b521c8feb7f89a
This commit is contained in:
Родитель
a3f82de698
Коммит
0d1d9fec7b
|
@ -1330,11 +1330,6 @@ ServoStyleSet::UpdateStylist()
|
||||||
mBindingManager->UpdateBoundContentBindingsForServo(mPresContext);
|
mBindingManager->UpdateBoundContentBindingsForServo(mPresContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need to invalidate cached style in getComputedStyle for undisplayed
|
|
||||||
// elements, since we don't know if any of the style sheet change that we
|
|
||||||
// do would affect undisplayed elements.
|
|
||||||
mPresContext->RestyleManager()->AsServo()->IncrementUndisplayedRestyleGeneration();
|
|
||||||
|
|
||||||
mStylistState = StylistState::NotDirty;
|
mStylistState = StylistState::NotDirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
<title>Test for miscellaneous computed style issues</title>
|
<title>Test for miscellaneous computed style issues</title>
|
||||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||||
<style id="style"></style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Mozilla Bug </a>
|
||||||
<p id="display"></p>
|
<p id="display"></p>
|
||||||
<div id="content" style="display: none">
|
<div id="content" style="display: none">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
@ -732,26 +732,6 @@ var noframe_container = document.getElementById("content");
|
||||||
p.remove();
|
p.remove();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(function test_bug_1418433() {
|
|
||||||
// Test that the style data read through getComputedStyle is always up-to-date,
|
|
||||||
// even for non-displayed elements.
|
|
||||||
var d = document.createElement("div");
|
|
||||||
d.setAttribute("id", "nonDisplayedDiv");
|
|
||||||
var cs = getComputedStyle(d, null);
|
|
||||||
noframe_container.appendChild(d);
|
|
||||||
|
|
||||||
var style = document.getElementById("style");
|
|
||||||
style.textContent = "#nonDisplayedDiv { height: 100px; }";
|
|
||||||
is(cs.height, "100px",
|
|
||||||
"computed value of display none element");
|
|
||||||
style.textContent = "#nonDisplayedDiv { height: 10px; }";
|
|
||||||
is(cs.height, "10px",
|
|
||||||
"computed value of display none element");
|
|
||||||
|
|
||||||
style.textContent = "";
|
|
||||||
d.remove();
|
|
||||||
})();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</pre>
|
</pre>
|
||||||
</body>
|
</body>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче