bug 163614 - Changed DeleteChildsNextInFlow to DeleteNextInFlowChild, params, and callers. sr=kin, r=alexsavulov,dcone

This commit is contained in:
karnaze%netscape.com 2002-10-08 20:35:26 +00:00
parent 753fba95f6
commit 40902d04df
23 changed files with 344 additions and 154 deletions

View File

@ -3705,11 +3705,11 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
}
if (LINE_REFLOW_OK != lineReflowStatus) {
// It is possible that one or more of next lines are empty
// (because of DeleteChildsNextInFlow). If so, delete them now
// (because of DeleteNextInFlowChild). If so, delete them now
// in case we are finished.
++aLine;
while ((aLine != end_lines()) && (0 == aLine->GetChildCount())) {
// XXX Is this still necessary now that DeleteChildsNextInFlow
// XXX Is this still necessary now that DeleteNextInFlowChild
// uses DoRemoveFrame?
nsLineBox *toremove = aLine;
aLine = mLines.erase(aLine);
@ -5271,36 +5271,21 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext,
}
void
nsBlockFrame::DeleteChildsNextInFlow(nsIPresContext* aPresContext,
nsIFrame* aChild)
nsBlockFrame::DeleteNextInFlowChild(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow)
{
#ifdef DEBUG
// out-of-flow and placeholders frames don't satisfy the IsChild condition because
// DeleteChildsNextInFlow needs to be called on the parent of the next-in-flow
nsFrameState childState;
aChild->GetFrameState(&childState);
nsCOMPtr<nsIAtom> frameType;
aChild->GetFrameType(getter_AddRefs(frameType));
if ((nsLayoutAtoms::placeholderFrame != frameType) && !(childState & NS_FRAME_OUT_OF_FLOW)) {
NS_PRECONDITION(IsChild(aPresContext, aChild), "bad geometric parent");
}
#endif
nsIFrame* prevInFlow;
aNextInFlow->GetPrevInFlow(&prevInFlow);
NS_PRECONDITION(prevInFlow, "bad next-in-flow");
NS_PRECONDITION(IsChild(aPresContext, aNextInFlow), "bad geometric parent");
nsIFrame* nextInFlow;
aChild->GetNextInFlow(&nextInFlow);
NS_PRECONDITION(nsnull != nextInFlow, "null next-in-flow");
#ifdef IBMBIDI
nsIFrame* nextBidi;
aChild->GetBidiProperty(aPresContext, nsLayoutAtoms::nextBidi,
(void**) &nextBidi,sizeof(nextBidi));
if (nextBidi != nextInFlow) {
prevInFlow->GetBidiProperty(aPresContext, nsLayoutAtoms::nextBidi,
(void**) &nextBidi,sizeof(nextBidi));
if (nextBidi != aNextInFlow) {
#endif // IBMBIDI
nsBlockFrame* parent;
nextInFlow->GetParent((nsIFrame**)&parent);
NS_PRECONDITION(nsnull != parent, "next-in-flow with no parent");
NS_PRECONDITION(! parent->mLines.empty(), "next-in-flow with weird parent");
// NS_PRECONDITION(nsnull == parent->mOverflowLines, "parent with overflow");
parent->DoRemoveFrame(aPresContext, nextInFlow);
DoRemoveFrame(aPresContext, aNextInFlow);
#ifdef IBMBIDI
}
#endif // IBMBIDI
@ -5321,11 +5306,10 @@ nsBlockFrame::ReflowFloater(nsBlockReflowState& aState,
nsIFrame* nextInFlow;
aPlaceholder->GetNextInFlow(&nextInFlow);
if (nextInFlow) {
// Use nextInFlow's parent since it always will be able to find nextInFlow.
// If aPlaceholder's parent is an inline, nextInFlow's will be a block.
nsHTMLContainerFrame* parent;
nextInFlow->GetParent((nsIFrame**)&parent);
parent->DeleteChildsNextInFlow(aState.mPresContext, aPlaceholder);
parent->DeleteNextInFlowChild(aState.mPresContext, nextInFlow);
}
// Reflow the floater.
nsIFrame* floater = aPlaceholder->GetOutOfFlowFrame();
@ -6239,7 +6223,7 @@ nsBlockFrame::ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild)
}
//////////////////////////////////////////////////////////////////////
// Debugging
// Start Debugging
#ifdef NS_DEBUG
static PRBool
@ -6278,16 +6262,34 @@ InSiblingList(nsLineList& aLines, nsIFrame* aFrame)
PRBool
nsBlockFrame::IsChild(nsIPresContext* aPresContext, nsIFrame* aFrame)
{
// Continued out-of-flows don't satisfy InLineList(), continued out-of-flows
// and placeholders don't satisfy InSiblingList().
PRBool skipLineList = PR_FALSE;
PRBool skipSiblingList = PR_FALSE;
nsIFrame* prevInFlow;
aFrame->GetPrevInFlow(&prevInFlow);
if (prevInFlow) {
nsFrameState state;
aFrame->GetFrameState(&state);
nsCOMPtr<nsIAtom> frameType;
aFrame->GetFrameType(getter_AddRefs(frameType));
skipLineList = (state & NS_FRAME_OUT_OF_FLOW);
skipSiblingList = (nsLayoutAtoms::placeholderFrame == frameType) ||
(state & NS_FRAME_OUT_OF_FLOW);
}
nsIFrame* parent;
aFrame->GetParent(&parent);
if (parent != (nsIFrame*)this) {
return PR_FALSE;
}
if (InLineList(mLines, aFrame) && InSiblingList(mLines, aFrame)) {
if ((skipLineList || InLineList(mLines, aFrame)) &&
(skipSiblingList || InSiblingList(mLines, aFrame))) {
return PR_TRUE;
}
nsLineList* overflowLines = GetOverflowLines(aPresContext, PR_FALSE);
if (overflowLines && InLineList(*overflowLines, aFrame) && InSiblingList(*overflowLines, aFrame)) {
if (overflowLines && (skipLineList || InLineList(*overflowLines, aFrame)) &&
(skipSiblingList || InSiblingList(*overflowLines, aFrame))) {
return PR_TRUE;
}
return PR_FALSE;
@ -6323,7 +6325,8 @@ nsBlockFrame::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
}
#endif
//----------------------------------------------------------------------
// End Debugging
//////////////////////////////////////////////////////////////////////
NS_IMETHODIMP
nsBlockFrame::Init(nsIPresContext* aPresContext,

View File

@ -180,8 +180,8 @@ public:
#endif
virtual void DeleteChildsNextInFlow(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow);
virtual void DeleteNextInFlowChild(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow);
/** return the topmost block child based on y-index.
* almost always the first or second line, if there is one.

View File

@ -626,8 +626,8 @@ nsBlockReflowContext::ReflowBlock(const nsRect& aSpace,
// parent is not this because we are executing pullup code)
/* XXX promote DeleteChildsNextInFlow to nsIFrame to elminate this cast */
nsHTMLContainerFrame* parent;
mFrame->GetParent((nsIFrame**)&parent);
parent->DeleteChildsNextInFlow(mPresContext, mFrame);
kidNextInFlow->GetParent((nsIFrame**)&parent);
parent->DeleteNextInFlowChild(mPresContext, kidNextInFlow);
}
}
}

View File

@ -883,7 +883,7 @@ nsContainerFrame::FrameNeedsView(nsIPresContext* aPresContext,
/**
* Invokes the WillReflow() function, positions the frame and its view (if
* requested), and then calls Reflow(). If the reflow succeeds and the child
* frame is complete, deletes any next-in-flows using DeleteChildsNextInFlow()
* frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
*/
nsresult
nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
@ -953,10 +953,9 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
// Remove all of the childs next-in-flows. Make sure that we ask
// the right parent to do the removal (it's possible that the
// parent is not this because we are executing pullup code)
nsIFrame* parent;
aKidFrame->GetParent(&parent);
((nsContainerFrame*)parent)->DeleteChildsNextInFlow(aPresContext,
aKidFrame);
nsContainerFrame* parent;
kidNextInFlow->GetParent((nsIFrame**)&parent);
parent->DeleteNextInFlowChild(aPresContext, kidNextInFlow);
}
}
return result;
@ -1051,69 +1050,64 @@ nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame,
}
/**
* Remove and delete aChild's next-in-flow(s). Updates the sibling and flow
* Remove and delete aNextInFlow and its next-in-flows. Updates the sibling and flow
* pointers
*
* @param aChild child this child's next-in-flow
* @return PR_TRUE if successful and PR_FALSE otherwise
*/
void
nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext* aPresContext,
nsIFrame* aChild)
nsContainerFrame::DeleteNextInFlowChild(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow)
{
NS_PRECONDITION(mFrames.ContainsFrame(aChild), "bad geometric parent");
nsIFrame* nextInFlow;
nsContainerFrame* parent;
aChild->GetNextInFlow(&nextInFlow);
NS_PRECONDITION(nsnull != nextInFlow, "null next-in-flow");
nextInFlow->GetParent((nsIFrame**)&parent);
nsIFrame* prevInFlow;
aNextInFlow->GetPrevInFlow(&prevInFlow);
NS_PRECONDITION(prevInFlow, "bad prev-in-flow");
NS_PRECONDITION(mFrames.ContainsFrame(aNextInFlow), "bad geometric parent");
// If the next-in-flow has a next-in-flow then delete it, too (and
// delete it first).
nsIFrame* nextNextInFlow;
nextInFlow->GetNextInFlow(&nextNextInFlow);
if (nsnull != nextNextInFlow) {
parent->DeleteChildsNextInFlow(aPresContext, nextInFlow);
aNextInFlow->GetNextInFlow(&nextNextInFlow);
if (nextNextInFlow) {
nsContainerFrame* parent;
nextNextInFlow->GetParent((nsIFrame**)&parent);
parent->DeleteNextInFlowChild(aPresContext, nextNextInFlow);
}
#ifdef IBMBIDI
nsIFrame* nextBidi;
aChild->GetBidiProperty(aPresContext, nsLayoutAtoms::nextBidi,
(void**) &nextBidi,sizeof(nextBidi));
if (nextBidi == nextInFlow) {
prevInFlow->GetBidiProperty(aPresContext, nsLayoutAtoms::nextBidi,
(void**) &nextBidi,sizeof(nextBidi));
if (nextBidi == aNextInFlow) {
return;
}
#endif // IBMBIDI
// Disconnect the next-in-flow from the flow list
nsSplittableFrame::BreakFromPrevFlow(nextInFlow);
nsSplittableFrame::BreakFromPrevFlow(aNextInFlow);
// Take the next-in-flow out of the parent's child list
PRBool result = parent->mFrames.RemoveFrame(nextInFlow);
PRBool result = mFrames.RemoveFrame(aNextInFlow);
if (!result) {
// We didn't find the child in the parent's principal child list.
// Maybe it's on the overflow list?
nsFrameList overflowFrames(parent->GetOverflowFrames(aPresContext, PR_TRUE));
nsFrameList overflowFrames(GetOverflowFrames(aPresContext, PR_TRUE));
if (overflowFrames.IsEmpty() || !overflowFrames.RemoveFrame(nextInFlow)) {
if (overflowFrames.IsEmpty() || !overflowFrames.RemoveFrame(aNextInFlow)) {
NS_ASSERTION(result, "failed to remove frame");
}
// Set the overflow property again
if (overflowFrames.NotEmpty()) {
parent->SetOverflowFrames(aPresContext, overflowFrames.FirstChild());
SetOverflowFrames(aPresContext, overflowFrames.FirstChild());
}
}
// Delete the next-in-flow frame
nextInFlow->Destroy(aPresContext);
aNextInFlow->Destroy(aPresContext);
#ifdef NS_DEBUG
aChild->GetNextInFlow(&nextInFlow);
NS_POSTCONDITION(nsnull == nextInFlow, "non null next-in-flow");
nsIFrame* nextInFlow;
prevInFlow->GetNextInFlow(&nextInFlow);
NS_POSTCONDITION(!nextInFlow, "non null next-in-flow");
#endif
}

View File

@ -88,8 +88,8 @@ public:
#endif
// nsContainerFrame methods
virtual void DeleteChildsNextInFlow(nsIPresContext* aPresContext,
nsIFrame* aChild);
virtual void DeleteNextInFlowChild(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow);
static PRInt32 LengthOf(nsIFrame* aFrameList) {
nsFrameList tmp(aFrameList);
@ -143,7 +143,7 @@ public:
/**
* Invokes the WillReflow() function, positions the frame and its view (if
* requested), and then calls Reflow(). If the reflow succeeds and the child
* frame is complete, deletes any next-in-flows using DeleteChildsNextInFlow()
* frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
*
* Flags:
* NS_FRAME_NO_MOVE_VIEW - don't position the frame's view. Set this if you

View File

@ -275,7 +275,7 @@ nsFirstLetterFrame::Reflow(nsIPresContext* aPresContext,
kid->GetNextInFlow(&kidNextInFlow);
if (nsnull != kidNextInFlow) {
// Remove all of the childs next-in-flows
DeleteChildsNextInFlow(aPresContext, kid);
DeleteNextInFlowChild(aPresContext, kidNextInFlow);
}
}
else {

View File

@ -1288,8 +1288,8 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// the right parent to do the removal (it's possible that the
// parent is not this because we are executing pullup code)
nsHTMLContainerFrame* parent;
aFrame->GetParent((nsIFrame**) &parent);
parent->DeleteChildsNextInFlow(mPresContext, aFrame);
kidNextInFlow->GetParent((nsIFrame**) &parent);
parent->DeleteNextInFlowChild(mPresContext, kidNextInFlow);
}
}

View File

@ -3705,11 +3705,11 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
}
if (LINE_REFLOW_OK != lineReflowStatus) {
// It is possible that one or more of next lines are empty
// (because of DeleteChildsNextInFlow). If so, delete them now
// (because of DeleteNextInFlowChild). If so, delete them now
// in case we are finished.
++aLine;
while ((aLine != end_lines()) && (0 == aLine->GetChildCount())) {
// XXX Is this still necessary now that DeleteChildsNextInFlow
// XXX Is this still necessary now that DeleteNextInFlowChild
// uses DoRemoveFrame?
nsLineBox *toremove = aLine;
aLine = mLines.erase(aLine);
@ -5271,36 +5271,21 @@ nsBlockFrame::DoRemoveFrame(nsIPresContext* aPresContext,
}
void
nsBlockFrame::DeleteChildsNextInFlow(nsIPresContext* aPresContext,
nsIFrame* aChild)
nsBlockFrame::DeleteNextInFlowChild(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow)
{
#ifdef DEBUG
// out-of-flow and placeholders frames don't satisfy the IsChild condition because
// DeleteChildsNextInFlow needs to be called on the parent of the next-in-flow
nsFrameState childState;
aChild->GetFrameState(&childState);
nsCOMPtr<nsIAtom> frameType;
aChild->GetFrameType(getter_AddRefs(frameType));
if ((nsLayoutAtoms::placeholderFrame != frameType) && !(childState & NS_FRAME_OUT_OF_FLOW)) {
NS_PRECONDITION(IsChild(aPresContext, aChild), "bad geometric parent");
}
#endif
nsIFrame* prevInFlow;
aNextInFlow->GetPrevInFlow(&prevInFlow);
NS_PRECONDITION(prevInFlow, "bad next-in-flow");
NS_PRECONDITION(IsChild(aPresContext, aNextInFlow), "bad geometric parent");
nsIFrame* nextInFlow;
aChild->GetNextInFlow(&nextInFlow);
NS_PRECONDITION(nsnull != nextInFlow, "null next-in-flow");
#ifdef IBMBIDI
nsIFrame* nextBidi;
aChild->GetBidiProperty(aPresContext, nsLayoutAtoms::nextBidi,
(void**) &nextBidi,sizeof(nextBidi));
if (nextBidi != nextInFlow) {
prevInFlow->GetBidiProperty(aPresContext, nsLayoutAtoms::nextBidi,
(void**) &nextBidi,sizeof(nextBidi));
if (nextBidi != aNextInFlow) {
#endif // IBMBIDI
nsBlockFrame* parent;
nextInFlow->GetParent((nsIFrame**)&parent);
NS_PRECONDITION(nsnull != parent, "next-in-flow with no parent");
NS_PRECONDITION(! parent->mLines.empty(), "next-in-flow with weird parent");
// NS_PRECONDITION(nsnull == parent->mOverflowLines, "parent with overflow");
parent->DoRemoveFrame(aPresContext, nextInFlow);
DoRemoveFrame(aPresContext, aNextInFlow);
#ifdef IBMBIDI
}
#endif // IBMBIDI
@ -5321,11 +5306,10 @@ nsBlockFrame::ReflowFloater(nsBlockReflowState& aState,
nsIFrame* nextInFlow;
aPlaceholder->GetNextInFlow(&nextInFlow);
if (nextInFlow) {
// Use nextInFlow's parent since it always will be able to find nextInFlow.
// If aPlaceholder's parent is an inline, nextInFlow's will be a block.
nsHTMLContainerFrame* parent;
nextInFlow->GetParent((nsIFrame**)&parent);
parent->DeleteChildsNextInFlow(aState.mPresContext, aPlaceholder);
parent->DeleteNextInFlowChild(aState.mPresContext, nextInFlow);
}
// Reflow the floater.
nsIFrame* floater = aPlaceholder->GetOutOfFlowFrame();
@ -6239,7 +6223,7 @@ nsBlockFrame::ReflowDirtyChild(nsIPresShell* aPresShell, nsIFrame* aChild)
}
//////////////////////////////////////////////////////////////////////
// Debugging
// Start Debugging
#ifdef NS_DEBUG
static PRBool
@ -6278,16 +6262,34 @@ InSiblingList(nsLineList& aLines, nsIFrame* aFrame)
PRBool
nsBlockFrame::IsChild(nsIPresContext* aPresContext, nsIFrame* aFrame)
{
// Continued out-of-flows don't satisfy InLineList(), continued out-of-flows
// and placeholders don't satisfy InSiblingList().
PRBool skipLineList = PR_FALSE;
PRBool skipSiblingList = PR_FALSE;
nsIFrame* prevInFlow;
aFrame->GetPrevInFlow(&prevInFlow);
if (prevInFlow) {
nsFrameState state;
aFrame->GetFrameState(&state);
nsCOMPtr<nsIAtom> frameType;
aFrame->GetFrameType(getter_AddRefs(frameType));
skipLineList = (state & NS_FRAME_OUT_OF_FLOW);
skipSiblingList = (nsLayoutAtoms::placeholderFrame == frameType) ||
(state & NS_FRAME_OUT_OF_FLOW);
}
nsIFrame* parent;
aFrame->GetParent(&parent);
if (parent != (nsIFrame*)this) {
return PR_FALSE;
}
if (InLineList(mLines, aFrame) && InSiblingList(mLines, aFrame)) {
if ((skipLineList || InLineList(mLines, aFrame)) &&
(skipSiblingList || InSiblingList(mLines, aFrame))) {
return PR_TRUE;
}
nsLineList* overflowLines = GetOverflowLines(aPresContext, PR_FALSE);
if (overflowLines && InLineList(*overflowLines, aFrame) && InSiblingList(*overflowLines, aFrame)) {
if (overflowLines && (skipLineList || InLineList(*overflowLines, aFrame)) &&
(skipSiblingList || InSiblingList(*overflowLines, aFrame))) {
return PR_TRUE;
}
return PR_FALSE;
@ -6323,7 +6325,8 @@ nsBlockFrame::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
}
#endif
//----------------------------------------------------------------------
// End Debugging
//////////////////////////////////////////////////////////////////////
NS_IMETHODIMP
nsBlockFrame::Init(nsIPresContext* aPresContext,

View File

@ -180,8 +180,8 @@ public:
#endif
virtual void DeleteChildsNextInFlow(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow);
virtual void DeleteNextInFlowChild(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow);
/** return the topmost block child based on y-index.
* almost always the first or second line, if there is one.

View File

@ -626,8 +626,8 @@ nsBlockReflowContext::ReflowBlock(const nsRect& aSpace,
// parent is not this because we are executing pullup code)
/* XXX promote DeleteChildsNextInFlow to nsIFrame to elminate this cast */
nsHTMLContainerFrame* parent;
mFrame->GetParent((nsIFrame**)&parent);
parent->DeleteChildsNextInFlow(mPresContext, mFrame);
kidNextInFlow->GetParent((nsIFrame**)&parent);
parent->DeleteNextInFlowChild(mPresContext, kidNextInFlow);
}
}
}

View File

@ -883,7 +883,7 @@ nsContainerFrame::FrameNeedsView(nsIPresContext* aPresContext,
/**
* Invokes the WillReflow() function, positions the frame and its view (if
* requested), and then calls Reflow(). If the reflow succeeds and the child
* frame is complete, deletes any next-in-flows using DeleteChildsNextInFlow()
* frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
*/
nsresult
nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
@ -953,10 +953,9 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
// Remove all of the childs next-in-flows. Make sure that we ask
// the right parent to do the removal (it's possible that the
// parent is not this because we are executing pullup code)
nsIFrame* parent;
aKidFrame->GetParent(&parent);
((nsContainerFrame*)parent)->DeleteChildsNextInFlow(aPresContext,
aKidFrame);
nsContainerFrame* parent;
kidNextInFlow->GetParent((nsIFrame**)&parent);
parent->DeleteNextInFlowChild(aPresContext, kidNextInFlow);
}
}
return result;
@ -1051,69 +1050,64 @@ nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame,
}
/**
* Remove and delete aChild's next-in-flow(s). Updates the sibling and flow
* Remove and delete aNextInFlow and its next-in-flows. Updates the sibling and flow
* pointers
*
* @param aChild child this child's next-in-flow
* @return PR_TRUE if successful and PR_FALSE otherwise
*/
void
nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext* aPresContext,
nsIFrame* aChild)
nsContainerFrame::DeleteNextInFlowChild(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow)
{
NS_PRECONDITION(mFrames.ContainsFrame(aChild), "bad geometric parent");
nsIFrame* nextInFlow;
nsContainerFrame* parent;
aChild->GetNextInFlow(&nextInFlow);
NS_PRECONDITION(nsnull != nextInFlow, "null next-in-flow");
nextInFlow->GetParent((nsIFrame**)&parent);
nsIFrame* prevInFlow;
aNextInFlow->GetPrevInFlow(&prevInFlow);
NS_PRECONDITION(prevInFlow, "bad prev-in-flow");
NS_PRECONDITION(mFrames.ContainsFrame(aNextInFlow), "bad geometric parent");
// If the next-in-flow has a next-in-flow then delete it, too (and
// delete it first).
nsIFrame* nextNextInFlow;
nextInFlow->GetNextInFlow(&nextNextInFlow);
if (nsnull != nextNextInFlow) {
parent->DeleteChildsNextInFlow(aPresContext, nextInFlow);
aNextInFlow->GetNextInFlow(&nextNextInFlow);
if (nextNextInFlow) {
nsContainerFrame* parent;
nextNextInFlow->GetParent((nsIFrame**)&parent);
parent->DeleteNextInFlowChild(aPresContext, nextNextInFlow);
}
#ifdef IBMBIDI
nsIFrame* nextBidi;
aChild->GetBidiProperty(aPresContext, nsLayoutAtoms::nextBidi,
(void**) &nextBidi,sizeof(nextBidi));
if (nextBidi == nextInFlow) {
prevInFlow->GetBidiProperty(aPresContext, nsLayoutAtoms::nextBidi,
(void**) &nextBidi,sizeof(nextBidi));
if (nextBidi == aNextInFlow) {
return;
}
#endif // IBMBIDI
// Disconnect the next-in-flow from the flow list
nsSplittableFrame::BreakFromPrevFlow(nextInFlow);
nsSplittableFrame::BreakFromPrevFlow(aNextInFlow);
// Take the next-in-flow out of the parent's child list
PRBool result = parent->mFrames.RemoveFrame(nextInFlow);
PRBool result = mFrames.RemoveFrame(aNextInFlow);
if (!result) {
// We didn't find the child in the parent's principal child list.
// Maybe it's on the overflow list?
nsFrameList overflowFrames(parent->GetOverflowFrames(aPresContext, PR_TRUE));
nsFrameList overflowFrames(GetOverflowFrames(aPresContext, PR_TRUE));
if (overflowFrames.IsEmpty() || !overflowFrames.RemoveFrame(nextInFlow)) {
if (overflowFrames.IsEmpty() || !overflowFrames.RemoveFrame(aNextInFlow)) {
NS_ASSERTION(result, "failed to remove frame");
}
// Set the overflow property again
if (overflowFrames.NotEmpty()) {
parent->SetOverflowFrames(aPresContext, overflowFrames.FirstChild());
SetOverflowFrames(aPresContext, overflowFrames.FirstChild());
}
}
// Delete the next-in-flow frame
nextInFlow->Destroy(aPresContext);
aNextInFlow->Destroy(aPresContext);
#ifdef NS_DEBUG
aChild->GetNextInFlow(&nextInFlow);
NS_POSTCONDITION(nsnull == nextInFlow, "non null next-in-flow");
nsIFrame* nextInFlow;
prevInFlow->GetNextInFlow(&nextInFlow);
NS_POSTCONDITION(!nextInFlow, "non null next-in-flow");
#endif
}

View File

@ -88,8 +88,8 @@ public:
#endif
// nsContainerFrame methods
virtual void DeleteChildsNextInFlow(nsIPresContext* aPresContext,
nsIFrame* aChild);
virtual void DeleteNextInFlowChild(nsIPresContext* aPresContext,
nsIFrame* aNextInFlow);
static PRInt32 LengthOf(nsIFrame* aFrameList) {
nsFrameList tmp(aFrameList);
@ -143,7 +143,7 @@ public:
/**
* Invokes the WillReflow() function, positions the frame and its view (if
* requested), and then calls Reflow(). If the reflow succeeds and the child
* frame is complete, deletes any next-in-flows using DeleteChildsNextInFlow()
* frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
*
* Flags:
* NS_FRAME_NO_MOVE_VIEW - don't position the frame's view. Set this if you

View File

@ -275,7 +275,7 @@ nsFirstLetterFrame::Reflow(nsIPresContext* aPresContext,
kid->GetNextInFlow(&kidNextInFlow);
if (nsnull != kidNextInFlow) {
// Remove all of the childs next-in-flows
DeleteChildsNextInFlow(aPresContext, kid);
DeleteNextInFlowChild(aPresContext, kidNextInFlow);
}
}
else {

View File

@ -1288,8 +1288,8 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// the right parent to do the removal (it's possible that the
// parent is not this because we are executing pullup code)
nsHTMLContainerFrame* parent;
aFrame->GetParent((nsIFrame**) &parent);
parent->DeleteChildsNextInFlow(mPresContext, aFrame);
kidNextInFlow->GetParent((nsIFrame**) &parent);
parent->DeleteNextInFlowChild(mPresContext, kidNextInFlow);
}
}

View File

@ -0,0 +1,2 @@
<HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"><TITLE>Not Found</TITLE></HEAD>
<H1>Not Found</H1> The requested object does not exist on this server. The link you followed is either outdated, inaccurate, or the server has been instructed not to let you have it.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,192 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><!-- saved from url=(0058)http://www-i.nist.gov/admin/pba/kelly/divhome_template.htm -->
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 4">
<title>II. The Hall Effect</title></head>
<body bgcolor="white" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<table cellspacing="0" cellpadding="0" width="1005" align="center" border="0" hspace="0" vspace="0">
<tbody>
<tr>
<td width="1005"><img alt="Technical Activities" src="../images/tech-banner1.gif" border="0" usemap="#Navigation"><map name="Navigation"><area href="http://www.eeel.nist.gov/812/tech.html" coords="447,63,603,84" shape="rect" alt="Technical Activities"><area href="http://www.eeel.nist.gov/812/research.html" coords="220,63,446,84" shape="rect" alt="Research Projects / Facilities"><area href="http://www.eeel.nist.gov/812/about-sed.html" coords="97,63,217,84" shape="rect" alt="About SED"><area href="http://www.eeel.nist.gov/812/index.html" coords="3,63,95,84" shape="rect" alt="Home"></map><img alt="National Institute of Standards and Technology" src="../images/tech-banner2.gif" usemap="#NIST" border="0"><map name="NIST"><area href="http://www.eeel.nist.gov/812/search.html" coords="125,63,225,84" shape="rect" alt="Search"><area href="http://www.eeel.nist.gov/812/outputs.html" coords="18,63,123,84" shape="rect" alt="Outputs"><area href="http://www.eeel.nist.gov/812/tech.html" coords="2,63,16,84" shape="rect" alt="Technical Activities"><area href="http://www.nist.gov/" coords="2,4,138,60" shape="rect" alt="NIST home page"></map></td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" align="center" border="0" width="98%">
<tbody>
<tr>
<td valign="top" width="1"><img height="5" src="../images/black_1pix.html" width="1" border="0"></td>
<td valign="top" width="1000">
<table cellspacing="0" cellpadding="0" width="95%" align="center" border="0">
<tbody>
<tr valign="top" align="left">
<td>
<div align="left">
<h1>II. The Hall Effect</h1>
</div>
<dir>
<p><a href="#evol">Evolution of Resistance Concepts</a><br>
<a href="#lore">The Hall Effect and the Lorentz Force</a><br>
<a href="#vand">The van der Pauw Technique</a></p>
</dir>
<h3><a name="evol"></a>Evolution of Resistance Concepts</h3>
<p><b>Electrical characterization</b> of materials evolved in three levels of understanding. In the early 1800s, the resistance <i>R</i> and conductance <i>G</i> were treated as measurable physical quantities obtainable from two-terminal <i>I-V</i> measurements (i.e., current <i>I</i>, voltage <i>V</i>).
Later, it became obvious that the resistance alone was not comprehensive
enough since different sample shapes gave different resistance values. This
led to the understanding (second level) that an intrinsic material property
like resistivity (or conductivity) is required that is not influenced by
the particular geometry of the sample. For the first time, this allowed scientists
to quantify the current-carrying capability of the material and carry out
meaningful comparisons between different samples.</p>
<p>By the
early 1900s, it was realized that resistivity was not a fundamental material
parameter, since different materials can have the same resistivity. Also,
a given material might exhibit different values of resistivity, depending
upon how it was synthesized. This is especially true for semiconductors,
where resistivity alone could not explain all observations. Theories of electrical
conduction were constructed with varying degrees of success, but until the
advent of quantum mechanics, no generally acceptable solution to the problem
of electrical transport was developed. This led to the definitions of carrier
density <i>n</i> and mobility <i>µ </i> (third level of understanding) which are capable of dealing with even the most complex electrical measurements today.<a href="http://www.eeel.nist.gov/812/fig1.htm"><img src="../images/fig1s.jpg" align="right" hspace="10" vspace="70" border="0" alt="Schematic of the Hall effect in a long, thin bar of semiconductor with four ohmic contacts. The direction of the magnetic field B is along the z-axis and the sample has a finite thickness d"></a></p>
<h3><a name="lore"></a>The Hall Effect and the Lorentz Force</h3>
<p>The
basic physical principle underlying the Hall effect is the Lorentz force.
When an electron moves along a direction perpendicular to an applied magnetic
field, it experiences a force acting normal to both directions and moves
in response to this force and the force effected by the internal electric
field. For an <i>n</i>-type, bar-shaped semiconductor shown in <a href="http://www.eeel.nist.gov/812/fig1.htm">Fig.1</a>, the carriers are predominately electrons of bulk density <i>n</i>. We assume that a constant current <i>I</i>
flows along the x-axis from left to right in the presence of a z-directed
magnetic field. Electrons subject to the Lorentz force initially drift away
from the current line toward the negative y-axis, resulting in an excess
surface electrical charge on the side of the sample. This charge results
in the Hall voltage, a potential drop across the two sides of the sample.
(Note that the force on holes is toward the same side because of their opposite
velocity and positive charge.) This transverse voltage is the Hall voltage
<i>V</i><font size="2"><sub>H</sub></font> and its magnitude is equal to <i>IB/qnd</i>, where <i>I</i> is the current, <i>B</i> is the magnetic field, <i>d</i> is the sample thickness, and <i>q</i> (1.602 x 10<font size="2"><sup>-19</sup></font> C) is the elementary charge. In some cases, it is convenient to use layer or sheet density (<i>n</i><sub>s</sub> = <i>nd</i>) instead of bulk density. One then obtains the equation</p>
<p>
<table border="0" cellpadding="0" cellspacing="2">
<tbody><tr>
<td width="40"></td>
<td width="480"><i>n</i><sub>s</sub> = <i>IB</i>/<i>q</i>|<i>V</i><font size="2"><sub>H</sub></font>|.</td>
<td width="20"></td>
<td>(1)</td>
</tr>
</tbody></table>
</p>
<p>Thus, by measuring the Hall voltage <i>V</i><sub>H</sub> and from the known values of <i>I</i>, <i>B</i>, and <i>q</i>, one can determine the sheet density <i>n</i><sub>s</sub>
of charge carriers in semiconductors. If the measurement apparatus is set
up as described later in Section III, the Hall voltage is negative for <i>n</i>-type semiconductors and positive for <i>p</i>-type semiconductors. The sheet resistance <i>R</i><font size="2"><sub>S</sub></font>
of the semiconductor can be conveniently determined by use of the van der
Pauw resistivity measurement technique. Since sheet resistance involves both
sheet density and mobility, one can determine the Hall mobility from the
equation</p>
<p>
<table border="0" cellpadding="0" cellspacing="2" align="left">
<tbody><tr>
<td width="40"></td>
<td width="480"><font face="Symbol"><i> </i></font><i>µ </i> = |<i>V</i><font size="2"><sub>H</sub></font>|/<i>R</i><font size="2"><sub>S</sub></font><i>IB</i> = 1/(<i>qn</i><font size="2"><sub>S</sub></font><i>R</i><font size="2"><sub>S</sub></font>).</td>
<td width="20"></td>
<td>(2)</td>
</tr>
</tbody></table>
<br>
<br>
</p>
<p>If the conducting layer thickness <i>d</i> is known, one can determine the bulk resistivity (<font face="Symbol"><i>r</i></font> = <i>R</i><font size="2"><sub>S</sub></font><i>d</i>) and the bulk density (<i>n</i> = <i>n</i><font size="2"><sub>S</sub></font>/<i>d</i>). <a href="http://www.eeel.nist.gov/812/fig2.htm"><img src="../images/fig2s.jpg" align="right" hspace="10" vspace="70" border="0" alt="Schematic of a van der Pauw configuration used in the determination of the two characteristic resistances RA and RB"></a></p>
<h3><a name="vand"></a>The van der Pauw Technique</h3>
<p>In order to determine both the mobility <i>µ</i>   and the sheet density <i>n</i><sub>s</sub>, a combination of a <a href="http://www.eeel.nist.gov/812/meas.htm#resi">resistivity measurement</a> and a <a href="http://www.eeel.nist.gov/812/meas.htm#halm">Hall measurement</a>
is needed. We discuss here the van der Pauw technique which, due to its convenience,
is widely used in the semiconductor industry to determine the resistivity
of uniform samples (References 3 and 4). As originally devised by van der
Pauw, one uses an arbitrarily shaped (but simply connected, i.e., no holes
or nonconducting islands or inclusions), thin-plate sample containing four
very small ohmic contacts placed on the periphery (preferably in the corners)
of the plate. A schematic of a rectangular van der Pauw configuration is
shown in <a href="http://www.eeel.nist.gov/812/fig2.htm">Fig. 2</a>.</p>
<p>The objective of the <a href="http://www.eeel.nist.gov/812/meas.htm#resi">resistivity measurement</a> is to determine the sheet resistance <i>R</i><font size="2"><sub>S</sub></font>. Van der Pauw demonstrated that there are actually two characteristic resistances <i>R</i><font size="2"><sub>A</sub></font> and <i>R</i><font size="2"><sub>B</sub>,</font> associated with the corresponding terminals shown in <a href="http://www.eeel.nist.gov/812/fig2.htm">Fig. 2</a>. <i>R</i><font size="2"><sub>A</sub></font> and <i>R</i><font size="2"><sub>B</sub></font> are related to the sheet resistance <i>R</i><font size="2"><sub>S</sub></font> through the van der Pauw equation</p>
<p>
<table border="0" cellpadding="0" cellspacing="2">
<tbody><tr>
<td width="40"></td>
<td width="480">exp(-<font face="Symbol">p</font><i>R</i><font size="2"><sub>A</sub></font>/<i>R</i><font size="2"><sub>S</sub></font>) + exp(-<font face="Symbol">p</font><i>R</i><font size="2"><sub>B</sub></font>/<i>R</i><font size="2"><sub>S</sub></font>) = 1</td>
<td width="20"></td>
<td>(3)</td>
</tr>
</tbody></table>
</p>
<p>which can be solved numerically for <i>R</i><font size="2"><sub>S</sub></font>.</p>
<p>The bulk electrical resistivity <font face="Symbol"><i>r</i></font> can be calculated using</p>
<p>
<table border="0" cellpadding="0" cellspacing="2">
<tbody><tr>
<td width="40"></td>
<td width="480"><font face="Symbol"><i>r</i></font> = <i>R</i><font size="2"><sub>S</sub></font><i>d</i>.</td>
<td width="20"></td>
<td>(4)</td>
</tr>
</tbody></table>
</p>
<p>To obtain the two characteristic resistances, one applies a dc current <i>I</i> into contact 1 and out of contact 2 and measures the voltage <i>V</i><font size="2"><sub>43</sub></font> from contact 4 to contact 3 as shown in <a href="http://www.eeel.nist.gov/812/fig2.htm">Fig. 2</a>. Next, one applies the current <i>I</i> into contact 2 and out of contact 3 while measuring the voltage <i>V</i><font size="2"><sub>14</sub></font> from contact 1 to contact 4. <i>R</i><font size="2"><sub>A</sub></font> and <i>R</i><font size="2"><sub>B</sub></font> are calculated by means of the following expressions:</p>
<p>
<table border="0" cellpadding="0" cellspacing="2">
<tbody><tr>
<td width="40"></td>
<td width="480"><i>R</i><font size="2"><sub>A</sub></font> = <i>V</i><font size="2"><sub>43</sub></font>/<i>I</i><font size="2"><sub>12</sub></font> and <i>R</i><font size="2"><sub>B</sub></font> = <i>V</i><font size="2"><sub>14</sub></font>/<i>I</i><font size="2"><sub>23</sub></font>.</td>
<td width="20"></td>
<td>(5)</td>
</tr>
</tbody></table>
</p>
<p><a href="http://www.eeel.nist.gov/812/fig3.htm"><img src="../images/fig3s.jpg" align="right" hspace="10" vspace="70" border="0" alt="Schematic of a van der Pauw configuration used in the determination of the Hall voltage VH"></a>The objective of the <a href="http://www.eeel.nist.gov/812/meas.htm#halm">Hall measurement</a> in the van der Pauw technique is to determine the sheet carrier density <i>n</i><sub>s</sub> by measuring the Hall voltage <i>V</i><font size="2"><sub>H</sub></font>. The Hall voltage measurement consists of a series of voltage measurements with a constant current <i>I</i> and a constant magnetic field <i>B</i> applied perpendicular to the plane of the sample. Conveniently, the same sample, shown again in <a href="http://www.eeel.nist.gov/812/fig3.htm">Fig. 3</a>, can also be used for the Hall measurement. To measure the Hall voltage <i>V</i><font size="2"><sub>H</sub></font>, a current <i>I</i> is forced through the opposing pair of contacts 1 and 3 and the Hall voltage <i>V</i><font size="2"><sub>H</sub></font> (= <i>V</i><font size="2"><sub>24</sub></font>) is measured across the remaining pair of contacts 2 and 4. Once the Hall voltage <i>V</i><font size="2"><sub>H</sub></font> is acquired, the sheet carrier density <i>n</i><sub>s</sub> can be calculated via <i>n</i><sub>s</sub> = <i>IB</i>/<i>q</i>|<i>V</i><font size="2"><sub>H</sub></font>| from the known values of <i>I</i>, <i>B</i>, and <i>q</i>.</p>
<p>There
are practical aspects which must be considered when carrying out Hall and
resistivity measurements. Primary concerns are (1) ohmic contact quality
and size, (2) sample uniformity and accurate thickness determination, (3)
thermomagnetic effects due to nonuniform temperature, and (4) photoconductive
and photovoltaic effects which can be minimized by measuring in a dark environment.
Also, the sample lateral dimensions must be large compared to the size of
the contacts and the sample thickness. Finally, one must accurately measure
sample temperature, magnetic field intensity, electrical current, and voltage.</p>
<p><a href="http://www.eeel.nist.gov/812/meas.htm"><img src="../images/continue.jpg" alt="Click for Next Page"></a></p>
<center>
<p>
</p><hr>
<p></p>
<p><font size="2">|<a href="http://www.eeel.nist.gov/812/hall.html"> Main Page </a>| <a href="http://www.eeel.nist.gov/812/intr.htm">I. Introduction </a>| <a href="http://www.eeel.nist.gov/812/effe.htm">II. The Hall Effect </a>| <a href="#evol">evolution of resistance concepts </a>|<br>
| <a href="#lore">the Hall effect and the Lorentz force </a>| <a href="#vand">the van der Pauw technique </a>|<br>
| <a href="http://www.eeel.nist.gov/812/meas.htm">III. Resistivity and Hall Measurements </a>| <a href="http://www.eeel.nist.gov/812/meas.htm#geom">sample geometry </a>| <a href="http://www.eeel.nist.gov/812/meas.htm#defi">definitions for resistivity measurements</a> |<br>
|<a href="http://www.eeel.nist.gov/812/meas.htm#resi"> resistivity measurements </a>| <a href="http://www.eeel.nist.gov/812/meas.htm#calc">resistivity calculations </a>| <a href="http://www.eeel.nist.gov/812/meas.htm#defh">definitions for Hall measurements </a>|<br>
|<a href="http://www.eeel.nist.gov/812/meas.htm#halm"> Hall measurements </a>|<a href="http://www.eeel.nist.gov/812/meas.htm#halc"> Hall calculations </a>| <a href="http://www.eeel.nist.gov/812/work.htm">Sample Hall Worksheet </a>|<a href="http://www.eeel.nist.gov/812/work2.htm"> Worksheet with Typical Data </a>| <a href="http://www.eeel.nist.gov/812/samp.htm">IV. Algorithm </a>|<br>
|<a href="http://www.eeel.nist.gov/812/references.htm"> V. References </a>| VI.<a href="http://www.eeel.nist.gov/812/hallcom.htm"> Leave </a>or <a href="http://www.eeel.nist.gov/812/hallview.htm">View </a>Comments | <a href="http://www.eeel.nist.gov/812/fig1.htm">figure 1 </a>| <a href="http://www.eeel.nist.gov/812/fig2.htm">figure 2 </a>| |<a href="http://www.eeel.nist.gov/812/fig3.htm"> figure 3 </a>| <a href="http://www.eeel.nist.gov/812/fig4.htm">figure 4 </a>|<br>
</font></p>
<p>
</p><hr>
<p></p>
</center>
<p><font face="Arial,Helvetica,sans-serif" size="1">NIST is an agency of the <a href="http://www.doc.gov/">U.S. Commerce Department's</a> <a href="http://www.ta.doc.gov/">Technology Administration.</a></font></p>
<p><font face="Arial,Helvetica,sans-serif" size="1">Date created: 12/4/2000<br>
Last updated: 6/28/2001</font></p></td>
</tr>
</tbody>
</table>
</td>
<td valign="top" width="1" bgcolor="black"><img height="5" src="../images/black_1pix.html" width="1" border="0"></td>
<td valign="top" width="200" bgcolor="#ffcc66">
<table cellspacing="0" cellpadding="0" width="95%" border="0">
<tbody>
<tr>
<td width="200"><b> </b>
<p><a href="http://www.eeel.nist.gov/812/conf.htm"><b>Conferences/Workshops</b></a></p>
<p><a href="http://www.eeel.nist.gov/812/nano.html"><b>Nanotechnology</b></a></p>
<p><a href="http://www.eeel.nist.gov/812/inte.htm"><b>Electronic Interconnects/Packaging</b></a></p>
<p><a href="http://www.eeel.nist.gov/812/comp.htm"><b>Compound Semiconductors</b></a></p>
<p><a href="http://www.eeel.nist.gov/812/hall.html"><b>Hall Effect Measurements</b></a></p>
<p><a href="http://www.eeel.nist.gov/812/itrcs.html"><b>Compound Semiconductor Roadmap</b></a></p></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body></html>

View File

@ -20,3 +20,5 @@ file:///s:/mozilla/layout/html/tests/block/printing/145305-19.html
file:///s:/mozilla/layout/html/tests/block/printing/145305-20.html
file:///s:/mozilla/layout/html/tests/block/printing/145305-21.html
file:///s:/mozilla/layout/html/tests/block/printing/150652.html
file:///s:/mozilla/layout/html/tests/block/printing/163614.html