зеркало из https://github.com/mozilla/gecko-dev.git
Bug 736389. Get rid of code that reresolved style on overflow containers multiple times and in the process violated some invariants other code depended on. r=mats
This commit is contained in:
Родитель
02b0f691ed
Коммит
7a56376d14
|
@ -0,0 +1,47 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<style>
|
||||
/* this stylesheet is reduced from quirk.css */
|
||||
|
||||
li {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
.t:first-child {
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
function rm(n) { n.parentNode.removeChild(n); }
|
||||
|
||||
window.addEventListener("load", function() {
|
||||
document.documentElement.offsetHeight;
|
||||
rm(document.getElementById('x'));
|
||||
}, false);
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body style="-moz-column-count: 2000;">
|
||||
<li>
|
||||
<ol class="t" style="position: relative;">
|
||||
<span id="x"></span>
|
||||
<ol class="t" style="list-style-position: inside;">
|
||||
<div style="position: absolute;">
|
||||
<li>
|
||||
<div style="position: absolute;">
|
||||
<li>
|
||||
<ol class="t"></ol>
|
||||
</li>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
</ol>
|
||||
</ol>
|
||||
</li>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -351,3 +351,4 @@ load 707098.html
|
|||
load 722137.html
|
||||
load 725535.html
|
||||
load 727601.html
|
||||
load 736389-1.xhtml
|
||||
|
|
|
@ -673,9 +673,8 @@ VerifyStyleTree(nsPresContext* aPresContext, nsIFrame* aFrame,
|
|||
nsFrameList::Enumerator childFrames(lists.CurrentList());
|
||||
for (; !childFrames.AtEnd(); childFrames.Next()) {
|
||||
nsIFrame* child = childFrames.get();
|
||||
if (!(child->GetStateBits() & NS_FRAME_OUT_OF_FLOW)
|
||||
|| (child->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) {
|
||||
// only do frames that don't have placeholders
|
||||
if (!(child->GetStateBits() & NS_FRAME_OUT_OF_FLOW)) {
|
||||
// only do frames that are in flow
|
||||
if (nsGkAtoms::placeholderFrame == child->GetType()) {
|
||||
// placeholder: first recurse and verify the out of flow frame,
|
||||
// then verify the placeholder's context
|
||||
|
@ -683,7 +682,9 @@ VerifyStyleTree(nsPresContext* aPresContext, nsIFrame* aFrame,
|
|||
nsPlaceholderFrame::GetRealFrameForPlaceholder(child);
|
||||
|
||||
// recurse to out of flow frame, letting the parent context get resolved
|
||||
VerifyStyleTree(aPresContext, outOfFlowFrame, nsnull);
|
||||
do {
|
||||
VerifyStyleTree(aPresContext, outOfFlowFrame, nsnull);
|
||||
} while ((outOfFlowFrame = outOfFlowFrame->GetNextContinuation()));
|
||||
|
||||
// verify placeholder using the parent frame's context as
|
||||
// parent context
|
||||
|
@ -927,9 +928,8 @@ nsFrameManager::ReparentStyleContext(nsIFrame* aFrame)
|
|||
nsFrameList::Enumerator childFrames(lists.CurrentList());
|
||||
for (; !childFrames.AtEnd(); childFrames.Next()) {
|
||||
nsIFrame* child = childFrames.get();
|
||||
// only do frames that don't have placeholders
|
||||
if ((!(child->GetStateBits() & NS_FRAME_OUT_OF_FLOW) ||
|
||||
(child->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) &&
|
||||
// only do frames that are in flow
|
||||
if (!(child->GetStateBits() & NS_FRAME_OUT_OF_FLOW) &&
|
||||
child != providerChild) {
|
||||
#ifdef DEBUG
|
||||
if (nsGkAtoms::placeholderFrame == child->GetType()) {
|
||||
|
@ -1556,9 +1556,8 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
|||
nsFrameList::Enumerator childFrames(lists.CurrentList());
|
||||
for (; !childFrames.AtEnd(); childFrames.Next()) {
|
||||
nsIFrame* child = childFrames.get();
|
||||
if (!(child->GetStateBits() & NS_FRAME_OUT_OF_FLOW)
|
||||
|| (child->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) {
|
||||
// only do frames that don't have placeholders
|
||||
if (!(child->GetStateBits() & NS_FRAME_OUT_OF_FLOW)) {
|
||||
// only do frames that are in flow
|
||||
if (nsGkAtoms::placeholderFrame == child->GetType()) { // placeholder
|
||||
// get out of flow frame and recur there
|
||||
nsIFrame* outOfFlowFrame =
|
||||
|
|
Загрузка…
Ссылка в новой задаче