Hi All,
The pages_ member of WebFrameImpl (webkit\glue\webframe_impl.cc) is no
longer being set in WebFrameImpl::ComputePageRects(). The pages_ member is
used throughout WebFrameImpl for printing purposes. If pages_ is not set,
printing will fail.
>From revision 9214:
int WebFrameImpl::ComputePageRects(const gfx::Size& page_size_px) {
if (!printing_ ||
!frame() ||
!frame()->document()) {
NOTREACHED();
return 0;
}
// In Safari, they are using:
// (0,0) + soft margins top/left
// (phys width, phys height) - hard margins -
// soft margins top/left - soft margins right/bottom
// TODO(maruel): Weird. We don't do that.
// Everything is in pixels :(
// pages_ and page_height are actually output parameters.
int page_height;
WebCore::IntRect rect(0, 0, page_size_px.width(), page_size_px.height());
computePageRectsForFrame(frame(), rect, 0, 0, 1.0, pages_, page_height);
return pages_.size();
}
>From revision 9462:
int WebFrameImpl::ComputePageRects(const gfx::Size& page_size_px) {
if (!printing_ ||
!frame() ||
!frame()->document()) {
NOTREACHED();
return 0;
}
// In Safari, they are using:
// (0,0) + soft margins top/left
// (phys width, phys height) - hard margins -
// soft margins top/left - soft margins right/bottom
// TODO(maruel): Weird. We don't do that.
// Everything is in pixels :(
// pages_ and page_height are actually output parameters.
WebCore::FloatRect rect(0, 0,
static_cast<float>(page_size_px.width()),
static_cast<float>(page_size_px.height()));
WebCore::PrintContext print_context(frame());
float page_height;
print_context.computePageRects(rect, 0, 0, 1.0, page_height);
return print_context.pageCount();
}
Regards,
Marshall
--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected]
View archives, change email options, or unsubscribe:
http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---