[Webkit-unassigned] [Bug 27240] Refactor WebFrame::spoolPages to share with Windows Cairo

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 13 16:35:50 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27240





--- Comment #3 from Brent Fulgham <bfulgham at webkit.org>  2009-07-13 16:35:50 PDT ---
(In reply to comment #2)
> (From update of attachment 32685 [details])
> It's probably best to keep all #includes above all declarations, even though
> that will require two #if PLATFORM(CG) blocks.

Done.

> > +void WebFrame::printHeader(void* ctx, COMPtr<IWebUIDelegate> ui, const IntRect& pageRect, float headerHeight)
> 
> Why can't ctx be a PlatformGraphicsContext*?

Done.

> ui should just be an IWebUIDelegate*, to avoid ref-count churn.

Done.

> > +    ui->drawHeaderInRect(d->webView, &headerRect, (OLE_HANDLE)(LONG64)pctx);
> 
> reinterpret_cast would be better here (I won't comment on other existing uses
> of C-style casts).

Done.

> > +#if PLATFORM(CG)
> > +void WebFrame::spoolPage (void* ctx, GraphicsContext* spoolCtx, HDC printDC, COMPtr<IWebUIDelegate> ui, float headerHeight, float footerHeight, UINT page, UINT pageCount)
> 
> Please remove the space before the opening parenthesis (here and elsewhere in
> the patch).

Done.


> Seems like we could share all this coordinate space code if we used
> GraphicsContext a little more. Maybe add a FIXME?

Fixme added.  I'll try to take another pass once I can do more printing support
work to factor these out a bit better.

> > +    void spoolPage (void* ctx, WebCore::GraphicsContext* spoolCtx, HDC printDC, COMPtr<IWebUIDelegate> ui, float headerHeight, float footerHeight, UINT page, UINT pageCount);
> > +    void printHeader(void* ctx, COMPtr<IWebUIDelegate> ui, const WebCore::IntRect& pageRect, float headerHeight);
> > +    void printFooter(void* ctx, COMPtr<IWebUIDelegate> ui, const WebCore::IntRect& pageRect, UINT page, UINT pageCount, float headerHeight, float footerHeight);
> 
> Please remove the "ui" parameter names from these declarations.

Done.

> I think drawHeader/drawFooter would be better names, since these functions on
> their own don't do any printing.

Done.

> r=me, but please make these changes first (except for maybe the
> WebFrameCG/WebFrameCairo stuff).

Done!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list