Block-level replaced element margin box must not overlap any floats. b=342531 r+sr=dbaron

This commit is contained in:
mats.palmgren%bredband.net 2006-07-05 03:53:22 +00:00
Родитель 658954e4be
Коммит d521f75b48
2 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -5754,7 +5754,7 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsFrameConstructorState& aState,
if (!aHasPseudoParent && !aState.mPseudoFrames.IsEmpty()) {
ProcessPseudoFrames(aState, aFrameItems);
}
isReplaced = PR_TRUE;
isReplaced = PR_FALSE;
newFrame = NS_NewIsIndexFrame(mPresShell, aStyleContext);
triedFrame = PR_TRUE;
}

Просмотреть файл

@ -229,16 +229,12 @@ nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame,
const nsMargin& borderPadding = BorderPadding();
/* bug 18445: treat elements mapped to display: block such as text controls
* just like normal blocks */
// text controls are not splittable, so make a special case here
// text controls are not splittable
// XXXldb Why not just set the frame state bit?
PRBool treatAsNotSplittable =
nsLayoutAtoms::textInputFrame == aFrame->GetType();
if (NS_FRAME_SPLITTABLE_NON_RECTANGULAR == aSplitType || // normal blocks
NS_FRAME_NOT_SPLITTABLE == aSplitType || // things like images mapped to display: block
PR_TRUE == treatAsNotSplittable) // text input controls mapped to display: block (special case)
if ((NS_FRAME_SPLITTABLE_NON_RECTANGULAR == aSplitType || // normal blocks
NS_FRAME_NOT_SPLITTABLE == aSplitType) && // things like images mapped to display: block
!(aFrame->GetStateBits() & NS_FRAME_REPLACED_ELEMENT)) // but not replaced elements
{
if (mBand.GetFloatCount()) {
// Use the float-edge property to determine how the child block