On Aug 7, 12:14 pm, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Are all <LI> represented by a nsBulletFrame?
>
> The bullet part is, yes.
>
> > And load a page with UL and LI, but none of my print statements print
> > out.
>
> > Can you please tell me why?
>
> Did you actually recompile the right parts of the browser, for a start?
>
> Can you post your diff (-Up8, please) somewhere?
>
> -Boris
I think I did compile the right part of the browser. As I add printfs
in constructor of nsBulletFrame.
nsBulletFrame(nsStyleContext* aContext) : nsFrame(aContext) {
printf (" creating nsBulletFrame\n");
}
And i see the printout.
But I just don't see the printf from these methods:
void nsDisplayBullet::Paint(...);
NS_IMETHODIMP nsBulletFrame::BuildDisplayList(...);
void nsBulletFrame::PaintBullet(...);
Here is the diff for my printf changes:
***************
*** 127,144 ****
}
PRBool
nsBulletFrame::IsSelfEmpty()
{
return GetStyleList()->mListStyleType == NS_STYLE_LIST_STYLE_NONE;
}
-
-
NS_IMETHODIMP
nsBulletFrame::DidSetStyleContext()
{
imgIRequest *newRequest = GetStyleList()->mListStyleImage;
if (newRequest) {
if (!mListener) {
--- 127,142 ----
***************
*** 201,259 ****
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx,
const nsRect& aDirtyRect);
NS_DISPLAY_DECL_NAME("Bullet")
};
void nsDisplayBullet::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx, const nsRect& aDirtyRect)
{
- printf (" calling nsDisplayBullet paint \n");
static_cast<nsBulletFrame*>(mFrame)->
PaintBullet(*aCtx, aBuilder->ToReferenceFrame(mFrame),
aDirtyRect);
}
NS_IMETHODIMP
nsBulletFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
- printf (" build display list\n");
-
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
DO_GLOBAL_REFLOW_COUNT_DSP("nsBulletFrame");
return aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayBullet(this));
}
void
nsBulletFrame::PaintBullet(nsIRenderingContext& aRenderingContext,
nsPoint aPt,
const nsRect& aDirtyRect)
{
- printf (" calling paint bullet\n");
const nsStyleList* myList = GetStyleList();
PRUint8 listStyleType = myList->mListStyleType;
if (myList->mListStyleImage && mImageRequest) {
PRUint32 status;
mImageRequest->GetImageStatus(&status);
if (status & imgIRequest::STATUS_LOAD_COMPLETE &&
!(status & imgIRequest::STATUS_ERROR)) {
nsCOMPtr<imgIContainer> imageCon;
mImageRequest->GetImage(getter_AddRefs(imageCon));
if (imageCon) {
- PRInt32 width2;
- PRInt32 height2;
-
- imageCon->GetWidth(&width2);
- imageCon->GetHeight(&height2);
- printf (" paint bullet %d %d\n", width2, height2);
-
nsRect dest(mPadding.left, mPadding.top,
mRect.width - (mPadding.left + mPadding.right),
mRect.height - (mPadding.top +
mPadding.bottom));
nsLayoutUtils::DrawImage(&aRenderingContext, imageCon,
dest + aPt, aDirtyRect);
return;
}
}
--- 199,246 ----
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout