mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00
Bug 621841. Clear restyle flags in frameset kids when we process them. r=dbaron
This commit is contained in:
parent
12a6879b47
commit
c79bd4569e
20
layout/generic/crashtests/621841-1.html
Normal file
20
layout/generic/crashtests/621841-1.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
var frame = document.getElementById("f");
|
||||
var frameDoc = frame.contentDocument;
|
||||
frameDoc.getElementById("g").style.background = "yellow";
|
||||
frame.style.cssFloat = "right";
|
||||
document.documentElement.offsetHeight;
|
||||
frameDoc.documentElement.style.color = "green";
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();"><iframe id="f" src="data:text/html,<!DOCTYPE html><frameset><frame id=g></frameset>"></iframe></body>
|
||||
</html>
|
@ -352,3 +352,4 @@ load 603510-1.html
|
||||
load 604314-1.html
|
||||
load 604843.html
|
||||
load 605340.html
|
||||
load 621841-1.html
|
||||
|
@ -365,15 +365,24 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
||||
|
||||
for (PRUint32 childX = 0; childX < numChildren; childX++) {
|
||||
if (mChildCount == numCells) { // we have more <frame> or <frameset> than cells
|
||||
// Clear the lazy bits in the remaining children.
|
||||
// Clear the lazy bits in the remaining children. Also clear
|
||||
// the restyle flags, like nsCSSFrameConstructor::ProcessChildren does.
|
||||
for (PRUint32 i = childX; i < numChildren; i++) {
|
||||
mContent->GetChildAt(i)->UnsetFlags(NODE_DESCENDANTS_NEED_FRAMES |
|
||||
NODE_NEEDS_FRAME);
|
||||
nsIContent *child = mContent->GetChildAt(i);
|
||||
child->UnsetFlags(NODE_DESCENDANTS_NEED_FRAMES | NODE_NEEDS_FRAME);
|
||||
if (child->IsElement()) {
|
||||
child->UnsetFlags(ELEMENT_ALL_RESTYLE_FLAGS);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
nsIContent *child = mContent->GetChildAt(childX);
|
||||
child->UnsetFlags(NODE_DESCENDANTS_NEED_FRAMES | NODE_NEEDS_FRAME);
|
||||
// Also clear the restyle flags in the child like
|
||||
// nsCSSFrameConstructor::ProcessChildren does.
|
||||
if (child->IsElement()) {
|
||||
child->UnsetFlags(ELEMENT_ALL_RESTYLE_FLAGS);
|
||||
}
|
||||
|
||||
// IMPORTANT: This must match the conditions in
|
||||
// nsCSSFrameConstructor::ContentAppended/Inserted/Removed
|
||||
|
Loading…
x
Reference in New Issue
Block a user