Backed out changeset 0ea22856b5d9 (bug 484448).

This commit is contained in:
Boris Zbarsky 2009-04-08 15:56:43 -04:00
Родитель ac3a8c320a
Коммит b818d2b5ff
52 изменённых файлов: 186 добавлений и 924 удалений

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

@ -585,10 +585,6 @@ nsGenericDOMDataNode::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
void
nsGenericDOMDataNode::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
{
// Unset FRAMETREE_DEPENDS_ON_CHARS; if we need it again later, it'll get set
// again.
UnsetFlags(FRAMETREE_DEPENDS_ON_CHARS);
nsIDocument *document = GetCurrentDoc();
if (document) {
// Notify XBL- & nsIAnonymousContentCreator-generated

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

@ -43,9 +43,6 @@
#ifndef nsGenericDOMDataNode_h___
#define nsGenericDOMDataNode_h___
// This bit is set if the frame tree depends on whether this node is whitespace
#define FRAMETREE_DEPENDS_ON_CHARS (1 << NODE_TYPE_SPECIFIC_BITS_OFFSET)
#include "nsIDOMCharacterData.h"
#include "nsIDOMEventTarget.h"
#include "nsIDOM3Text.h"

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

@ -122,7 +122,6 @@
#include "nsIFocusEventSuppressor.h"
#include "nsBox.h"
#include "nsTArray.h"
#include "nsGenericDOMDataNode.h"
#ifdef MOZ_XUL
#include "nsIRootBox.h"
@ -1924,6 +1923,13 @@ nsCSSFrameConstructor::CreateGeneratedContentItem(nsFrameConstructorState& aStat
kNameSpaceID_None, pseudoStyleContext,
ITEM_IS_GENERATED_CONTENT, aItems);
}
static PRBool
TextIsOnlyWhitespace(nsIContent* aContent)
{
return aContent->IsNodeOfType(nsINode::eTEXT) &&
aContent->TextIsOnlyWhitespace();
}
/****************************************************
** BEGIN TABLE SECTION
@ -2368,21 +2374,9 @@ NeedFrameFor(nsIFrame* aParentFrame,
// want to be reconstructing frames. It's not even clear that these
// should be considered ignorable just because they evaluate to
// whitespace.
// We could handle all this in CreateNeededTablePseudos or some other place
// after we build our frame construction items, but that would involve
// creating frame construction items for whitespace kids of
// eExcludesIgnorableWhitespace frames, where we know we'll be dropping them
// all anyway, and involve an extra walk down the frame construction item
// list.
if (!aParentFrame->IsFrameOfType(nsIFrame::eExcludesIgnorableWhitespace) ||
aParentFrame->IsGeneratedContentFrame() ||
!aChildContent->IsNodeOfType(nsINode::eTEXT)) {
return PR_TRUE;
}
aChildContent->SetFlags(FRAMETREE_DEPENDS_ON_CHARS);
return !aChildContent->TextIsOnlyWhitespace();
return !aParentFrame->IsFrameOfType(nsIFrame::eExcludesIgnorableWhitespace)
|| !TextIsOnlyWhitespace(aChildContent)
|| aParentFrame->IsGeneratedContentFrame();
}
/***********************************************
@ -6176,7 +6170,6 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
"Unexpected parent");
// Deal with possible :after generated content on the parent
nsIFrame* origParentFrame = parentFrame;
nsIFrame* parentAfterFrame;
parentFrame =
::AdjustAppendParentForAfterContent(mPresShell->GetPresContext(),
@ -6212,27 +6205,13 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
items);
}
// Determine whether this is an insert at the beginning
PRBool isInsertAtStart = PR_TRUE;
nsIFrame* curParent = parentFrame;
nsIFrame* curAfterChild = parentAfterFrame;
do {
if (curParent->GetPrevContinuation() ||
curParent->GetFirstChild(nsnull) != curAfterChild) {
isInsertAtStart = PR_FALSE;
break;
}
curAfterChild = curParent;
curParent = curParent->GetParent();
} while (curAfterChild != origParentFrame);
// Perform special check for diddling around with the frames in
// a special inline frame.
// If we're appending before :after content, then we're not really
// appending, so let WipeContainingBlock know that.
LAYOUT_PHASE_TEMP_EXIT();
if (WipeContainingBlock(state, containingBlock, parentFrame, items,
!parentAfterFrame, isInsertAtStart, nsnull)) {
!parentAfterFrame, nsnull)) {
LAYOUT_PHASE_TEMP_REENTER();
return NS_OK;
}
@ -6648,9 +6627,7 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer,
// appending, so let WipeContainingBlock know that.
LAYOUT_PHASE_TEMP_EXIT();
if (WipeContainingBlock(state, containingBlock, parentFrame, items,
isAppend && !appendAfterFrame,
prevSibling == nsnull,
prevSibling)) {
isAppend && !appendAfterFrame, prevSibling)) {
LAYOUT_PHASE_TEMP_REENTER();
return NS_OK;
}
@ -6680,10 +6657,7 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer,
// the WipeContainingBlock above, since this should only happen when neither
// parent is a special frame (and in fact, only when one is an outer table
// and one is an inner table or when the parent is a fieldset or fieldset
// content frame). So it won't affect the {ib} or XUL box cases in
// WipeContainingBlock(), and the table pseudo handling will only be affected
// by us maybe thinking we're not inserting at the beginning, whereas we
// really are. That would have made us reframe unnecessarily, but that's ok.
// content frame).
// XXXbz we should push our frame construction item code up higher, so we
// know what our items are by the time we start figuring out previous
// siblings
@ -7481,15 +7455,6 @@ nsCSSFrameConstructor::CharacterDataChanged(nsIContent* aContent,
AUTO_LAYOUT_PHASE_ENTRY_POINT(mPresShell->GetPresContext(), FrameC);
nsresult rv = NS_OK;
if (aContent->HasFlag(FRAMETREE_DEPENDS_ON_CHARS)) {
#ifdef DEBUG
nsIFrame* frame = mPresShell->GetPrimaryFrameFor(aContent);
NS_ASSERTION(!frame || !frame->IsGeneratedContentFrame(),
"Bit should never be set on generated content");
#endif
return RecreateFramesForContent(aContent);
}
// Find the child frame
nsIFrame* frame = mPresShell->GetPrimaryFrameFor(aContent);
@ -8746,28 +8711,6 @@ nsCSSFrameConstructor::MaybeRecreateFramesForContent(nsIContent* aContent)
return result;
}
static nsIFrame*
FindFirstNonWhitespaceChild(nsIFrame* aParentFrame)
{
nsIFrame* f = aParentFrame->GetFirstChild(nsnull);
while (f && f->GetType() == nsGkAtoms::textFrame &&
f->GetContent()->TextIsOnlyWhitespace()) {
f = f->GetNextSibling();
}
return f;
}
static nsIFrame*
FindNextNonWhitespaceSibling(nsIFrame* aFrame)
{
nsIFrame* f = aFrame;
do {
f = f->GetNextSibling();
} while (f && f->GetType() == nsGkAtoms::textFrame &&
f->GetContent()->TextIsOnlyWhitespace());
return f;
}
PRBool
nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
nsresult* aResult)
@ -8801,8 +8744,8 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
NS_ASSERTION(inFlowFrame, "How did that happen?");
nsIFrame* parent = inFlowFrame->GetParent();
if (IsTablePseudo(parent)) {
if (FindFirstNonWhitespaceChild(parent) == inFlowFrame ||
!FindNextNonWhitespaceSibling(inFlowFrame->GetLastContinuation()) ||
if (parent->GetFirstChild(nsnull) == inFlowFrame ||
!inFlowFrame->GetLastContinuation()->GetNextSibling() ||
// If we're a table-column-group, then the GetFirstChild check above is
// not going to catch cases when we're the first child.
(inFlowFrame->GetType() == nsGkAtoms::tableColGroupFrame &&
@ -9114,104 +9057,107 @@ nsCSSFrameConstructor::CreateNeededTablePseudos(FrameConstructionItemList& aItem
FCItemIterator iter(aItems);
do {
if (iter.SkipItemsWantingParentType(ourParentType)) {
// Nothing else to do here; we're finished
return NS_OK;
NS_ASSERTION(!iter.IsDone(), "How did that happen?");
// Advance to the next item that wants a different parent type.
while (iter.item().DesiredParentType() == ourParentType) {
iter.Next();
if (iter.IsDone()) {
// Nothing else to do here; we're finished
return NS_OK;
}
}
NS_ASSERTION(!iter.IsDone() &&
iter.item().DesiredParentType() != ourParentType,
"Why did we stop?");
// Now we're pointing to the first child that wants a different parent
// type.
// type. Except for generated content, we should have already enforced the
// fact that no such items are whitespace (either in this method when
// constructing wrapping items, or when constructing the original
// FrameConstructionItemList).
NS_ASSERTION(aParentFrame->IsGeneratedContentFrame() ||
!iter.item().mIsText ||
!iter.item().mContent->TextIsOnlyWhitespace(),
"Why do we have whitespace under a known-table parent?");
// Now try to figure out what kids we can group together. We can generally
// group everything that has a different desired parent type from us. Two
// exceptions to this:
// 1) If our parent type is table, we can't group columns with anything
// else other than whitespace.
// 2) Whitespace that lies between two things we can group which both want
// a non-block parent should be dropped, even if we can't group them
// with each other and even if the whitespace wants a parent of
// ourParentType. Ends of the list count as things that don't want a
// block parent (so that for example we'll drop a whitespace-only list).
// 2) Whitespace that lies between two things we can group should
// be dropped, even if we can't group them with each other.
// XXXbz it's not clear to me that rule 2 is a good one, it's not called
// for by the (admittedly vague) spec, and in fact it leads to some pretty
// crappy behavior if you have some inlines and whitespace as kids of a
// table-row, say, but it's more or less what we used to do. More
// precisely, we shipped all whitespace out to the nearest block parent of
// the whole mess, sort of. In any case this aspect of things, and in fact
// this whole function might need changes as the spec here gets
// clarified... I happen to think we should not drop whitespace that comes
// between things that want a block parent.
FCItemIterator endIter(iter); /* iterator to find the end of the group */
ParentType groupingParentType = endIter.item().DesiredParentType();
if (aItems.AllWantParentType(groupingParentType) &&
groupingParentType != eTypeBlock) {
// Just group them all and be done with it. We need the check for
// eTypeBlock here to catch the "all the items are whitespace" case
// described above.
endIter.SetToEnd();
} else {
// Locate the end of the group.
// If we decide to, we could optimize this by checking whether
// aItems.AllWantParentType(groupingParentType) and if so just setting
// endIter to the end of the list, which is an O(1) operation. That
// requires not dropping whitespace between items that want a block parent,
// though, per the XXX comment above, since a whole bunch of spans and
// whitespace would test true to all wanting a block parent.
do {
endIter.Next();
if (endIter.IsDone()) {
break;
}
// Keep track of the type the previous item wanted, in case we have to
// deal with whitespace. Start it off with ourParentType, since that's
// the last thing |iter| would have skipped over.
ParentType prevParentType = ourParentType;
do {
/* Walk an iterator past any whitespace that we might be able to drop from the list */
FCItemIterator spaceEndIter(endIter);
if (prevParentType != eTypeBlock &&
!aParentFrame->IsGeneratedContentFrame() &&
spaceEndIter.item().IsWhitespace()) {
PRBool trailingSpaces = spaceEndIter.SkipWhitespace();
if (!aParentFrame->IsGeneratedContentFrame() &&
endIter.item().IsWhitespace()) {
// Whitespace coming after some groupable items
FCItemIterator textSkipIter(endIter);
do {
textSkipIter.Next();
} while (!textSkipIter.IsDone() && textSkipIter.item().IsWhitespace());
// See whether we can drop the whitespace
if (trailingSpaces ||
spaceEndIter.item().DesiredParentType() != eTypeBlock) {
PRBool updateStart = (iter == endIter);
endIter.DeleteItemsTo(spaceEndIter);
NS_ASSERTION(trailingSpaces == endIter.IsDone(), "These should match");
PRBool trailingSpace = textSkipIter.IsDone();
if (// Trailing whitespace we can't handle
(trailingSpace && ourParentType != eTypeBlock) ||
// Whitespace before kids needing wrapping
(!trailingSpace &&
textSkipIter.item().DesiredParentType() != ourParentType)) {
// Drop all the whitespace here so that |endIter| now points to the
// same thing as |textSkipIter|. This doesn't affect where |iter|
// points, since that's guaranted to point to before endIter.
do {
endIter.DeleteItem();
} while (endIter != textSkipIter);
if (updateStart) {
iter = endIter;
}
if (trailingSpaces) {
break; /* Found group end */
}
if (updateStart) {
// Update groupingParentType, since it might have been eTypeBlock
// just because of the whitespace.
groupingParentType = iter.item().DesiredParentType();
}
NS_ASSERTION(endIter.IsDone() == trailingSpace,
"endIter == skipIter now!");
if (trailingSpace) {
break; // The loop advancing endIter
}
}
}
// Now endIter points to a non-whitespace item or a non-droppable
// whitespace item. In the latter case, if this is the end of the group
// we'll traverse this whitespace again. But it'll all just be quick
// DesiredParentType() checks which will match ourParentType (that's
// what it means that this is the group end), so it's OK.
prevParentType = endIter.item().DesiredParentType();
if (prevParentType == ourParentType) {
// End the group at endIter.
break;
}
ParentType itemParentType = endIter.item().DesiredParentType();
if (ourParentType == eTypeTable &&
(prevParentType == eTypeColGroup) !=
(groupingParentType == eTypeColGroup)) {
// Either we started with columns and now found something else, or vice
// versa. In any case, end the grouping.
break;
}
if (itemParentType == ourParentType) {
break;
}
// Include the whitespace we didn't drop (if any) in the group, since
// this is not the end of the group. Note that this doesn't change
// prevParentType, since if we didn't drop the whitespace then we ended
// at something that wants a block parent.
endIter = spaceEndIter;
if (ourParentType == eTypeTable &&
(itemParentType == eTypeColGroup) !=
(groupingParentType == eTypeColGroup)) {
// Either we started with columns and now found something else, or vice
// versa. In any case, end the grouping.
break;
}
} while (1);
endIter.Next();
} while (!endIter.IsDone());
}
if (iter == endIter) {
// Nothing to wrap here; just skipped some whitespace
continue;
}
NS_ASSERTION(iter != endIter, "How did that happen?");
// Now group together all the items between iter and endIter. The right
// parent type to use depends on ourParentType.
@ -10827,9 +10773,8 @@ PRBool
nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
nsIFrame* aContainingBlock,
nsIFrame* aFrame,
FrameConstructionItemList& aItems,
const FrameConstructionItemList& aItems,
PRBool aIsAppend,
PRBool aIsInsertAtStart,
nsIFrame* aPrevSibling)
{
if (aItems.IsEmpty()) {
@ -10857,82 +10802,6 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
// table pseudo-frame, then all the kids in this list would have wanted a
// frame of that type wrapping them anyway, so putting them inside it is ok.
if (!aItems.AllWantParentType(parentType)) {
// Don't give up yet. If parentType is not eTypeBlock and the parent is
// not a generated content frame, then try filtering whitespace out of the
// list.
if (parentType != eTypeBlock && !aFrame->IsGeneratedContentFrame()) {
// For leading whitespace followed by a kid that wants our parent type,
// there are three cases:
// 1) We have a previous sibling. That means that previous sibling
// wanted a (non-block) parent of the type we're looking at. Then the
// whitespace comes between two table-internal elements, so should be
// collapsed out.
// 2) We have no previous sibling but aIsInsertAtStart is true. That
// means that we'll be at the beginning of our non-block-type parent,
// and the whitespace is OK to collapse out. If something is ever
// inserted before us, it'll find our own parent as its parent and if
// it's something that would care about the whitespace it'll want a
// block parent, so it'll trigger a reframe at that point.
// 3) We have no previous sibling and aIsInsertAtStart is false. In this
// case it might be that we're actually in ContentAppended and have a
// previous sibling that will want the whitespace. We can't filter it
// out in this case.
//
// XXXbz really, we should figure out the correct prevSibling in
// ContentAppended and pass it in here, I would think. We end up having
// to sort it out anyway, eventually... Then we could just check the
// prevSibling to decide on what to do with the whitespace.
//
// It's always OK to drop whitespace between any two items that want a
// parent of type parentType.
//
// For trailing whitespace, the situation is more complicated. We might
// in fact have a next sibling that would care about the whitespace. We
// just don't know anything about that here. So leave trailing
// whitespace be, unless aIsAppend is true. If it's true, we have no
// next sibling, and if one ever gets added that would care about the
// whitespace it'll get us as a previous sibling and trigger a reframe.
FCItemIterator iter(aItems);
FCItemIterator start(iter);
do {
if (iter.SkipItemsWantingParentType(parentType)) {
break;
}
// iter points to an item that wants a different parent. If it's not
// whitespace, we're done; no more point scanning the list.
if (!iter.item().IsWhitespace()) {
break;
}
if (iter == start && !aPrevSibling && !aIsInsertAtStart) {
// Leading whitespace, not inserting at the start, and don't know
// whether our previous sibling might want this whitespace. See the
// long comment above. Need to reframe.
break;
}
FCItemIterator spaceEndIter(iter);
// Advance spaceEndIter past any whitespace
PRBool trailingSpaces = spaceEndIter.SkipWhitespace();
if ((!trailingSpaces &&
spaceEndIter.item().DesiredParentType() == parentType) ||
(trailingSpaces && aIsAppend)) {
// Drop the whitespace
iter.DeleteItemsTo(spaceEndIter);
} else {
// We're done: we don't want to drop the whitespace, and it has the
// wrong parent type.
break;
}
// Now loop, since |iter| points to item right after the whitespace we
// removed.
} while (!iter.IsDone());
}
// We might be able to figure out some sort of optimizations here, but they
// would have to depend on having a correct aPrevSibling and a correct next
// sibling. For example, we can probably avoid reframing if none of
@ -10941,18 +10810,10 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
// in fact do not have a reliable aPrevSibling, nor any next sibling, in
// this method.
// aItems might have changed, so recheck the parent type thing. In fact,
// it might be empty, so recheck that too.
if (aItems.IsEmpty()) {
return PR_FALSE;
}
if (!aItems.AllWantParentType(parentType)) {
// Reframing aFrame->GetContent() is good enough, since the content of
// table pseudo-frames is the ancestor content.
RecreateFramesForContent(aFrame->GetContent());
return PR_TRUE;
}
// Reframing aFrame->GetContent() is good enough, since the content of
// table pseudo-frames is the ancestor content.
RecreateFramesForContent(aFrame->GetContent());
return PR_TRUE;
}
// Situation #3 is an inline frame that will now contain block
@ -11675,19 +11536,6 @@ nsCSSFrameConstructor::LazyGenerateChildrenEvent::Run()
return NS_OK;
}
//////////////////////////////////////////////////////////
// nsCSSFrameConstructor::FrameConstructionItem methods //
//////////////////////////////////////////////////////////
PRBool
nsCSSFrameConstructor::FrameConstructionItem::IsWhitespace() const
{
if (!mIsText) {
return PR_FALSE;
}
mContent->SetFlags(FRAMETREE_DEPENDS_ON_CHARS);
return mContent->TextIsOnlyWhitespace();
}
//////////////////////////////////////////////////////////////
// nsCSSFrameConstructor::FrameConstructionItemList methods //
//////////////////////////////////////////////////////////////
@ -11709,36 +11557,6 @@ AdjustCountsForItem(FrameConstructionItem* aItem, PRInt32 aDelta)
////////////////////////////////////////////////////////////////////////
// nsCSSFrameConstructor::FrameConstructionItemList::Iterator methods //
////////////////////////////////////////////////////////////////////////
inline PRBool
nsCSSFrameConstructor::FrameConstructionItemList::
Iterator::SkipItemsWantingParentType(ParentType aParentType)
{
NS_PRECONDITION(!IsDone(), "Shouldn't be done yet");
while (item().DesiredParentType() == aParentType) {
Next();
if (IsDone()) {
return PR_TRUE;
}
}
return PR_FALSE;
}
inline PRBool
nsCSSFrameConstructor::FrameConstructionItemList::
Iterator::SkipWhitespace()
{
NS_PRECONDITION(!IsDone(), "Shouldn't be done yet");
NS_PRECONDITION(item().IsWhitespace(), "Not pointing to whitespace?");
do {
Next();
if (IsDone()) {
return PR_TRUE;
}
} while (item().IsWhitespace());
return PR_FALSE;
}
void
nsCSSFrameConstructor::FrameConstructionItemList::
Iterator::AppendItemToList(FrameConstructionItemList& aTargetList)
@ -11801,18 +11619,11 @@ Iterator::InsertItem(FrameConstructionItem* aItem)
}
void
nsCSSFrameConstructor::FrameConstructionItemList::
Iterator::DeleteItemsTo(const Iterator& aEnd)
nsCSSFrameConstructor::FrameConstructionItemList::Iterator::DeleteItem()
{
NS_PRECONDITION(mEnd == aEnd.mEnd, "end iterator for some other list?");
NS_PRECONDITION(*this != aEnd, "Shouldn't be at aEnd yet");
do {
NS_ASSERTION(!IsDone(), "Ran off end of list?");
FrameConstructionItem* item = ToItem(mCurrent);
Next();
PR_REMOVE_LINK(item);
mList.AdjustCountsForItem(item, -1);
delete item;
} while (*this != aEnd);
FrameConstructionItem* item = ToItem(mCurrent);
Next();
PR_REMOVE_LINK(item);
mList.AdjustCountsForItem(item, -1);
delete item;
}

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

@ -747,11 +747,6 @@ private:
PRBool operator!=(const Iterator& aOther) const {
return !(*this == aOther);
}
Iterator& operator=(const Iterator& aOther) {
NS_ASSERTION(mEnd == aOther.mEnd, "Iterators for different lists?");
mCurrent = aOther.mCurrent;
return *this;
}
operator FrameConstructionItem& () {
return item();
@ -766,17 +761,6 @@ private:
NS_ASSERTION(!IsDone(), "Should have checked IsDone()!");
mCurrent = PR_NEXT_LINK(mCurrent);
}
void SetToEnd() { mCurrent = mEnd; }
// Skip over all items that want a parent type different from the given
// one. Return whether the iterator is done after doing that. The
// iterator must not be done when this is called.
inline PRBool SkipItemsWantingParentType(ParentType aParentType);
// Skip over whitespace. Return whether the iterator is done after doing
// that. The iterator must not be done, and must be pointing to a
// whitespace item when this is called.
inline PRBool SkipWhitespace();
// Remove the item pointed to by this iterator from its current list and
// Append it to aTargetList. This iterator is advanced to point to the
@ -800,12 +784,9 @@ private:
// case this call just appends the given item to the list.
void InsertItem(FrameConstructionItem* aItem);
// Delete the items between this iterator and aEnd, including the item
// this iterator currently points to but not including the item pointed
// to by aEnd. When this returns, this iterator will point to the same
// item as aEnd. This iterator must not equal aEnd when this method is
// called.
void DeleteItemsTo(const Iterator& aEnd);
// Delete the item pointed to by this iterator, and point ourselves to
// the next item in the list.
void DeleteItem();
private:
PRCList* mCurrent;
@ -859,11 +840,9 @@ private:
ParentType DesiredParentType() {
return FCDATA_DESIRED_PARENT_TYPE(mFCData->mBits);
}
// Don't call this unless the frametree really depends on the answer!
// Especially so for generated content, where we don't want to reframe
// things.
PRBool IsWhitespace() const;
PRBool IsWhitespace() const {
return mIsText && mContent->TextIsOnlyWhitespace();
}
// The FrameConstructionData to use.
const FrameConstructionData* mFCData;
@ -1368,17 +1347,14 @@ private:
// ignored. Otherwise it may be used to determine whether to reframe when
// inserting into the block of an {ib} split. Passing a null aPrevSibling in
// the non-append case is ok in terms of correctness. It might reframe when
// we don't really need to, but that's it. Passing in a correct
// aIsInsertAtStart is desirable for performance reasons, but if it's hard to
// determine passing false is safe in terms of correctness.
// we don't really need to, but that's it.
// @return PR_TRUE if we reconstructed the containing block, PR_FALSE
// otherwise
PRBool WipeContainingBlock(nsFrameConstructorState& aState,
nsIFrame* aContainingBlock,
nsIFrame* aFrame,
FrameConstructionItemList& aItems,
const FrameConstructionItemList& aItems,
PRBool aIsAppend,
PRBool aIsInsertAtStart,
nsIFrame* aPrevSibling);
nsresult ReframeContainingBlock(nsIFrame* aFrame);

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

@ -3422,8 +3422,6 @@ nsTextFrame::Init(nsIContent* aContent,
void
nsTextFrame::Destroy()
{
// We might want to clear FRAMETREE_DEPENDS_ON_CHARS on mContent here, since
// our parent frame type might be changing. Not clear whether it's worth it.
ClearTextRun();
if (mNextContinuation) {
mNextContinuation->SetPrevInFlow(nsnull);

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

@ -84,7 +84,8 @@ public:
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsTableOuterFrame::IsFrameOfType(aFlags & ~(nsIFrame::eMathML));
return nsTableOuterFrame::IsFrameOfType(aFlags &
~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace));
}
protected:
@ -142,7 +143,8 @@ public:
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsTableFrame::IsFrameOfType(aFlags & ~(nsIFrame::eMathML));
return nsTableFrame::IsFrameOfType(aFlags &
~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace));
}
// helper to restyle and reflow the table when a row is changed -- since MathML
@ -199,7 +201,8 @@ public:
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsTableRowFrame::IsFrameOfType(aFlags & ~(nsIFrame::eMathML));
return nsTableRowFrame::IsFrameOfType(aFlags &
~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace));
}
// helper to restyle and reflow the table -- @see nsMathMLmtableFrame.
@ -235,7 +238,8 @@ public:
virtual PRInt32 GetColSpan();
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsTableCellFrame::IsFrameOfType(aFlags & ~(nsIFrame::eMathML));
return nsTableCellFrame::IsFrameOfType(aFlags &
~(nsIFrame::eMathML | nsIFrame::eExcludesIgnorableWhitespace));
}
protected:

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

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<body style="font-family: monospace">
<div>
Row 1, Col 1Row 1, Col 2Row 1, Col 3
</div>
<div>
Row 22, Col 1Row 22, Col 2Row 22, Col 3
</div>
<div>
Row 333, Col 1Row 333, Col 2Row 333, Col 3
</div>
</body>
</html>

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

