Bug 1102791 - Always return NS_FRAME_COMPLETE status from nsHTMLButtonControlFrame::Reflow. Don't create overflow container continuations unless the delegating frame has eCanContainOverflowContainers. r=roc
This commit is contained in:
33
layout/forms/crashtests/1102791.html
Normal file
33
layout/forms/crashtests/1102791.html
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html class="reftest-print"><head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Testcase for bug 1102791</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
html,body {
|
||||||
|
color:black; background-color:white; font-size:16px; padding:0; margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
position: absolute;
|
||||||
|
-moz-appearance: none;
|
||||||
|
background: transparent;
|
||||||
|
padding: 0;
|
||||||
|
border-style:none;
|
||||||
|
}
|
||||||
|
button::before {
|
||||||
|
position: absolute;
|
||||||
|
content: "::before";
|
||||||
|
width: 10px;
|
||||||
|
height: 200em;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<button></button>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -59,3 +59,4 @@ load 944198.html
|
|||||||
load 949891.xhtml
|
load 949891.xhtml
|
||||||
load 959311.html
|
load 959311.html
|
||||||
load 960277-2.html
|
load 960277-2.html
|
||||||
|
load 1102791.html
|
||||||
|
|||||||
@@ -203,6 +203,11 @@ nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
FinishReflowWithAbsoluteFrames(aPresContext, aDesiredSize,
|
FinishReflowWithAbsoluteFrames(aPresContext, aDesiredSize,
|
||||||
aReflowState, aStatus);
|
aReflowState, aStatus);
|
||||||
|
|
||||||
|
// We're always complete and we don't support overflow containers
|
||||||
|
// so we shouldn't have a next-in-flow ever.
|
||||||
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
|
MOZ_ASSERT(!GetNextInFlow());
|
||||||
|
|
||||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,8 @@ nsAbsoluteContainingBlock::Reflow(nsContainerFrame* aDelegatingFrame,
|
|||||||
aConstrainHeight, kidFrame, kidStatus,
|
aConstrainHeight, kidFrame, kidStatus,
|
||||||
aOverflowAreas);
|
aOverflowAreas);
|
||||||
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
|
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
|
||||||
if (!NS_FRAME_IS_FULLY_COMPLETE(kidStatus)) {
|
if (!NS_FRAME_IS_FULLY_COMPLETE(kidStatus) &&
|
||||||
|
aDelegatingFrame->IsFrameOfType(nsIFrame::eCanContainOverflowContainers)) {
|
||||||
// Need a continuation
|
// Need a continuation
|
||||||
if (!nextFrame) {
|
if (!nextFrame) {
|
||||||
nextFrame =
|
nextFrame =
|
||||||
|
|||||||
Reference in New Issue
Block a user