mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset ffd9c7bbd2fe (bug 261037) for compilation failures in nsCSSFrameConstructor on a CLOSED TREE
This commit is contained in:
parent
369bca8ae3
commit
1cb147e161
@ -502,8 +502,8 @@ Element::GetScrollFrame(nsIFrame **aStyledFrame, bool aFlushLayout)
|
|||||||
|
|
||||||
// menu frames implement GetScrollTargetFrame but we don't want
|
// menu frames implement GetScrollTargetFrame but we don't want
|
||||||
// to use it here. Similar for comboboxes.
|
// to use it here. Similar for comboboxes.
|
||||||
nsIAtom* type = frame->GetType();
|
if (frame->GetType() != nsGkAtoms::menuFrame &&
|
||||||
if (type != nsGkAtoms::menuFrame && type != nsGkAtoms::comboboxControlFrame) {
|
frame->GetType() != nsGkAtoms::comboboxControlFrame) {
|
||||||
nsIScrollableFrame *scrollFrame = frame->GetScrollTargetFrame();
|
nsIScrollableFrame *scrollFrame = frame->GetScrollTargetFrame();
|
||||||
if (scrollFrame)
|
if (scrollFrame)
|
||||||
return scrollFrame;
|
return scrollFrame;
|
||||||
|
@ -3050,51 +3050,39 @@ nsCSSFrameConstructor::ConstructFieldSetFrame(nsFrameConstructorState& aState,
|
|||||||
nsIContent* const content = aItem.mContent;
|
nsIContent* const content = aItem.mContent;
|
||||||
nsStyleContext* const styleContext = aItem.mStyleContext;
|
nsStyleContext* const styleContext = aItem.mStyleContext;
|
||||||
|
|
||||||
nsIFrame* fieldsetFrame = NS_NewFieldSetFrame(mPresShell, styleContext);
|
nsIFrame* newFrame = NS_NewFieldSetFrame(mPresShell, styleContext);
|
||||||
|
|
||||||
// Initialize it
|
// Initialize it
|
||||||
InitAndRestoreFrame(aState, content,
|
InitAndRestoreFrame(aState, content,
|
||||||
aState.GetGeometricParent(aStyleDisplay, aParentFrame),
|
aState.GetGeometricParent(aStyleDisplay, aParentFrame),
|
||||||
fieldsetFrame);
|
newFrame);
|
||||||
|
|
||||||
// Resolve style and initialize the frame
|
// Resolve style and initialize the frame
|
||||||
nsRefPtr<nsStyleContext> fieldsetContentStyle;
|
nsRefPtr<nsStyleContext> fieldsetContentStyle;
|
||||||
fieldsetContentStyle = mPresShell->StyleSet()->
|
fieldsetContentStyle = mPresShell->StyleSet()->
|
||||||
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::fieldsetContent, styleContext);
|
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::fieldsetContent, styleContext);
|
||||||
|
|
||||||
const nsStyleDisplay* fieldsetContentDisplay = fieldsetContentStyle->StyleDisplay();
|
|
||||||
bool isScrollable = fieldsetContentDisplay->IsScrollableOverflow();
|
|
||||||
nsIFrame* scrollFrame = nullptr;
|
|
||||||
if (isScrollable) {
|
|
||||||
fieldsetContentStyle =
|
|
||||||
BeginBuildingScrollFrame(aState, content, fieldsetContentStyle,
|
|
||||||
aState.GetGeometricParent(fieldsetContentDisplay, fieldsetFrame),
|
|
||||||
nsCSSAnonBoxes::scrolledContent,
|
|
||||||
false, scrollFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIFrame* blockFrame = NS_NewBlockFrame(mPresShell, fieldsetContentStyle,
|
nsIFrame* blockFrame = NS_NewBlockFrame(mPresShell, fieldsetContentStyle,
|
||||||
NS_BLOCK_FLOAT_MGR |
|
NS_BLOCK_FLOAT_MGR |
|
||||||
NS_BLOCK_MARGIN_ROOT);
|
NS_BLOCK_MARGIN_ROOT);
|
||||||
InitAndRestoreFrame(aState, content,
|
InitAndRestoreFrame(aState, content, newFrame, blockFrame);
|
||||||
scrollFrame ? scrollFrame : fieldsetFrame, blockFrame);
|
|
||||||
|
|
||||||
aState.AddChild(fieldsetFrame, aFrameItems, content, styleContext, aParentFrame);
|
aState.AddChild(newFrame, aFrameItems, content, styleContext, aParentFrame);
|
||||||
|
|
||||||
// Process children
|
// Process children
|
||||||
nsFrameConstructorSaveState absoluteSaveState;
|
nsFrameConstructorSaveState absoluteSaveState;
|
||||||
nsFrameItems childItems;
|
nsFrameItems childItems;
|
||||||
|
|
||||||
blockFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
|
newFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
|
||||||
if (fieldsetFrame->IsPositioned()) {
|
if (newFrame->IsPositioned()) {
|
||||||
aState.PushAbsoluteContainingBlock(blockFrame, fieldsetFrame, absoluteSaveState);
|
aState.PushAbsoluteContainingBlock(newFrame, newFrame, absoluteSaveState);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessChildren(aState, content, styleContext, blockFrame, true,
|
ProcessChildren(aState, content, styleContext, blockFrame, true,
|
||||||
childItems, true, aItem.mPendingBinding);
|
childItems, true, aItem.mPendingBinding);
|
||||||
|
|
||||||
nsFrameItems fieldsetKids;
|
nsFrameItems fieldsetKids;
|
||||||
fieldsetKids.AddChild(scrollFrame ? scrollFrame : blockFrame);
|
fieldsetKids.AddChild(blockFrame);
|
||||||
|
|
||||||
for (nsFrameList::Enumerator e(childItems); !e.AtEnd(); e.Next()) {
|
for (nsFrameList::Enumerator e(childItems); !e.AtEnd(); e.Next()) {
|
||||||
nsIFrame* child = e.get();
|
nsIFrame* child = e.get();
|
||||||
@ -3106,25 +3094,21 @@ nsCSSFrameConstructor::ConstructFieldSetFrame(nsFrameConstructorState& aState,
|
|||||||
// GetAdjustedParentFrame() below depends on this frame order.
|
// GetAdjustedParentFrame() below depends on this frame order.
|
||||||
childItems.RemoveFrame(child);
|
childItems.RemoveFrame(child);
|
||||||
// Make sure to reparent the legend so it has the fieldset as the parent.
|
// Make sure to reparent the legend so it has the fieldset as the parent.
|
||||||
fieldsetKids.InsertFrame(fieldsetFrame, nullptr, child);
|
fieldsetKids.InsertFrame(newFrame, nullptr, child);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isScrollable) {
|
|
||||||
FinishBuildingScrollFrame(scrollFrame, blockFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the inner frame's initial child lists
|
// Set the inner frame's initial child lists
|
||||||
blockFrame->SetInitialChildList(kPrincipalList, childItems);
|
blockFrame->SetInitialChildList(kPrincipalList, childItems);
|
||||||
|
|
||||||
// Set the outer frame's initial child list
|
// Set the outer frame's initial child list
|
||||||
fieldsetFrame->SetInitialChildList(kPrincipalList, fieldsetKids);
|
newFrame->SetInitialChildList(kPrincipalList, fieldsetKids);
|
||||||
|
|
||||||
fieldsetFrame->AddStateBits(NS_FRAME_MAY_HAVE_GENERATED_CONTENT);
|
newFrame->AddStateBits(NS_FRAME_MAY_HAVE_GENERATED_CONTENT);
|
||||||
|
|
||||||
// Our new frame returned is the outer frame, which is the fieldset frame.
|
// Our new frame returned is the outer frame, which is the fieldset frame.
|
||||||
return fieldsetFrame;
|
return newFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
static nsIFrame*
|
static nsIFrame*
|
||||||
@ -3278,17 +3262,6 @@ nsCSSFrameConstructor::FindDataByTag(nsIAtom* aTag,
|
|||||||
#define COMPLEX_TAG_CREATE(_tag, _func) \
|
#define COMPLEX_TAG_CREATE(_tag, _func) \
|
||||||
{ &nsGkAtoms::_tag, FULL_CTOR_FCDATA(0, _func) }
|
{ &nsGkAtoms::_tag, FULL_CTOR_FCDATA(0, _func) }
|
||||||
|
|
||||||
static bool
|
|
||||||
IsFrameForFieldSet(nsIFrame* aFrame, nsIAtom* aFrameType)
|
|
||||||
{
|
|
||||||
nsIAtom* pseudo = aFrame->StyleContext()->GetPseudo();
|
|
||||||
if (pseudo == nsCSSAnonBoxes::fieldsetContent ||
|
|
||||||
pseudo == nsCSSAnonBoxes::scrolledContent) {
|
|
||||||
return IsFrameForFieldSet(aFrame->GetParent(), aFrame->GetParent()->GetType());
|
|
||||||
}
|
|
||||||
return aFrameType == nsGkAtoms::fieldSetFrame;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
const nsCSSFrameConstructor::FrameConstructionData*
|
const nsCSSFrameConstructor::FrameConstructionData*
|
||||||
nsCSSFrameConstructor::FindHTMLData(Element* aElement,
|
nsCSSFrameConstructor::FindHTMLData(Element* aElement,
|
||||||
@ -3311,7 +3284,9 @@ nsCSSFrameConstructor::FindHTMLData(Element* aElement,
|
|||||||
"Unexpected parent for fieldset content anon box");
|
"Unexpected parent for fieldset content anon box");
|
||||||
if (aTag == nsGkAtoms::legend &&
|
if (aTag == nsGkAtoms::legend &&
|
||||||
(!aParentFrame ||
|
(!aParentFrame ||
|
||||||
!IsFrameForFieldSet(aParentFrame, aParentFrame->GetType()) ||
|
(aParentFrame->GetType() != nsGkAtoms::fieldSetFrame &&
|
||||||
|
aParentFrame->StyleContext()->GetPseudo() !=
|
||||||
|
nsCSSAnonBoxes::fieldsetContent) ||
|
||||||
!aElement->GetParent() ||
|
!aElement->GetParent() ||
|
||||||
!aElement->GetParent()->IsHTML(nsGkAtoms::fieldset) ||
|
!aElement->GetParent()->IsHTML(nsGkAtoms::fieldset) ||
|
||||||
aStyleContext->StyleDisplay()->IsFloatingStyle() ||
|
aStyleContext->StyleDisplay()->IsFloatingStyle() ||
|
||||||
@ -6009,7 +5984,9 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (IsFrameForFieldSet(parentFrame, parentType)) {
|
else if (nsGkAtoms::fieldSetFrame == parentType ||
|
||||||
|
(nsGkAtoms::fieldSetFrame == grandparentType &&
|
||||||
|
nsGkAtoms::blockFrame == parentType)) {
|
||||||
// Legends can be sibling of legends but not of other content in the fieldset
|
// Legends can be sibling of legends but not of other content in the fieldset
|
||||||
nsIAtom* sibType = aSibling->GetContentInsertionFrame()->GetType();
|
nsIAtom* sibType = aSibling->GetContentInsertionFrame()->GetType();
|
||||||
bool legendContent = aContent->IsHTML(nsGkAtoms::legend);
|
bool legendContent = aContent->IsHTML(nsGkAtoms::legend);
|
||||||
@ -7106,7 +7083,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
|||||||
// fieldsets have multiple insertion points.
|
// fieldsets have multiple insertion points.
|
||||||
NS_ASSERTION(isSingleInsert || frameType != nsGkAtoms::fieldSetFrame,
|
NS_ASSERTION(isSingleInsert || frameType != nsGkAtoms::fieldSetFrame,
|
||||||
"Unexpected parent");
|
"Unexpected parent");
|
||||||
if (IsFrameForFieldSet(parentFrame, frameType) &&
|
if (frameType == nsGkAtoms::fieldSetFrame &&
|
||||||
aStartChild->Tag() == nsGkAtoms::legend) {
|
aStartChild->Tag() == nsGkAtoms::legend) {
|
||||||
// Just reframe the parent, since figuring out whether this
|
// Just reframe the parent, since figuring out whether this
|
||||||
// should be the new legend and then handling it is too complex.
|
// should be the new legend and then handling it is too complex.
|
||||||
|
@ -2807,8 +2807,7 @@ static int32_t gNoiseIndent = 0;
|
|||||||
/* static */ nscoord
|
/* static */ nscoord
|
||||||
nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext,
|
nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext,
|
||||||
nsIFrame *aFrame,
|
nsIFrame *aFrame,
|
||||||
IntrinsicWidthType aType,
|
IntrinsicWidthType aType)
|
||||||
uint32_t aFlags)
|
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(aFrame, "null frame");
|
NS_PRECONDITION(aFrame, "null frame");
|
||||||
NS_PRECONDITION(aType == MIN_WIDTH || aType == PREF_WIDTH, "bad type");
|
NS_PRECONDITION(aType == MIN_WIDTH || aType == PREF_WIDTH, "bad type");
|
||||||
@ -2902,17 +2901,15 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext,
|
|||||||
// fall through
|
// fall through
|
||||||
}
|
}
|
||||||
case NS_STYLE_BOX_SIZING_PADDING: {
|
case NS_STYLE_BOX_SIZING_PADDING: {
|
||||||
if (!(aFlags & IGNORE_PADDING)) {
|
const nsStylePadding* stylePadding = aFrame->StylePadding();
|
||||||
const nsStylePadding* stylePadding = aFrame->StylePadding();
|
nscoord pad;
|
||||||
nscoord pad;
|
if (GetAbsoluteCoord(stylePadding->mPadding.GetTop(), pad) ||
|
||||||
if (GetAbsoluteCoord(stylePadding->mPadding.GetTop(), pad) ||
|
GetPercentHeight(stylePadding->mPadding.GetTop(), aFrame, pad)) {
|
||||||
GetPercentHeight(stylePadding->mPadding.GetTop(), aFrame, pad)) {
|
heightTakenByBoxSizing += pad;
|
||||||
heightTakenByBoxSizing += pad;
|
}
|
||||||
}
|
if (GetAbsoluteCoord(stylePadding->mPadding.GetBottom(), pad) ||
|
||||||
if (GetAbsoluteCoord(stylePadding->mPadding.GetBottom(), pad) ||
|
GetPercentHeight(stylePadding->mPadding.GetBottom(), aFrame, pad)) {
|
||||||
GetPercentHeight(stylePadding->mPadding.GetBottom(), aFrame, pad)) {
|
heightTakenByBoxSizing += pad;
|
||||||
heightTakenByBoxSizing += pad;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// fall through
|
// fall through
|
||||||
}
|
}
|
||||||
@ -2963,22 +2960,18 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext,
|
|||||||
// percentages do not operate linearly.
|
// percentages do not operate linearly.
|
||||||
// Doing this is ok because although percentages aren't handled
|
// Doing this is ok because although percentages aren't handled
|
||||||
// linearly, they are handled monotonically.
|
// linearly, they are handled monotonically.
|
||||||
nscoord coordOutsideWidth = 0;
|
nscoord coordOutsideWidth = offsets.hPadding;
|
||||||
float pctOutsideWidth = 0;
|
float pctOutsideWidth = offsets.hPctPadding;
|
||||||
|
|
||||||
float pctTotal = 0.0f;
|
float pctTotal = 0.0f;
|
||||||
|
|
||||||
if (!(aFlags & IGNORE_PADDING)) {
|
if (boxSizing == NS_STYLE_BOX_SIZING_PADDING) {
|
||||||
coordOutsideWidth += offsets.hPadding;
|
min += coordOutsideWidth;
|
||||||
pctOutsideWidth += offsets.hPctPadding;
|
result = NSCoordSaturatingAdd(result, coordOutsideWidth);
|
||||||
|
pctTotal += pctOutsideWidth;
|
||||||
|
|
||||||
if (boxSizing == NS_STYLE_BOX_SIZING_PADDING) {
|
coordOutsideWidth = 0;
|
||||||
min += coordOutsideWidth;
|
pctOutsideWidth = 0.0f;
|
||||||
result = NSCoordSaturatingAdd(result, coordOutsideWidth);
|
|
||||||
pctTotal += pctOutsideWidth;
|
|
||||||
|
|
||||||
coordOutsideWidth = 0;
|
|
||||||
pctOutsideWidth = 0.0f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
coordOutsideWidth += offsets.hBorder;
|
coordOutsideWidth += offsets.hBorder;
|
||||||
|
@ -988,13 +988,9 @@ public:
|
|||||||
* and margin.
|
* and margin.
|
||||||
*/
|
*/
|
||||||
enum IntrinsicWidthType { MIN_WIDTH, PREF_WIDTH };
|
enum IntrinsicWidthType { MIN_WIDTH, PREF_WIDTH };
|
||||||
enum {
|
|
||||||
IGNORE_PADDING = 0x01
|
|
||||||
};
|
|
||||||
static nscoord IntrinsicForContainer(nsRenderingContext* aRenderingContext,
|
static nscoord IntrinsicForContainer(nsRenderingContext* aRenderingContext,
|
||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame,
|
||||||
IntrinsicWidthType aType,
|
IntrinsicWidthType aType);
|
||||||
uint32_t aFlags = 0);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert nsStyleCoord to nscoord when percentages depend on the
|
* Convert nsStyleCoord to nscoord when percentages depend on the
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "nsStyleConsts.h"
|
#include "nsStyleConsts.h"
|
||||||
#include "nsDisplayList.h"
|
#include "nsDisplayList.h"
|
||||||
#include "nsRenderingContext.h"
|
#include "nsRenderingContext.h"
|
||||||
#include "nsIScrollableFrame.h"
|
|
||||||
#include "mozilla/Likely.h"
|
#include "mozilla/Likely.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
@ -79,10 +78,6 @@ public:
|
|||||||
return nsContainerFrame::IsFrameOfType(aFlags &
|
return nsContainerFrame::IsFrameOfType(aFlags &
|
||||||
~nsIFrame::eCanContainOverflowContainers);
|
~nsIFrame::eCanContainOverflowContainers);
|
||||||
}
|
}
|
||||||
virtual nsIScrollableFrame* GetScrollTargetFrame() MOZ_OVERRIDE
|
|
||||||
{
|
|
||||||
return do_QueryFrame(GetInner());
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
|
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
|
||||||
@ -361,14 +356,10 @@ nsFieldSetFrame::GetIntrinsicWidth(nsRenderingContext* aRenderingContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nsIFrame* inner = GetInner()) {
|
if (nsIFrame* inner = GetInner()) {
|
||||||
// Ignore padding on the inner, since the padding will be applied to the
|
|
||||||
// outer instead, and the padding computed for the inner is wrong
|
|
||||||
// for percentage padding.
|
|
||||||
contentWidth =
|
contentWidth =
|
||||||
nsLayoutUtils::IntrinsicForContainer(aRenderingContext, inner, aType,
|
nsLayoutUtils::IntrinsicForContainer(aRenderingContext, inner, aType);
|
||||||
nsLayoutUtils::IGNORE_PADDING);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::max(legendWidth, contentWidth);
|
return std::max(legendWidth, contentWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -453,10 +444,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
// We don't allow fieldsets to break vertically. If we did, we'd
|
// We don't allow fieldsets to break vertically. If we did, we'd
|
||||||
// need logic here to push and pull overflow frames.
|
// need logic here to push and pull overflow frames.
|
||||||
// Since we're not applying our padding in this frame, we need to add it here
|
nsSize availSize(aReflowState.ComputedWidth(), NS_UNCONSTRAINEDSIZE);
|
||||||
// to compute the available width for our children.
|
|
||||||
nsSize availSize(aReflowState.ComputedWidth() + aReflowState.mComputedPadding.LeftRight(),
|
|
||||||
NS_UNCONSTRAINEDSIZE);
|
|
||||||
NS_ASSERTION(!inner ||
|
NS_ASSERTION(!inner ||
|
||||||
nsLayoutUtils::IntrinsicForContainer(aReflowState.rendContext,
|
nsLayoutUtils::IntrinsicForContainer(aReflowState.rendContext,
|
||||||
inner,
|
inner,
|
||||||
@ -471,7 +459,8 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
"Bogus availSize.width; should be bigger");
|
"Bogus availSize.width; should be bigger");
|
||||||
|
|
||||||
// get our border and padding
|
// get our border and padding
|
||||||
nsMargin border = aReflowState.mComputedBorderPadding - aReflowState.mComputedPadding;
|
const nsMargin &borderPadding = aReflowState.mComputedBorderPadding;
|
||||||
|
nsMargin border = borderPadding - aReflowState.mComputedPadding;
|
||||||
|
|
||||||
// Figure out how big the legend is if there is one.
|
// Figure out how big the legend is if there is one.
|
||||||
// get the legend's margin
|
// get the legend's margin
|
||||||
@ -492,7 +481,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
legendMargin = legend->GetUsedMargin();
|
legendMargin = legend->GetUsedMargin();
|
||||||
mLegendRect.width = legendDesiredSize.width + legendMargin.left + legendMargin.right;
|
mLegendRect.width = legendDesiredSize.width + legendMargin.left + legendMargin.right;
|
||||||
mLegendRect.height = legendDesiredSize.height + legendMargin.top + legendMargin.bottom;
|
mLegendRect.height = legendDesiredSize.height + legendMargin.top + legendMargin.bottom;
|
||||||
mLegendRect.x = 0;
|
mLegendRect.x = borderPadding.left;
|
||||||
mLegendRect.y = 0;
|
mLegendRect.y = 0;
|
||||||
|
|
||||||
nscoord oldSpace = mLegendSpace;
|
nscoord oldSpace = mLegendSpace;
|
||||||
@ -524,22 +513,16 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
// reflow the content frame only if needed
|
// reflow the content frame only if needed
|
||||||
if (reflowInner) {
|
if (reflowInner) {
|
||||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, inner,
|
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, inner,
|
||||||
availSize, -1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
|
availSize);
|
||||||
// Override computed padding, in case it's percentage padding
|
|
||||||
kidReflowState.Init(aPresContext, -1, -1, nullptr,
|
|
||||||
&aReflowState.mComputedPadding);
|
|
||||||
// Our child is "height:100%" but we actually want its height to be reduced
|
// Our child is "height:100%" but we actually want its height to be reduced
|
||||||
// by the amount of content-height the legend is eating up, unless our
|
// by the amount of content-height the legend is eating up, unless our
|
||||||
// height is unconstrained (in which case the child's will be too).
|
// height is unconstrained (in which case the child's will be too).
|
||||||
if (aReflowState.ComputedHeight() != NS_UNCONSTRAINEDSIZE) {
|
if (aReflowState.ComputedHeight() != NS_UNCONSTRAINEDSIZE) {
|
||||||
kidReflowState.SetComputedHeight(
|
kidReflowState.SetComputedHeight(std::max(0, aReflowState.ComputedHeight() - mLegendSpace));
|
||||||
std::max(0, aReflowState.ComputedHeight() - mLegendSpace));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aReflowState.mComputedMinHeight > 0) {
|
kidReflowState.mComputedMinHeight =
|
||||||
kidReflowState.mComputedMinHeight =
|
std::max(0, aReflowState.mComputedMinHeight - mLegendSpace);
|
||||||
std::max(0, aReflowState.mComputedMinHeight - mLegendSpace);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aReflowState.mComputedMaxHeight != NS_UNCONSTRAINEDSIZE) {
|
if (aReflowState.mComputedMaxHeight != NS_UNCONSTRAINEDSIZE) {
|
||||||
kidReflowState.mComputedMaxHeight =
|
kidReflowState.mComputedMaxHeight =
|
||||||
@ -550,7 +533,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
// Reflow the frame
|
// Reflow the frame
|
||||||
NS_ASSERTION(kidReflowState.mComputedMargin == nsMargin(0,0,0,0),
|
NS_ASSERTION(kidReflowState.mComputedMargin == nsMargin(0,0,0,0),
|
||||||
"Margins on anonymous fieldset child not supported!");
|
"Margins on anonymous fieldset child not supported!");
|
||||||
nsPoint pt(border.left, border.top + mLegendSpace);
|
nsPoint pt(borderPadding.left, borderPadding.top + mLegendSpace);
|
||||||
ReflowChild(inner, aPresContext, kidDesiredSize, kidReflowState,
|
ReflowChild(inner, aPresContext, kidDesiredSize, kidReflowState,
|
||||||
pt.x, pt.y, 0, aStatus);
|
pt.x, pt.y, 0, aStatus);
|
||||||
|
|
||||||
@ -559,45 +542,37 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
NS_FRAME_TRACE_REFLOW_OUT("FieldSet::Reflow", aStatus);
|
NS_FRAME_TRACE_REFLOW_OUT("FieldSet::Reflow", aStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRect contentRect;
|
nsRect contentRect(0,0,0,0);
|
||||||
if (inner) {
|
if (inner) {
|
||||||
// We don't support margins on inner, so our content rect is just the
|
// We don't support margins on inner, so our "content rect" is just
|
||||||
// inner's border-box.
|
// its rect.
|
||||||
contentRect = inner->GetRect();
|
contentRect = inner->GetRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Our content rect must fill up the available width
|
// use the computed width if the inner content does not fill it
|
||||||
if (availSize.width > contentRect.width) {
|
if (aReflowState.ComputedWidth() > contentRect.width) {
|
||||||
contentRect.width = availSize.width;
|
contentRect.width = aReflowState.ComputedWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (legend) {
|
if (legend) {
|
||||||
// the legend is postioned horizontally within the inner's content rect
|
// if the content rect is larger then the legend we can align the legend
|
||||||
// (so that padding on the fieldset affects the legend position).
|
if (contentRect.width > mLegendRect.width) {
|
||||||
nsRect innerContentRect = contentRect;
|
|
||||||
innerContentRect.Deflate(aReflowState.mComputedPadding);
|
|
||||||
// if the inner content rect is larger than the legend, we can align the legend
|
|
||||||
if (innerContentRect.width > mLegendRect.width) {
|
|
||||||
int32_t align = static_cast<nsLegendFrame*>
|
int32_t align = static_cast<nsLegendFrame*>
|
||||||
(legend->GetContentInsertionFrame())->GetAlign();
|
(legend->GetContentInsertionFrame())->GetAlign();
|
||||||
|
|
||||||
switch (align) {
|
switch(align) {
|
||||||
case NS_STYLE_TEXT_ALIGN_RIGHT:
|
case NS_STYLE_TEXT_ALIGN_RIGHT:
|
||||||
mLegendRect.x = innerContentRect.XMost() - mLegendRect.width;
|
mLegendRect.x = contentRect.width - mLegendRect.width + borderPadding.left;
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_TEXT_ALIGN_CENTER:
|
case NS_STYLE_TEXT_ALIGN_CENTER:
|
||||||
// Note: rounding removed; there doesn't seem to be any need
|
// Note: rounding removed; there doesn't seem to be any need
|
||||||
mLegendRect.x = innerContentRect.width / 2 - mLegendRect.width / 2 + innerContentRect.x;
|
mLegendRect.x = contentRect.width / 2 - mLegendRect.width / 2 + borderPadding.left;
|
||||||
break;
|
|
||||||
default:
|
|
||||||
mLegendRect.x = innerContentRect.x;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// otherwise make place for the legend
|
// otherwise make place for the legend
|
||||||
mLegendRect.x = innerContentRect.x;
|
contentRect.width = mLegendRect.width;
|
||||||
innerContentRect.width = mLegendRect.width;
|
|
||||||
contentRect.width = mLegendRect.width + aReflowState.mComputedPadding.LeftRight();
|
|
||||||
}
|
}
|
||||||
// place the legend
|
// place the legend
|
||||||
nsRect actualLegendRect(mLegendRect);
|
nsRect actualLegendRect(mLegendRect);
|
||||||
@ -619,16 +594,16 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
// Return our size and our result
|
// Return our size and our result
|
||||||
if (aReflowState.ComputedHeight() == NS_INTRINSICSIZE) {
|
if (aReflowState.ComputedHeight() == NS_INTRINSICSIZE) {
|
||||||
aDesiredSize.height = mLegendSpace +
|
aDesiredSize.height = mLegendSpace +
|
||||||
border.TopBottom() +
|
borderPadding.TopBottom() +
|
||||||
(inner ? inner->GetRect().height : 0);
|
contentRect.height;
|
||||||
} else {
|
} else {
|
||||||
nscoord min = border.TopBottom() + mLegendRect.height;
|
nscoord min = borderPadding.TopBottom() + mLegendRect.height;
|
||||||
aDesiredSize.height =
|
aDesiredSize.height =
|
||||||
aReflowState.ComputedHeight() + aReflowState.mComputedBorderPadding.TopBottom();
|
aReflowState.ComputedHeight() + borderPadding.TopBottom();
|
||||||
if (aDesiredSize.height < min)
|
if (aDesiredSize.height < min)
|
||||||
aDesiredSize.height = min;
|
aDesiredSize.height = min;
|
||||||
}
|
}
|
||||||
aDesiredSize.width = contentRect.width + border.LeftRight();
|
aDesiredSize.width = contentRect.width + borderPadding.LeftRight();
|
||||||
aDesiredSize.SetOverflowAreasToDesiredBounds();
|
aDesiredSize.SetOverflowAreasToDesiredBounds();
|
||||||
if (legend)
|
if (legend)
|
||||||
ConsiderChildOverflow(aDesiredSize.mOverflowAreas, legend);
|
ConsiderChildOverflow(aDesiredSize.mOverflowAreas, legend);
|
||||||
@ -706,6 +681,9 @@ nsFieldSetFrame::ReparentFrameList(const nsFrameList& aFrameList)
|
|||||||
nscoord
|
nscoord
|
||||||
nsFieldSetFrame::GetBaseline() const
|
nsFieldSetFrame::GetBaseline() const
|
||||||
{
|
{
|
||||||
|
// We know inner is a block, so calling GetBaseline() on it will do
|
||||||
|
// the right thing (that being to return the baseline of the last line).
|
||||||
nsIFrame* inner = GetInner();
|
nsIFrame* inner = GetInner();
|
||||||
|
NS_ASSERTION(nsLayoutUtils::GetAsBlock(inner), "Unexpected inner");
|
||||||
return inner->GetPosition().y + inner->GetBaseline();
|
return inner->GetPosition().y + inner->GetBaseline();
|
||||||
}
|
}
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<style>
|
|
||||||
fieldset {
|
|
||||||
background:pink;
|
|
||||||
overflow:hidden;
|
|
||||||
height:100px;
|
|
||||||
}
|
|
||||||
legend::after { content:"legend"; }
|
|
||||||
p {
|
|
||||||
background:lime;
|
|
||||||
height:20px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<fieldset id="f1"><legend></legend><p></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset id="f2"><legend></legend><p></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset id="f3"><legend></legend></fieldset>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,33 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html class="reftest-wait">
|
|
||||||
<head>
|
|
||||||
<style>
|
|
||||||
fieldset {
|
|
||||||
background:pink;
|
|
||||||
overflow:hidden;
|
|
||||||
height:100px;
|
|
||||||
}
|
|
||||||
legend::after { content:"legend"; }
|
|
||||||
p {
|
|
||||||
background:lime;
|
|
||||||
height:20px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<fieldset id="f1"><p></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset id="f2"><p></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset id="f3"></fieldset>
|
|
||||||
<script>
|
|
||||||
function doTest() {
|
|
||||||
f1.appendChild(document.createElement('legend'));
|
|
||||||
f2.insertBefore(document.createElement('legend'), f2.firstChild);
|
|
||||||
f3.appendChild(document.createElement('legend'));
|
|
||||||
document.documentElement.removeAttribute("class");
|
|
||||||
}
|
|
||||||
window.addEventListener("MozReftestInvalidate", doTest);
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,21 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<fieldset style="width:200px; height:200px; padding:0">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
<div style="overflow:hidden; height:100%;">
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<fieldset style="overflow:hidden; width:200px; height:200px; padding:0">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
</fieldset>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,8 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<fieldset style="width:0; padding:0;">
|
|
||||||
<div style="width:400px; height:200px;"></div>
|
|
||||||
</fieldset>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,8 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<fieldset style="padding:50px; float:left;">
|
|
||||||
<div style="width:300px; height:100px;"></div>
|
|
||||||
</fieldset>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,52 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html><head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Testcase for bug 261037</title>
|
|
||||||
<style type="text/css">
|
|
||||||
fieldset, div {
|
|
||||||
background:pink;
|
|
||||||
overflow:auto;
|
|
||||||
height:100px;
|
|
||||||
margin:0; padding:0; border:0;
|
|
||||||
}
|
|
||||||
p {
|
|
||||||
background:blue;
|
|
||||||
height:100px;
|
|
||||||
margin:0; padding:0;
|
|
||||||
}
|
|
||||||
.overflow {
|
|
||||||
height:110px;
|
|
||||||
}
|
|
||||||
.abs {
|
|
||||||
position:absolute;
|
|
||||||
width:100px;
|
|
||||||
top:250px;
|
|
||||||
}
|
|
||||||
p.abs {
|
|
||||||
top:0;left:0;
|
|
||||||
}
|
|
||||||
.b { border:10px solid black; }
|
|
||||||
.p { padding: 7px 0; }
|
|
||||||
.p p { height:114px; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div><p></p></div>
|
|
||||||
<br>
|
|
||||||
<div><p class="overflow"></p></div>
|
|
||||||
<br>
|
|
||||||
<div class="abs"><p class="abs"></p></div>
|
|
||||||
<br>
|
|
||||||
<div class="abs" style="left:120px"><p class="abs overflow"></p></div>
|
|
||||||
<br>
|
|
||||||
<div class="abs b" style="left:240px"><p class="abs"></p></div>
|
|
||||||
<br>
|
|
||||||
<div class="abs b" style="left:370px"><p class="abs overflow"></p></div>
|
|
||||||
<br>
|
|
||||||
<div class="abs b p" style="left:510px"><p class="abs"></p></div>
|
|
||||||
<br>
|
|
||||||
<div class="abs b p" style="left:640px"><p class="abs overflow"></p></div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,52 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html><head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Testcase for bug 261037</title>
|
|
||||||
<style type="text/css">
|
|
||||||
fieldset, div {
|
|
||||||
background:pink;
|
|
||||||
overflow:auto;
|
|
||||||
height:100px;
|
|
||||||
margin:0; padding:0; border:0;
|
|
||||||
}
|
|
||||||
p {
|
|
||||||
background:blue;
|
|
||||||
height:100px;
|
|
||||||
margin:0; padding:0;
|
|
||||||
}
|
|
||||||
.overflow {
|
|
||||||
height:110px;
|
|
||||||
}
|
|
||||||
.abs {
|
|
||||||
position:absolute;
|
|
||||||
width:100px;
|
|
||||||
top:250px;
|
|
||||||
}
|
|
||||||
p.abs {
|
|
||||||
top:0;left:0;
|
|
||||||
}
|
|
||||||
.b { border:10px solid black; }
|
|
||||||
.p { padding: 7px 0; }
|
|
||||||
.p p { height:114px; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<fieldset><p></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset><p class="overflow"></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset class="abs"><p class="abs"></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset class="abs" style="left:120px"><p class="abs overflow"></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset class="abs b" style="left:240px"><p class="abs"></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset class="abs b" style="left:370px"><p class="abs overflow"></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset class="abs b p" style="left:510px"><p class="abs"></p></fieldset>
|
|
||||||
<br>
|
|
||||||
<fieldset class="abs b p" style="left:640px"><p class="abs overflow"></p></fieldset>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<div style="width:700px; border:2px solid green; overflow:hidden">
|
|
||||||
<fieldset style="padding:140px; width:400px;">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
TextTextTextTextTextText
|
|
||||||
</fieldset>
|
|
||||||
<fieldset style="padding:140px; display:inline;">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
TextTextTextTextTextText
|
|
||||||
</fieldset>
|
|
||||||
<fieldset style="padding:140px; float:left;">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
TextTextTextTextTextText
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,19 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<div style="width:700px; border:2px solid green; overflow:hidden">
|
|
||||||
<fieldset style="padding:20%; width:400px;">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
TextTextTextTextTextText
|
|
||||||
</fieldset>
|
|
||||||
<fieldset style="padding:20%; display:inline;">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
TextTextTextTextTextText
|
|
||||||
</fieldset>
|
|
||||||
<fieldset style="padding:20%; float:left;">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
TextTextTextTextTextText
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,9 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<fieldset style="width:200px; height:200px; padding:0">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
<div style="overflow:scroll; height:100%">
|
|
||||||
</fieldset>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,8 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<fieldset style="overflow:scroll; width:200px; height:200px; padding:0">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
</fieldset>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,24 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<fieldset style="width:200px; height:200px; padding:0">
|
|
||||||
<legend style="overflow:hidden">Legend</legend>
|
|
||||||
<div id="d" style="overflow:hidden; height:100%;">
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<script>
|
|
||||||
d.scrollTop = 20;
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,27 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html class="reftest-wait">
|
|
||||||
<body>
|
|
||||||
<fieldset id="f" style="overflow:hidden; width:200px; height:200px; padding:0">
|
|
||||||
<legend style="overflow:hidden">Legend</legend>
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
<p>Hello Kitty
|
|
||||||
</fieldset>
|
|
||||||
<script>
|
|
||||||
f.scrollTop = 0;
|
|
||||||
function doTest() {
|
|
||||||
f.scrollTop = 20;
|
|
||||||
document.documentElement.removeAttribute("class");
|
|
||||||
}
|
|
||||||
window.addEventListener("MozReftestInvalidate", doTest);
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,11 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<fieldset style="position:relative; overflow:hidden; width:500px; height:500px;">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
<div style="height:1000px;">
|
|
||||||
<div style="position:absolute; left:20px; top:20px; background:yellow;">Abs-pos</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,14 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
<fieldset id="f" style="position:relative; overflow:hidden; width:500px; height:500px;">
|
|
||||||
<legend>Legend</legend>
|
|
||||||
<div style="height:1000px;">
|
|
||||||
<div style="position:absolute; left:20px; top:50px; background:yellow;">Abs-pos</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<script>
|
|
||||||
f.scrollTop = 30;
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,8 +0,0 @@
|
|||||||
== dynamic-legend-scroll-1.html dynamic-legend-scroll-1-ref.html
|
|
||||||
== fieldset-hidden-1.html fieldset-hidden-1-ref.html
|
|
||||||
== fieldset-intrinsic-width-1.html fieldset-intrinsic-width-1-ref.html
|
|
||||||
== fieldset-percentage-padding-1.html fieldset-percentage-padding-1-ref.html
|
|
||||||
== fieldset-scroll-1.html fieldset-scroll-1-ref.html
|
|
||||||
== fieldset-scrolled-1.html fieldset-scrolled-1-ref.html
|
|
||||||
== fieldset-overflow-auto-1.html fieldset-overflow-auto-1-ref.html
|
|
||||||
== positioned-container-1.html positioned-container-1-ref.html
|
|
@ -6,9 +6,6 @@ include button/reftest.list
|
|||||||
# legend element
|
# legend element
|
||||||
include legend/reftest.list
|
include legend/reftest.list
|
||||||
|
|
||||||
# fieldset element
|
|
||||||
include fieldset/reftest.list
|
|
||||||
|
|
||||||
# placeholder
|
# placeholder
|
||||||
include placeholder/reftest.list
|
include placeholder/reftest.list
|
||||||
|
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
display: block;
|
display: block;
|
||||||
unicode-bidi: inherit;
|
unicode-bidi: inherit;
|
||||||
text-overflow: inherit;
|
text-overflow: inherit;
|
||||||
overflow: inherit;
|
|
||||||
padding: inherit;
|
|
||||||
height: 100%; /* Need this so percentage heights of kids work right */
|
height: 100%; /* Need this so percentage heights of kids work right */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user