@ -1,21 +1,21 @@
<!DOCTYPE html>
<html>
<body style="font-family: monospace">
<table cellpadding="0" cellspacing="0" style="margin: 0; padding: 0; border: none">
<table cellpadding="0" cellspacing="0">
<tr>
<td>Row 1, Col 1</td>
<td>Row 1, Col 2</td>
<td>Row 1, Col 3</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" style="margin: 0; padding: 0; border: none">
<table cellpadding="0" cellspacing="0">
<tr>
<td>Row 22, Col 1</td>
<td>Row 22, Col 2</td>
<td>Row 22, Col 3</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" style="margin: 0; padding: 0; border: none">
<table cellpadding="0" cellspacing="0">
<tr>
<td>Row 333, Col 1</td>
<td>Row 333, Col 2</td>

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

@ -1,10 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<table border="1"><tbody><tr><td>TD</td></tr></tbody></table>
</body>
</html>

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

@ -1,15 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<table border="1" id="table">XXX<tbody><tr><td>TD</td></tr></tbody></table>
<script>
document.body.offsetWidth;
document.getElementById("table").firstChild.data = '';
</script>
</body>
</html>

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

@ -1,15 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<table border="1"><tbody id="tbody">XXX<tr><td>TD</td></tr></tbody></table>
<script>
document.body.offsetWidth;
document.getElementById("tbody").firstChild.data = '';
</script>
</body>
</html>

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

