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:
Mats Palmgren 2014-11-24 16:42:31 +00:00
parent 9a2b3b9a44
commit e9bb81e3b9
4 changed files with 41 additions and 1 deletions

View 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>

View File

@ -59,3 +59,4 @@ load 944198.html
load 949891.xhtml
load 959311.html
load 960277-2.html
load 1102791.html

View File

@ -203,6 +203,11 @@ nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
FinishReflowWithAbsoluteFrames(aPresContext, aDesiredSize,
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);
}

View File

@ -132,7 +132,8 @@ nsAbsoluteContainingBlock::Reflow(nsContainerFrame* aDelegatingFrame,
aConstrainHeight, kidFrame, kidStatus,
aOverflowAreas);
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
if (!nextFrame) {
nextFrame =