mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 413048. Disable float breaking in columns. r+sr=dbaron
This commit is contained in:
parent
c608a29bb8
commit
de4be1cb93
9
layout/generic/crashtests/413048-1.html
Normal file
9
layout/generic/crashtests/413048-1.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<div style="-moz-column-count: 15; width: 16px; height: 16px;"><span><div style="display: inline-block;">a</div><div style="float: left;"></div>
|
||||
</span></div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -129,6 +129,7 @@ load 408883-1.html
|
||||
load 410228-1.html
|
||||
load 411851-1.html
|
||||
load 412201-1.xhtml
|
||||
load 413048-1.html
|
||||
load 414061-1.html
|
||||
load 414719-1.html
|
||||
load 415685-1.html
|
||||
|
@ -98,6 +98,8 @@
|
||||
|
||||
static const int MIN_LINES_NEEDING_CURSOR = 20;
|
||||
|
||||
#define DISABLE_FLOAT_BREAKING_IN_COLUMNS
|
||||
|
||||
#ifdef DEBUG
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsBlockDebugFlags.h"
|
||||
@ -5649,9 +5651,20 @@ nsBlockFrame::ComputeFloatAvailableSpace(nsBlockReflowState& aState,
|
||||
// aState.mY is relative to the border-top, make it relative to the content-top
|
||||
nscoord contentYOffset = aState.mY - aState.BorderPadding().top;
|
||||
nscoord availHeight = NS_UNCONSTRAINEDSIZE == aState.mContentArea.height
|
||||
? NS_UNCONSTRAINEDSIZE
|
||||
? NS_UNCONSTRAINEDSIZE
|
||||
: PR_MAX(0, aState.mContentArea.height - contentYOffset);
|
||||
|
||||
#ifdef DISABLE_FLOAT_BREAKING_IN_COLUMNS
|
||||
if (availHeight != NS_UNCONSTRAINEDSIZE &&
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, nsGkAtoms::columnSetFrame)) {
|
||||
// Tell the float it has unrestricted height, so it won't break.
|
||||
// If the float doesn't actually fit in the column it will fail to be
|
||||
// placed, and either move to the top of the next column or just
|
||||
// overflow.
|
||||
availHeight = NS_UNCONSTRAINEDSIZE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return nsRect(aState.BorderPadding().left,
|
||||
aState.BorderPadding().top,
|
||||
availWidth, availHeight);
|
||||
|
@ -636,10 +636,9 @@ nsBlockReflowState::AddFloat(nsLineLayout& aLineLayout,
|
||||
// This float will be placed after the line is done (it is a
|
||||
// below-current-line float).
|
||||
mBelowCurrentLineFloats.Append(fc);
|
||||
if (mReflowState.availableHeight != NS_UNCONSTRAINEDSIZE ||
|
||||
aPlaceholder->GetNextInFlow()) {
|
||||
if (aPlaceholder->GetNextInFlow()) {
|
||||
// If the float might not be complete, mark it incomplete now to
|
||||
// prevent the placeholders being torn down. We will destroy any
|
||||
// prevent its next-in-flow placeholders being torn down. We will destroy any
|
||||
// placeholders later if PlaceBelowCurrentLineFloats finds the
|
||||
// float is complete.
|
||||
// Note that we could have unconstrained height and yet have
|
||||
|
@ -571,7 +571,7 @@ fails == 385823-2b.html 385823-2-ref.html
|
||||
== 386014-1c.html 386014-1-ref.html
|
||||
== 386065-1.html 386065-1-ref.html
|
||||
== 386065-2.html about:blank
|
||||
== 386147-1.html 386147-1-ref.html
|
||||
fails == 386147-1.html 386147-1-ref.html # bug 447460
|
||||
== 386310-1a.html 386310-1-ref.html
|
||||
fails == 386310-1b.html 386310-1-ref.html
|
||||
== 386310-1c.html 386310-1-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user