[Webkit-unassigned] [Bug 34743] [Chromium] Implement WebFrameImpl::numberOfPages

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 9 12:46:16 PST 2010


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





--- Comment #3 from Darin Fisher (:fishd, Google) <fishd at chromium.org>  2010-02-09 12:46:14 PST ---
(From update of attachment 48398)
> +++ b/WebKit/chromium/public/WebFrame.h
> @@ -490,6 +490,11 @@ public:
>                                           float pageWidthInPixels,
>                                           float pageHeightInPixels) const = 0;
>  
> +    // Returns the number of pages to be printed.
> +    // This method is used to support layout tests.
> +    virtual int numberOfPages(float pageWidthInPixels,
> +                              float pageHeightInPixels) const = 0;

Since this is about printing, should this be moved into the "printing"
section of WebFrame?  I realize that you probably stuck this nearby
pageNumberForElementById intentionally, and that was probably put next
to counterValueForElementById because they are only used by layout tests.

Is it necessary to call printBegin before using this function?  Would
it be advantageous to do so?

If we wanted to have a print preview system, perhaps we'd want to know
how many pages will be generated, so this API might be nice outside the
context of layout tests.

At any rate, it seems like we should either make these features of the
printing API, or we should create a new section in WebFrame that is
dedicated to providing utilities for layout tests.

One more question:  is it necessary to be able to specify pageWidth
and pageHeight in fractions of a pixel?  Do these need to be floats,
or can they be integers?

-Darin

-- 
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