1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
39 * code for managing absolutely positioned children of a rendering
40 * object that is a containing block for them
44 #include "nsAbsoluteContainingBlock.h"
45 #include "nsContainerFrame.h"
46 #include "nsIPresShell.h"
47 #include "nsHTMLContainerFrame.h"
48 #include "nsHTMLParts.h"
49 #include "nsPresContext.h"
50 #include "nsFrameManager.h"
51 #include "nsCSSFrameConstructor.h"
54 #include "nsBlockFrame.h"
58 nsAbsoluteContainingBlock::SetInitialChildList(nsIFrame
* aDelegatingFrame
,
60 nsFrameList
& aChildList
)
62 NS_PRECONDITION(GetChildListName() == aListName
, "unexpected child list name");
64 nsFrame::VerifyDirtyBitSet(aChildList
);
66 mAbsoluteFrames
.SetFrames(aChildList
);
71 nsAbsoluteContainingBlock::AppendFrames(nsIFrame
* aDelegatingFrame
,
73 nsFrameList
& aFrameList
)
75 NS_ASSERTION(GetChildListName() == aListName
, "unexpected child list");
77 // Append the frames to our list of absolutely positioned frames
79 nsFrame::VerifyDirtyBitSet(aFrameList
);
81 mAbsoluteFrames
.AppendFrames(nsnull
, aFrameList
);
83 // no damage to intrinsic widths, since absolutely positioned frames can't
85 return aDelegatingFrame
->PresContext()->PresShell()->
86 FrameNeedsReflow(aDelegatingFrame
, nsIPresShell::eResize
,
87 NS_FRAME_HAS_DIRTY_CHILDREN
);
91 nsAbsoluteContainingBlock::InsertFrames(nsIFrame
* aDelegatingFrame
,
94 nsFrameList
& aFrameList
)
96 NS_ASSERTION(GetChildListName() == aListName
, "unexpected child list");
97 NS_ASSERTION(!aPrevFrame
|| aPrevFrame
->GetParent() == aDelegatingFrame
,
98 "inserting after sibling frame with different parent");
101 nsFrame::VerifyDirtyBitSet(aFrameList
);
103 mAbsoluteFrames
.InsertFrames(nsnull
, aPrevFrame
, aFrameList
);
105 // no damage to intrinsic widths, since absolutely positioned frames can't
107 return aDelegatingFrame
->PresContext()->PresShell()->
108 FrameNeedsReflow(aDelegatingFrame
, nsIPresShell::eResize
,
109 NS_FRAME_HAS_DIRTY_CHILDREN
);
113 nsAbsoluteContainingBlock::RemoveFrame(nsIFrame
* aDelegatingFrame
,
117 NS_ASSERTION(GetChildListName() == aListName
, "unexpected child list");
118 nsIFrame
* nif
= aOldFrame
->GetNextInFlow();
120 static_cast<nsContainerFrame
*>(nif
->GetParent())
121 ->DeleteNextInFlowChild(aOldFrame
->PresContext(), nif
, PR_FALSE
);
124 mAbsoluteFrames
.DestroyFrame(aOldFrame
);
128 nsAbsoluteContainingBlock::Reflow(nsContainerFrame
* aDelegatingFrame
,
129 nsPresContext
* aPresContext
,
130 const nsHTMLReflowState
& aReflowState
,
131 nsReflowStatus
& aReflowStatus
,
132 nscoord aContainingBlockWidth
,
133 nscoord aContainingBlockHeight
,
134 PRBool aConstrainHeight
,
135 PRBool aCBWidthChanged
,
136 PRBool aCBHeightChanged
,
137 nsRect
* aChildBounds
)
139 // Initialize OUT parameter
141 aChildBounds
->SetRect(0, 0, 0, 0);
142 nsReflowStatus reflowStatus
= NS_FRAME_COMPLETE
;
144 PRBool reflowAll
= aReflowState
.ShouldReflowAllKids();
147 nsOverflowContinuationTracker
tracker(aPresContext
, aDelegatingFrame
, PR_TRUE
);
148 for (kidFrame
= mAbsoluteFrames
.FirstChild(); kidFrame
; kidFrame
= kidFrame
->GetNextSibling()) {
149 PRBool kidNeedsReflow
= reflowAll
|| NS_SUBTREE_DIRTY(kidFrame
) ||
150 FrameDependsOnContainer(kidFrame
, aCBWidthChanged
, aCBHeightChanged
);
151 if (kidNeedsReflow
&& !aPresContext
->HasPendingInterrupt()) {
153 nsReflowStatus kidStatus
= NS_FRAME_COMPLETE
;
154 ReflowAbsoluteFrame(aDelegatingFrame
, aPresContext
, aReflowState
,
155 aContainingBlockWidth
, aContainingBlockHeight
,
156 aConstrainHeight
, kidFrame
, kidStatus
, aChildBounds
);
157 nsIFrame
* nextFrame
= kidFrame
->GetNextInFlow();
158 if (!NS_FRAME_IS_FULLY_COMPLETE(kidStatus
)) {
159 // Need a continuation
161 nsresult rv
= aPresContext
->PresShell()->FrameConstructor()->
162 CreateContinuingFrame(aPresContext
, kidFrame
, aDelegatingFrame
, &nextFrame
);
163 NS_ENSURE_SUCCESS(rv
, rv
);
165 // Add it as an overflow container.
166 //XXXfr This is a hack to fix some of our printing dataloss.
167 // See bug 154892. Not sure how to do it "right" yet; probably want
168 // to keep continuations within an nsAbsoluteContainingBlock eventually.
169 tracker
.Insert(nextFrame
, kidStatus
);
170 NS_MergeReflowStatusInto(&reflowStatus
, kidStatus
);
173 // Delete any continuations
175 tracker
.Finish(kidFrame
);
176 static_cast<nsContainerFrame
*>(nextFrame
->GetParent())
177 ->DeleteNextInFlowChild(aPresContext
, nextFrame
, PR_TRUE
);
182 tracker
.Skip(kidFrame
, reflowStatus
);
184 aChildBounds
->UnionRect(*aChildBounds
, kidFrame
->GetOverflowRect() +
185 kidFrame
->GetPosition());
189 // Make a CheckForInterrupt call, here, not just HasPendingInterrupt. That
190 // will make sure that we end up reflowing aDelegatingFrame in cases when
191 // one of our kids interrupted. Otherwise we'd set the dirty or
192 // dirty-children bit on the kid in the condition below, and then when
193 // reflow completes and we go to mark dirty bits on all ancestors of that
194 // kid we'll immediately bail out, because the kid already has a dirty bit.
195 // In particular, we won't set any dirty bits on aDelegatingFrame, so when
196 // the following reflow happens we won't reflow the kid in question. This
197 // might be slightly suboptimal in cases where |kidFrame| itself did not
198 // interrupt, since we'll trigger a reflow of it too when it's not strictly
199 // needed. But the logic to not do that is enough more complicated, and
200 // the case enough of an edge case, that this is probably better.
201 if (kidNeedsReflow
&& aPresContext
->CheckForInterrupt(aDelegatingFrame
)) {
202 if (aDelegatingFrame
->GetStateBits() & NS_FRAME_IS_DIRTY
) {
203 kidFrame
->AddStateBits(NS_FRAME_IS_DIRTY
);
205 kidFrame
->AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN
);
210 // Abspos frames can't cause their parent to be incomplete,
211 // only overflow incomplete.
212 if (NS_FRAME_IS_NOT_COMPLETE(reflowStatus
))
213 NS_FRAME_SET_OVERFLOW_INCOMPLETE(reflowStatus
);
215 NS_MergeReflowStatusInto(&aReflowStatus
, reflowStatus
);
219 static inline PRBool
IsFixedPaddingSize(nsStyleUnit aUnit
) {
220 return aUnit
== eStyleUnit_Coord
;
222 static inline PRBool
IsFixedMarginSize(nsStyleUnit aUnit
) {
223 return aUnit
== eStyleUnit_Coord
;
225 static inline PRBool
IsFixedMaxSize(nsStyleUnit aUnit
) {
226 return aUnit
== eStyleUnit_None
|| aUnit
== eStyleUnit_Coord
;
228 static inline PRBool
IsFixedOffset(nsStyleUnit aUnit
) {
229 return aUnit
== eStyleUnit_Coord
;
231 static inline PRBool
IsFixedHeight(nsStyleUnit aUnit
) {
232 return aUnit
== eStyleUnit_Coord
;
235 static inline PRBool
IsFixedWidth(const nsStyleCoord
& aCoord
)
237 return aCoord
.GetUnit() == eStyleUnit_Coord
||
238 (aCoord
.GetUnit() == eStyleUnit_Enumerated
&&
239 (aCoord
.GetIntValue() == NS_STYLE_WIDTH_MAX_CONTENT
||
240 aCoord
.GetIntValue() == NS_STYLE_WIDTH_MIN_CONTENT
));
243 static inline PRBool
IsFixedMaxWidth(const nsStyleCoord
& aCoord
)
245 return aCoord
.GetUnit() == eStyleUnit_None
||
246 IsFixedWidth(aCoord
);
250 nsAbsoluteContainingBlock::FrameDependsOnContainer(nsIFrame
* f
,
251 PRBool aCBWidthChanged
,
252 PRBool aCBHeightChanged
)
254 const nsStylePosition
* pos
= f
->GetStylePosition();
255 // See if f's position might have changed because it depends on a
256 // placeholder's position
257 // This can happen in the following cases:
258 // 1) Vertical positioning. "top" must be auto and "bottom" must be auto
259 // (otherwise the vertical position is completely determined by
260 // whichever of them is not auto and the height).
261 // 2) Horizontal positioning. "left" must be auto and "right" must be auto
262 // (otherwise the horizontal position is completely determined by
263 // whichever of them is not auto and the width).
264 // See nsHTMLReflowState::InitAbsoluteConstraints -- these are the
265 // only cases when we call CalculateHypotheticalBox().
266 if ((pos
->mOffset
.GetTopUnit() == eStyleUnit_Auto
&&
267 pos
->mOffset
.GetBottomUnit() == eStyleUnit_Auto
) ||
268 (pos
->mOffset
.GetLeftUnit() == eStyleUnit_Auto
&&
269 pos
->mOffset
.GetRightUnit() == eStyleUnit_Auto
)) {
272 if (!aCBWidthChanged
&& !aCBHeightChanged
) {
273 // skip getting style data
276 const nsStylePadding
* padding
= f
->GetStylePadding();
277 const nsStyleMargin
* margin
= f
->GetStyleMargin();
278 if (aCBWidthChanged
) {
279 // See if f's width might have changed.
280 // If border-left, border-right, padding-left, padding-right,
281 // width, min-width, and max-width are all lengths, 'none', or enumerated,
282 // then our frame width does not depend on the parent width.
283 // Note that borders never depend on the parent width
284 // XXX All of the enumerated values except -moz-available are ok too.
285 if (!IsFixedWidth(pos
->mWidth
) ||
286 !IsFixedWidth(pos
->mMinWidth
) ||
287 !IsFixedMaxWidth(pos
->mMaxWidth
) ||
288 !IsFixedPaddingSize(padding
->mPadding
.GetLeftUnit()) ||
289 !IsFixedPaddingSize(padding
->mPadding
.GetRightUnit())) {
293 // See if f's position might have changed. If we're RTL then the
294 // rules are slightly different. We'll assume percentage or auto
295 // margins will always induce a dependency on the size
296 if (!IsFixedMarginSize(margin
->mMargin
.GetLeftUnit()) ||
297 !IsFixedMarginSize(margin
->mMargin
.GetRightUnit())) {
300 if (f
->GetStyleVisibility()->mDirection
== NS_STYLE_DIRECTION_RTL
) {
301 // Note that even if 'left' is a length, our position can
302 // still depend on the containing block width, because if
303 // 'right' is also a length we will discard 'left' and be
304 // positioned relative to the containing block right edge.
305 // 'left' length and 'right' auto is the only combination
306 // we can be sure of.
307 if (!IsFixedOffset(pos
->mOffset
.GetLeftUnit()) ||
308 pos
->mOffset
.GetRightUnit() != eStyleUnit_Auto
) {
312 if (!IsFixedOffset(pos
->mOffset
.GetLeftUnit())) {
317 if (aCBHeightChanged
) {
318 // See if f's height might have changed.
319 // If border-top, border-bottom, padding-top, padding-bottom,
320 // min-height, and max-height are all lengths or 'none',
321 // and height is a length or height and bottom are auto and top is not auto,
322 // then our frame height does not depend on the parent height.
323 // Note that borders never depend on the parent height
324 if (!(IsFixedHeight(pos
->mHeight
.GetUnit()) ||
325 (pos
->mHeight
.GetUnit() == eStyleUnit_Auto
&&
326 pos
->mOffset
.GetBottomUnit() == eStyleUnit_Auto
&&
327 pos
->mOffset
.GetTopUnit() != eStyleUnit_Auto
)) ||
328 !IsFixedHeight(pos
->mMinHeight
.GetUnit()) ||
329 !IsFixedMaxSize(pos
->mMaxHeight
.GetUnit()) ||
330 !IsFixedPaddingSize(padding
->mPadding
.GetTopUnit()) ||
331 !IsFixedPaddingSize(padding
->mPadding
.GetBottomUnit())) {
335 // See if f's position might have changed.
336 if (!IsFixedMarginSize(margin
->mMargin
.GetTopUnit()) ||
337 !IsFixedMarginSize(margin
->mMargin
.GetBottomUnit())) {
340 if (!IsFixedOffset(pos
->mOffset
.GetTopUnit())) {
348 nsAbsoluteContainingBlock::DestroyFrames(nsIFrame
* aDelegatingFrame
)
350 mAbsoluteFrames
.DestroyFrames();
354 nsAbsoluteContainingBlock::MarkSizeDependentFramesDirty()
356 DoMarkFramesDirty(PR_FALSE
);
360 nsAbsoluteContainingBlock::MarkAllFramesDirty()
362 DoMarkFramesDirty(PR_TRUE
);
366 nsAbsoluteContainingBlock::DoMarkFramesDirty(PRBool aMarkAllDirty
)
368 for (nsIFrame
* kidFrame
= mAbsoluteFrames
.FirstChild();
370 kidFrame
= kidFrame
->GetNextSibling()) {
372 kidFrame
->AddStateBits(NS_FRAME_IS_DIRTY
);
373 } else if (FrameDependsOnContainer(kidFrame
, PR_TRUE
, PR_TRUE
)) {
374 // Add the weakest flags that will make sure we reflow this frame later
375 kidFrame
->AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN
);
380 // XXX Optimize the case where it's a resize reflow and the absolutely
381 // positioned child has the exact same size and position and skip the
384 // When bug 154892 is checked in, make sure that when
385 // GetChildListName() == nsGkAtoms::fixedList, the height is unconstrained.
386 // since we don't allow replicated frames to split.
389 nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame
* aDelegatingFrame
,
390 nsPresContext
* aPresContext
,
391 const nsHTMLReflowState
& aReflowState
,
392 nscoord aContainingBlockWidth
,
393 nscoord aContainingBlockHeight
,
394 PRBool aConstrainHeight
,
396 nsReflowStatus
& aStatus
,
397 nsRect
* aChildBounds
)
400 if (nsBlockFrame::gNoisyReflow
) {
401 nsFrame::IndentBy(stdout
,nsBlockFrame::gNoiseIndent
);
405 aKidFrame
->GetFrameName(name
);
406 printf("%s ", NS_LossyConvertUTF16toASCII(name
).get());
411 PrettyUC(aReflowState
.availableWidth
, width
);
412 PrettyUC(aReflowState
.availableHeight
, height
);
413 printf(" a=%s,%s ", width
, height
);
414 PrettyUC(aReflowState
.ComputedWidth(), width
);
415 PrettyUC(aReflowState
.ComputedHeight(), height
);
416 printf("c=%s,%s \n", width
, height
);
418 AutoNoisyIndenter
indent(nsBlockFrame::gNoisy
);
421 // Store position and overflow rect so taht we can invalidate the correct
422 // area if the position changes
423 nsRect
oldOverflowRect(aKidFrame
->GetOverflowRect() +
424 aKidFrame
->GetPosition());
425 nsRect oldRect
= aKidFrame
->GetRect();
428 // Get the border values
429 const nsMargin
& border
= aReflowState
.mStyleBorder
->GetActualBorder();
431 nscoord availWidth
= aContainingBlockWidth
;
432 if (availWidth
== -1) {
433 NS_ASSERTION(aReflowState
.ComputedWidth() != NS_UNCONSTRAINEDSIZE
,
434 "Must have a useful width _somewhere_");
436 aReflowState
.ComputedWidth() + aReflowState
.mComputedPadding
.LeftRight();
439 nsHTMLReflowMetrics kidDesiredSize
;
440 nsHTMLReflowState
kidReflowState(aPresContext
, aReflowState
, aKidFrame
,
441 nsSize(availWidth
, NS_UNCONSTRAINEDSIZE
),
442 aContainingBlockWidth
,
443 aContainingBlockHeight
);
445 // Send the WillReflow() notification and position the frame
446 aKidFrame
->WillReflow(aPresContext
);
448 PRBool constrainHeight
= (aReflowState
.availableHeight
!= NS_UNCONSTRAINEDSIZE
)
450 // Don't split if told not to (e.g. for fixed frames)
451 && (aDelegatingFrame
->GetType() != nsGkAtoms::positionedInlineFrame
)
452 //XXX we don't handle splitting frames for inline absolute containing blocks yet
453 && (aKidFrame
->GetRect().y
<= aReflowState
.availableHeight
);
454 // Don't split things below the fold. (Ideally we shouldn't *have*
455 // anything totally below the fold, but we can't position frames
456 // across next-in-flow breaks yet.
457 if (constrainHeight
) {
458 kidReflowState
.availableHeight
= aReflowState
.availableHeight
- border
.top
459 - kidReflowState
.mComputedMargin
.top
;
460 if (NS_AUTOOFFSET
!= kidReflowState
.mComputedOffsets
.top
)
461 kidReflowState
.availableHeight
-= kidReflowState
.mComputedOffsets
.top
;
465 rv
= aKidFrame
->Reflow(aPresContext
, kidDesiredSize
, kidReflowState
, aStatus
);
467 // If we're solving for 'left' or 'top', then compute it now that we know the
469 if ((NS_AUTOOFFSET
== kidReflowState
.mComputedOffsets
.left
) ||
470 (NS_AUTOOFFSET
== kidReflowState
.mComputedOffsets
.top
)) {
471 if (-1 == aContainingBlockWidth
) {
472 // Get the containing block width/height
473 kidReflowState
.ComputeContainingBlockRectangle(aPresContext
,
475 aContainingBlockWidth
,
476 aContainingBlockHeight
);
479 if (NS_AUTOOFFSET
== kidReflowState
.mComputedOffsets
.left
) {
480 NS_ASSERTION(NS_AUTOOFFSET
!= kidReflowState
.mComputedOffsets
.right
,
481 "Can't solve for both left and right");
482 kidReflowState
.mComputedOffsets
.left
= aContainingBlockWidth
-
483 kidReflowState
.mComputedOffsets
.right
-
484 kidReflowState
.mComputedMargin
.right
-
485 kidDesiredSize
.width
-
486 kidReflowState
.mComputedMargin
.left
;
488 if (NS_AUTOOFFSET
== kidReflowState
.mComputedOffsets
.top
) {
489 kidReflowState
.mComputedOffsets
.top
= aContainingBlockHeight
-
490 kidReflowState
.mComputedOffsets
.bottom
-
491 kidReflowState
.mComputedMargin
.bottom
-
492 kidDesiredSize
.height
-
493 kidReflowState
.mComputedMargin
.top
;
497 // Position the child relative to our padding edge
498 nsRect
rect(border
.left
+ kidReflowState
.mComputedOffsets
.left
+ kidReflowState
.mComputedMargin
.left
,
499 border
.top
+ kidReflowState
.mComputedOffsets
.top
+ kidReflowState
.mComputedMargin
.top
,
500 kidDesiredSize
.width
, kidDesiredSize
.height
);
501 aKidFrame
->SetRect(rect
);
503 nsIView
* view
= aKidFrame
->GetView();
505 // Size and position the view and set its opacity, visibility, content
506 // transparency, and clip
507 nsContainerFrame::SyncFrameViewAfterReflow(aPresContext
, aKidFrame
,
509 &kidDesiredSize
.mOverflowArea
);
511 nsContainerFrame::PositionChildViews(aKidFrame
);
514 if (oldRect
.TopLeft() != rect
.TopLeft() ||
515 (aDelegatingFrame
->GetStateBits() & NS_FRAME_FIRST_REFLOW
) ||
516 (kidDesiredSize
.mOverflowArea
+ rect
.TopLeft() != oldOverflowRect
&&
517 (kidDesiredSize
.mOverflowArea
+ rect
.TopLeft() != rect
|| oldRect
!= oldOverflowRect
))) {
518 // The frame moved; we have to invalidate the whole frame
519 // because the children may have moved after they were reflowed
520 // We also have to invalidate when we have overflow and the overflow
521 // changes because the change might be caused by clipping
522 // XXX This could be optimized in some cases, especially clipping changes
523 aKidFrame
->GetParent()->Invalidate(oldOverflowRect
);
524 aKidFrame
->GetParent()->Invalidate(kidDesiredSize
.mOverflowArea
+
526 } else if (oldRect
.Size() != rect
.Size()) {
527 // Invalidate the area where the frame changed size.
528 nscoord innerWidth
= NS_MIN(oldRect
.width
, rect
.width
);
529 nscoord innerHeight
= NS_MIN(oldRect
.height
, rect
.height
);
530 nscoord outerWidth
= NS_MAX(oldRect
.width
, rect
.width
);
531 nscoord outerHeight
= NS_MAX(oldRect
.height
, rect
.height
);
532 aKidFrame
->GetParent()->Invalidate(
533 nsRect(rect
.x
+ innerWidth
, rect
.y
, outerWidth
- innerWidth
, outerHeight
));
534 // Invalidate the horizontal strip
535 aKidFrame
->GetParent()->Invalidate(
536 nsRect(rect
.x
, rect
.y
+ innerHeight
, outerWidth
, outerHeight
- innerHeight
));
538 aKidFrame
->DidReflow(aPresContext
, &kidReflowState
, NS_FRAME_REFLOW_FINISHED
);
541 if (nsBlockFrame::gNoisyReflow
) {
542 nsFrame::IndentBy(stdout
,nsBlockFrame::gNoiseIndent
- 1);
546 aKidFrame
->GetFrameName(name
);
547 printf("%s ", NS_LossyConvertUTF16toASCII(name
).get());
549 printf("%p rect=%d,%d,%d,%d\n", static_cast<void*>(aKidFrame
),
550 rect
.x
, rect
.y
, rect
.width
, rect
.height
);
555 aChildBounds
->UnionRect(*aChildBounds
, kidDesiredSize
.mOverflowArea
+
562 void nsAbsoluteContainingBlock::PrettyUC(nscoord aSize
,
565 if (NS_UNCONSTRAINEDSIZE
== aSize
) {
569 if((PRInt32
)0xdeadbeef == aSize
)
571 strcpy(aBuf
, "deadbeef");
574 sprintf(aBuf
, "%d", aSize
);