@ -1,15 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<table border="1"><tbody><tr id="tr">XXX<td>TD</td></tr></tbody></table>
<script>
document.body.offsetWidth;
document.getElementById("tr").firstChild.data = '';
</script>
</body>
</html>

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

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<body style="font-family: monospace">
<table cellpadding="0" cellspacing="0" style="margin: 0; padding: 0; border: none">
<table cellpadding="0" cellspacing="0">
<colgroup><col style="background: yellow"><col style="background: cyan"><col style="background: lime"></colgroup>
<tr>
<td>Row 1, Col 1</td>

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

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<body style="font-family: monospace">
<table cellpadding="0" cellspacing="0" style="margin: 0; padding: 0; border: none">
<table cellpadding="0" cellspacing="0">
<tr>
<td>Row 1, Col 1</td>
<td>Row 1, Col 2</td>

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

@ -3,9 +3,7 @@
<head>
<script>
function doTest() {
try {
document.normalize();
} catch(e) {}
document.normalize();
var n = document.getElementById("t").nextSibling;
n.parentNode.removeChild(n);
document.documentElement.className = "";

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

@ -4,10 +4,9 @@
<!-- The test in the first row might not be correct, depending on spec
clarifications -->
<span style="display: table-row">
<span>Row 1,</span>
<span>Col 1Row 1,</span>
<span>Col 2Row 1,</span>
<span>Col 3</span>
<span>Row 1, Col 1</span>
<span>Row 1, Col 2</span>
<span>Row 1, Col 3</span>
</span>
<span style="display: table-row">
<span style="display: block">Row 22, Col 1Row 22, Col 2Row 22, Col 3</span>

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

@ -4,12 +4,12 @@
fails == 156888-1.html 156888-1-ref.html # bug 484825
== 156888-2.html 156888-2-ref.html
== 162063-1.xhtml about:blank
== 203923-1.html white-space-ref.html
== 203923-2.html white-space-ref.html
== 203923-1.html white-space-1-ref.html
== 203923-2.html white-space-1-ref.html
== 208305-1.html 208305-1-ref.html
== 208305-2.html white-space-ref.html
== 208305-3.html white-space-ref.html
== 208305-4.html white-space-ref.html
== 208305-2.html white-space-1-ref.html
== 208305-3.html white-space-1-ref.html
== 208305-4.html white-space-1-ref.html
== 277995-1.html 277995-1-ref.html
== 293576-1.html 293576-1-ref.html
== 302113-1.html 302113-1-ref.html
@ -21,9 +21,6 @@ fails == 156888-1.html 156888-1-ref.html # bug 484825
== 339388-1b.html 339388-1-ref.html
== 368932-1.html 368932-1-ref.html
== 371054-1.html 371054-1-ref.html
== 372641-1a.xhtml 372641-1-ref.xhtml
== 372641-1b.xhtml 372641-1-ref.xhtml
== 372641-1c.xhtml 372641-1-ref.xhtml
== 372649-1.html 372649-1-ref.html
== 373379-1.html 373379-1-ref.html
== 394402-1a.html 394402-1-ref.html
@ -41,7 +38,6 @@ fails == 156888-1.html 156888-1-ref.html # bug 484825
== infer-table-row-cell.html 3x3-ref.html # Or should it be? Spec is unclear.
== infer-table.html 3x3-ref.html
!= 3-tables-ref.html 3x3-ref.html
== 3-tables-ref.html 3-blocks-ref.html
== blocks-divide-tables-1.html 3-tables-ref.html
== blocks-divide-tables-2.html 3-tables-ref.html
== infer-cells-1.html 3-tables-ref.html
@ -59,10 +55,10 @@ fails == 156888-1.html 156888-1-ref.html # bug 484825
== dynamic-removal-6.html 3x3-ref.html
== dynamic-removal-7.html 3x3-ref.html
== dynamic-removal-8.html 3x3-ref.html
== dynamic-removal-9.html white-space-ref.html
== dynamic-removal-10.html white-space-ref.html
== dynamic-removal-11.html white-space-ref.html
== dynamic-removal-12.html white-space-ref.html
== dynamic-removal-9.html white-space-1-ref.html
== dynamic-removal-10.html white-space-1-ref.html
== dynamic-removal-11.html white-space-1-ref.html
== dynamic-removal-12.html white-space-1-ref.html
== dynamic-removal-13.html 3x3-ref.html
== dynamic-removal-14.html 3x3-ref.html
== dynamic-insert-cell-1.html 3x3-ref.html
@ -76,30 +72,4 @@ fails == 156888-1.html 156888-1-ref.html # bug 484825
== dynamic-switch-inline-to-cell-3.html 3x3-ref.html
== dynamic-switch-inline-to-cell-4.html 3x3-ref.html
== dynamic-switch-inline-to-cell-5.html 3x3-ref.html
== white-space-1.html 3-tables-ref.html
== white-space-2.html 3x3-ref.html
== white-space-3.html 3x3-ref.html
== white-space-4.html 3x3-ref.html
== white-space-5.html 3x3-ref.html
== white-space-6.html 3x3-ref.html
== white-space-7.html white-space-ref.html
== white-space-8.html white-space-ref.html
== white-space-9.html white-space-ref.html
== white-space-10.html white-space-ref.html
== white-space-11.html white-space-ref.html
== white-space-12.html white-space-ref.html
== white-space-13.html white-space-ref.html
== white-space-14.html white-space-ref.html
== white-space-15.html white-space-ref.html
== white-space-16.html white-space-ref.html
== white-space-17.html white-space-ref.html
== white-space-18.html white-space-ref.html
== white-space-19.html white-space-ref.html
== white-space-20.html white-space-ref.html
== white-space-21.html white-space-ref.html
== white-space-22.html white-space-ref.html
== white-space-23.html white-space-ref.html
== white-space-24.html white-space-ref.html
== white-space-25.html white-space-ref.html
== white-space-26.html white-space-ref.html
== white-space-pre-1.html white-space-pre-ref.html
== white-space-1.html white-space-1-ref.html

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

@ -1,20 +1,11 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<script>
function doTest() {
var n = document.getElementById("t").nextSibling;
n.data = "Row 22, Col 1Row 22, Col 2Row 22, Col 3";
document.documentElement.className = "";
}
</script>
</head>
<body style="font-family: monospace" onload="doTest()">
<span style="display: table-cell">Row 1, Col 1</span>
<span style="display: table-cell">Row 1, Col 2</span>
<span style="display: table-cell" id="t">Row 1, Col 3</span>
<span style="display: table-cell">Row 333, Col 1</span>
<span style="display: table-cell">Row 333, Col 2</span>
<span style="display: table-cell">Row 333, Col 3</span>
<!DOCTYPE HTML>
<html>
<body>
<span>
<span>a</span>
<span style="display: table-cell">b</span>
<span style="display: table-cell">c</span>
<span>d</span>
</span>
</body>
</html>

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

@ -1,20 +0,0 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<script>
function doTest() {
var t = document.getElementById("t1");
t.parentNode.removeChild(t);
t = document.getElementById("t2");
t.parentNode.removeChild(t);
document.documentElement.className = "";
}
</script>
</head>
<body onload="doTest()">
<span>
<span>a</span><span style="display: table-cell" id="t1">e</span>
<span style="display: table-cell" id="t2">f</span><span>bc d</span>
</span>
</body>
</html>

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

@ -1,20 +0,0 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<script>
function doTest() {
var t = document.getElementById("t1");
t.parentNode.removeChild(t);
t = document.getElementById("t2");
t.parentNode.removeChild(t);
document.documentElement.className = "";
}
</script>
</head>
<body onload="doTest()">
<span>
<span>a</span><span style="display: table-cell" id="t2">e</span>
<span style="display: table-cell" id="t1">f</span><span>bc d</span>
</span>
</body>
</html>

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

@ -1,10 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<span>
a
<span style="display: table-cell">b</span><span style="display: table-cell">c</span>
d
</span>
</body>
</html>

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

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<span>
a
<span style="display: table-cell">b</span>
<span style="display: table-cell">c</span>
d
</span>
</body>
</html>

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

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#t:after { content: "d" }
</style>
</head>
<body>
<span id="t">
a
<span style="display: table-cell">b</span><span style="display: table-cell">c</span>
</span>
</body>
</html>

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

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#t:after { content: "d" }
</style>
</head>
<body>
<span id="t">
a
<span style="display: table-cell">b</span>
<span style="display: table-cell">c</span>
</span>
</body>
</html>

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

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#t:after { content: "d" }
</style>
</head>
<body>
<span id="t">
a
<span style="display: table-cell">b</span><script>document.body.offsetWidth</script><span style="display: table-cell">c</span>
</span>
</body>
</html>

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

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#t:after { content: "d" }
</style>
</head>
<body>
<span id="t">
a
<span style="display: table-cell">b</span>
<script>document.body.offsetWidth</script>
<span style="display: table-cell">c</span>
</span>
</body>
</html>

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

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#t:before { content: "a" }
</style>
</head>
<body>
<span id="t">
<span style="display: table-cell">b</span><span style="display: table-cell">c</span>
d
</span>
</body>
</html>

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

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#t:before { content: "a" }
</style>
</head>
<body>
<span id="t">
<span style="display: table-cell">b</span>
<span style="display: table-cell">c</span>
d
</span>
</body>
</html>

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

@ -1,31 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<script>
function doTest() {
try {
document.normalize();
} catch (e) {}
var n = document.getElementById("t").nextSibling;
n.data = " ";
document.documentElement.className = "";
}
</script>
</head>
<body style="font-family: monospace" onload="doTest()">
<span style="display: table-row">
<span style="display: table-cell">Row 1, Col 1</span>
<span style="display: table-cell">Row 1, Col 2</span>
<span style="display: table-cell">Row 1, Col 3</span>
</span>
<span style="display: table-row" id="t">
<span style="display: table-cell">Row 22, Col 1</span>
<span style="display: table-cell">Row 22, Col 2</span>
<span style="display: table-cell">Row 22, Col 3</span>
</span>This is a test<span style="display: table-row">
<span style="display: table-cell">Row 333, Col 1</span>
<span style="display: table-cell">Row 333, Col 2</span>
<span style="display: table-cell">Row 333, Col 3</span>
</span>
</body>
</html>

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

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#t:before { content: "a" }
</style>
</head>
<body>
<span id="t">
<span style="display: table-cell">b</span><script>document.body.offsetWidth</script><span style="display: table-cell">c</span>
d
</span>
</body>
</html>

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

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#t:before { content: "a" }
</style>
</head>
<body>
<span id="t">
<span style="display: table-cell">b</span>
<script>document.body.offsetWidth</script>
<span style="display: table-cell">c</span>
d
</span>
</body>
</html>

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

@ -1,6 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<span style="display:table-row; white-space: pre"><span style="display: table-cell">a</span> bc <span style="display: table-cell">d</span></span>
</body>
</html>

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

@ -1,6 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<span style="display:table-row; white-space: pre"><span style="display: table-cell">a</span> <span>bc</span> <span style="display: table-cell">d</span></span>
</body>
</html>

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

@ -1,6 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<span style="display:table-row; white-space: pre"><span style="display: table-cell">a</span> <script>document.body.offsetWidth</script>bc<script>document.body.offsetWidth</script> <span style="display: table-cell">d</span></span>
</body>
</html>

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

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<script>
function doTest() {
var t = document.getElementById("t");
var parent = t.parentNode;
parent.insertBefore(document.createTextNode(" "), t);
parent.insertBefore(document.createTextNode("bc"), t);
parent.insertBefore(document.createTextNode(" "), t);
document.documentElement.className = "";
}
</script>
</head>
<body onload="doTest()">
<span style="display:table-row; white-space: pre"><span style="display: table-cell">a</span><span id="t" style="display: table-cell">d</span></span>
</body>
</html>

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

@ -1,12 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#t:after { display: table-cell; content: "d"; }
</style>
</head>
<body>
<span id="t">
a<script>document.body.offsetWidth;</script> <span style="display: table-cell; white-space: pre">bc </span></span>
</body>
</html>

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

@ -1,33 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<script>
function doTest() {
try {
document.normalize();
} catch (e) {}
var n = document.getElementById("t").nextSibling;
n.data = " ";
document.documentElement.className = "";
}
</script>
</head>
<body style="font-family: monospace" onload="doTest()">
<span style="display: table-row-group">
<span style="display: table-row">
<span style="display: table-cell">Row 1, Col 1</span>
<span style="display: table-cell">Row 1, Col 2</span>
<span style="display: table-cell">Row 1, Col 3</span>
</span>
<span style="display: table-row">
<span style="display: table-cell" id="t">Row 22, Col 1</span>This is a test<span style="display: table-cell">Row 22, Col 2</span>
<span style="display: table-cell">Row 22, Col 3</span>
</span>
<span style="display: table-row">
<span style="display: table-cell">Row 333, Col 1</span>
<span style="display: table-cell">Row 333, Col 2</span>
<span style="display: table-cell">Row 333, Col 3</span>
</span>
</span>
</body>
</html>

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

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<script>
function doTest() {
var n = document.getElementById("t").nextSibling;
n.data = "Row 22, Col 1";
document.documentElement.className = "";
}
</script>
</head>
<body style="font-family: monospace" onload="doTest()">
<span style="display: table-row-group">
<span style="display: table-row" id="t">
<span style="display: table-cell">Row 1, Col 1</span>
<span style="display: table-cell">Row 1, Col 2</span>
<span style="display: table-cell">Row 1, Col 3</span>
</span>
<span style="display: table-cell">Row 22, Col 2</span>
<span style="display: table-cell">Row 22, Col 3</span>
<span style="display: table-row">
<span style="display: table-cell">Row 333, Col 1</span>
<span style="display: table-cell">Row 333, Col 2</span>
<span style="display: table-cell">Row 333, Col 3</span>
</span>
</span>
</body>
</html>

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

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<script>
function doTest() {
var n = document.getElementById("t").nextSibling;
n.data = "Row 22, Col 2";
document.documentElement.className = "";
}
</script>
</head>
<body style="font-family: monospace" onload="doTest()">
<span style="display: table-row-group">
<span style="display: table-row">
<span style="display: table-cell">Row 1, Col 1</span>
<span style="display: table-cell">Row 1, Col 2</span>
<span style="display: table-cell">Row 1, Col 3</span>
</span>
<span style="display: table-cell" id="t">Row 22, Col 1</span>
<span style="display: table-cell">Row 22, Col 3</span>
<span style="display: table-row">
<span style="display: table-cell">Row 333, Col 1</span>
<span style="display: table-cell">Row 333, Col 2</span>
<span style="display: table-cell">Row 333, Col 3</span>
</span>
</span>
</body>
</html>

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

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<script>
function doTest() {
var n = document.getElementById("t").nextSibling;
n.data = "Row 22, Col 3";
document.documentElement.className = "";
}
</script>
</head>
<body style="font-family: monospace" onload="doTest()">
<span style="display: table-row-group">
<span style="display: table-row">
<span style="display: table-cell">Row 1, Col 1</span>
<span style="display: table-cell">Row 1, Col 2</span>
<span style="display: table-cell">Row 1, Col 3</span>
</span>
<span style="display: table-cell">Row 22, Col 1</span>
<span style="display: table-cell" id="t">Row 22, Col 2</span>
<span style="display: table-row">
<span style="display: table-cell">Row 333, Col 1</span>
<span style="display: table-cell">Row 333, Col 2</span>
<span style="display: table-cell">Row 333, Col 3</span>
</span>
</span>
</body>
</html>

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

@ -1,11 +0,0 @@
<!DOCTYPE HTML>
<html>
<body>
<span>
<span>a</span>
<span style="display: table-cell">b</span>
<span style="display: table-cell">c</span>
<span>d</span>
</span>
</body>
</html>

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

@ -1,18 +0,0 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<script>
function doTest() {
var t = document.getElementById("t");
t.parentNode.removeChild(t);
document.documentElement.className = "";
}
</script>
</head>
<body onload="doTest()">
<span>
<span>a</span><span style="display: table-cell" id="t">e</span>
<span style="display: table-cell">b</span><span>c d</span>
</span>
</body>
</html>

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

@ -1,18 +0,0 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<script>
function doTest() {
var t = document.getElementById("t");
t.parentNode.removeChild(t);
document.documentElement.className = "";
}
</script>
</head>
<body onload="doTest()">
<span>
<span>a b</span><span style="display: table-cell">c</span>
<span style="display: table-cell" id="t">e</span><span>d</span>
</span>
</body>
</html>

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

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
#x:after { content: " cd"; display: table-cell; }
</style>
<script>
function doTest() {
var f = document.getElementById("f");
f.parentNode.removeChild(f);
}
</script>
</head>
<body onload="doTest()">
<div style="font-family: monospace; width: 10em; white-space: pre-wrap"><span id="f" style="float: left; width: 80%; height: 0.5em"></span><span id="x">a <script>document.body.offsetWidth; dump('aa');</script> <span style="display: table-cell">b</span></span></div>
</body>
</html>

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

@ -1,6 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<div style="font-family: monospace; white-space: pre-wrap">a b cd</div>
</body>
</html>

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

@ -90,6 +90,12 @@ public:
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) { return NS_OK; }
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsSplittableFrame::IsFrameOfType(aFlags &
~(nsIFrame::eExcludesIgnorableWhitespace));
}
/**
* Get the "type" of the frame
*

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

@ -147,6 +147,12 @@ public:
nsTableFrame::ReflowColGroups */
virtual PRBool IsContainingBlock() const;
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
~nsIFrame::eExcludesIgnorableWhitespace);
}
/**
* Get the "type" of the frame
*

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

@ -374,6 +374,12 @@ public:
nsIFrame** aProviderFrame,
PRBool* aIsChild);
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
~nsIFrame::eExcludesIgnorableWhitespace);
}
/**
* Get the "type" of the frame
*

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

@ -100,6 +100,12 @@ public:
virtual void Destroy();
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
~nsIFrame::eExcludesIgnorableWhitespace);
}
virtual PRBool IsContainingBlock() const;
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,

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

@ -124,6 +124,12 @@ public:
void DidResize();
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
~nsIFrame::eExcludesIgnorableWhitespace);
}
/**
* Get the "type" of the frame
*

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

@ -142,6 +142,12 @@ public:
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
{
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
~nsIFrame::eExcludesIgnorableWhitespace);
}
/**
* Get the "type" of the frame
*